nm:IsNull():booleanWhether the message wrapper is null.
Network messages sent through the net channel — hook them with callbacks.SendNetMsg.
nm:IsNull():booleanWhether the message wrapper is null.
nm:GetType():numberMessage type constant.
nm:GetName():stringMessage name string.
nm:GetGroup():numberMessage group constant.
Messages that flow through callbacks.Register("SendNetMsg", fn). Outgoing client→server messages are always delivered; incoming server→client (svc_*) messages also appear on local/listen servers.
SendNetMsg fires for every packet, so filter to the interesting ones.
local interesting = {
clc_VoiceData = true,
clc_CmdKeyValues = true,
net_StringCmd = true,
}
callbacks.Register("SendNetMsg", function(msg)
local name = msg:GetName()
if interesting[name] then
print(string.format("sent %s (type %d, group %d)", name, msg:GetType(), msg:GetGroup()))
end
end)