HolyLib Wiki

HolyLib:OnSourceTVNetMessage

  HolyLib:OnSourceTVNetMessage( CHLTVClient client, bf_read buffer )

Description

Called when a CHLTVClient sends a net message to the server.

Arguments

1CHLTVClient client
client that sent the net message
2bf_read buffer
the buffer containing the message content

Example

util.AddNetworkString("Example") hook.Add("HolyLib:OnSourceTVNetMessage", "Example", function(client, bf) local name = util.NetworkIDToString(bf:ReadShort())) -- Reads the header print(name, bf:ReadString()) end) ---- Client net.Start("Example") net.WriteString("Hello World from CHLTVClient"); net.SendToServer()