IToolkitNetworkMessages
IToolkitNetworkMessages
Methods
void* AllocateNetMessageByID(msgid)
Allocates a network message by its numeric ID.
- msgid int — Message ID.
void* AllocateNetMessageByPartialName(name)
Allocates a network message by a partial name match.
- name const char* — Partial name string (e.g. "CSVCMsg_UserMessage").
DeallocateNetMessage(msg)
Deallocates a previously allocated network message.
- msg void* — Message pointer returned by Allocate*.
bool HasField(msg, fieldName)
Returns true if a singular field is set on the message.
- msg void*
- fieldName const char*
int GetInt32(msg, fieldName)
- msg void*
- fieldName const char*
int GetRepeatedInt32(msg, fieldName, index)
- msg void*
- fieldName const char*
- index int
SetInt32(msg, fieldName, value)
- msg void*
- fieldName const char*
- value int
SetRepeatedInt32(msg, fieldName, index, value)
- msg void*
- fieldName const char*
- index int
- value int
AddInt32(msg, fieldName, value)
- msg void*
- fieldName const char*
- value int
int64_t GetInt64(msg, fieldName)
- msg void*
- fieldName const char*
int64_t GetRepeatedInt64(msg, fieldName, index)
- msg void*
- fieldName const char*
- index int
SetInt64(msg, fieldName, value)
- msg void*
- fieldName const char*
- value int64_t
SetRepeatedInt64(msg, fieldName, index, value)
- msg void*
- fieldName const char*
- index int
- value int64_t
AddInt64(msg, fieldName, value)
- msg void*
- fieldName const char*
- value int64_t
uint32_t GetUInt32(msg, fieldName)
- msg void*
- fieldName const char*
uint32_t GetRepeatedUInt32(msg, fieldName, index)
- msg void*
- fieldName const char*
- index int
SetUInt32(msg, fieldName, value)
- msg void*
- fieldName const char*
- value uint32_t
SetRepeatedUInt32(msg, fieldName, index, value)
- msg void*
- fieldName const char*
- index int
- value uint32_t
AddUInt32(msg, fieldName, value)
- msg void*
- fieldName const char*
- value uint32_t
uint64_t GetUInt64(msg, fieldName)
- msg void*
- fieldName const char*
uint64_t GetRepeatedUInt64(msg, fieldName, index)
- msg void*
- fieldName const char*
- index int
SetUInt64(msg, fieldName, value)
- msg void*
- fieldName const char*
- value uint64_t
SetRepeatedUInt64(msg, fieldName, index, value)
- msg void*
- fieldName const char*
- index int
- value uint64_t
AddUInt64(msg, fieldName, value)
- msg void*
- fieldName const char*
- value uint64_t
bool GetBool(msg, fieldName)
- msg void*
- fieldName const char*
bool GetRepeatedBool(msg, fieldName, index)
- msg void*
- fieldName const char*
- index int
SetBool(msg, fieldName, value)
- msg void*
- fieldName const char*
- value bool
SetRepeatedBool(msg, fieldName, index, value)
- msg void*
- fieldName const char*
- index int
- value bool
AddBool(msg, fieldName, value)
- msg void*
- fieldName const char*
- value bool
float GetFloat(msg, fieldName)
- msg void*
- fieldName const char*
float GetRepeatedFloat(msg, fieldName, index)
- msg void*
- fieldName const char*
- index int
SetFloat(msg, fieldName, value)
- msg void*
- fieldName const char*
- value float
SetRepeatedFloat(msg, fieldName, index, value)
- msg void*
- fieldName const char*
- index int
- value float
AddFloat(msg, fieldName, value)
- msg void*
- fieldName const char*
- value float
double GetDouble(msg, fieldName)
- msg void*
- fieldName const char*
double GetRepeatedDouble(msg, fieldName, index)
- msg void*
- fieldName const char*
- index int
SetDouble(msg, fieldName, value)
- msg void*
- fieldName const char*
- value double
SetRepeatedDouble(msg, fieldName, index, value)
- msg void*
- fieldName const char*
- index int
- value double
AddDouble(msg, fieldName, value)
- msg void*
- fieldName const char*
- value double
std::string GetString(msg, fieldName)
- msg void*
- fieldName const char*
std::string GetRepeatedString(msg, fieldName, index)
- msg void*
- fieldName const char*
- index int
SetString(msg, fieldName, value)
- msg void*
- fieldName const char*
- value const char*
SetRepeatedString(msg, fieldName, index, value)
- msg void*
- fieldName const char*
- index int
- value const char*
AddString(msg, fieldName, value)
- msg void*
- fieldName const char*
- value const char*
Vector2D GetVector2D(msg, fieldName)
- msg void*
- fieldName const char*
Vector2D GetRepeatedVector2D(msg, fieldName, index)
- msg void*
- fieldName const char*
- index int
SetVector2D(msg, fieldName, value)
- msg void*
- fieldName const char*
- value Vector2D
SetRepeatedVector2D(msg, fieldName, index, value)
- msg void*
- fieldName const char*
- index int
- value Vector2D
AddVector2D(msg, fieldName, value)
- msg void*
- fieldName const char*
- value Vector2D
Vector GetVector(msg, fieldName)
- msg void*
- fieldName const char*
Vector GetRepeatedVector(msg, fieldName, index)
- msg void*
- fieldName const char*
- index int
SetVector(msg, fieldName, value)
- msg void*
- fieldName const char*
- value Vector
SetRepeatedVector(msg, fieldName, index, value)
- msg void*
- fieldName const char*
- index int
- value Vector
AddVector(msg, fieldName, value)
- msg void*
- fieldName const char*
- value Vector
Color GetColor(msg, fieldName)
- msg void*
- fieldName const char*
Color GetRepeatedColor(msg, fieldName, index)
- msg void*
- fieldName const char*
- index int
SetColor(msg, fieldName, value)
- msg void*
- fieldName const char*
- value Color
SetRepeatedColor(msg, fieldName, index, value)
- msg void*
- fieldName const char*
- index int
- value Color
AddColor(msg, fieldName, value)
- msg void*
- fieldName const char*
- value Color
QAngle GetQAngle(msg, fieldName)
- msg void*
- fieldName const char*
QAngle GetRepeatedQAngle(msg, fieldName, index)
- msg void*
- fieldName const char*
- index int
SetQAngle(msg, fieldName, value)
- msg void*
- fieldName const char*
- value QAngle
SetRepeatedQAngle(msg, fieldName, index, value)
- msg void*
- fieldName const char*
- index int
- value QAngle
AddQAngle(msg, fieldName, value)
- msg void*
- fieldName const char*
- value QAngle
int GetBytes(out, msg, fieldName)
Copies a bytes field into @p out.
- out uint8_t*
- msg void*
- fieldName const char*
int GetRepeatedBytes(out, msg, fieldName, index)
- out uint8_t*
- msg void*
- fieldName const char*
- index int
SetBytes(msg, fieldName, value, valueLength)
- msg void*
- fieldName const char*
- value const char*
- valueLength int
SetRepeatedBytes(msg, fieldName, index, value, valueLength)
- msg void*
- fieldName const char*
- index int
- value const char*
- valueLength int
AddBytes(msg, fieldName, value, valueLength)
- msg void*
- fieldName const char*
- value const char*
- valueLength int
void* GetNestedMessage(msg, fieldName)
Returns a mutable pointer to a singular nested message field.
- msg void*
- fieldName const char*
void* GetRepeatedNestedMessage(msg, fieldName, index)
Returns a mutable pointer to a repeated nested message element.
- msg void*
- fieldName const char*
- index int
void* AddNestedMessage(msg, fieldName)
Appends a new element to a repeated nested message field and returns it.
- msg void*
- fieldName const char*
int GetRepeatedFieldSize(msg, fieldName)
- msg void*
- fieldName const char*
ClearRepeatedField(msg, fieldName)
- msg void*
- fieldName const char*
Clear(msg)
Clears all fields on the message.
- msg void*
SendMessage(msg, msgid, slot)
Sends a network message to a single player.
- msg void* — Allocated message to send (not freed by this call).
- msgid int — Message ID matching the allocation.
- slot CPlayerSlot
SendMessageToPlayers(msg, msgid, playermask)
Sends a network message to a set of players.
- msg void* — Allocated message to send (not freed by this call).
- msgid int — Message ID matching the allocation.
- playermask uint64_t — 64-bit bitmask; bit N = slot N.
HookServerMessage(owner, handler)
Hooks outgoing server-to-client messages.
- owner PluginId — Plugin ID that owns the hook
- handler NetMessageServerHook — Callback, or nullptr to unhook
UnhookServerMessage(owner)
Drops this plugin's outgoing-message hook.
- owner PluginId
HookClientMessage(owner, handler)
Hooks incoming client-to-server messages.
- owner PluginId
- handler NetMessageClientHook
UnhookClientMessage(owner)
Drops this plugin's incoming-message hook.
- owner PluginId
HookServerInternalMessage(owner, handler)
Hooks internal server-side message sends (per-client).
- owner PluginId
- handler NetMessageClientHook
UnhookServerInternalMessage(owner)
Drops this plugin's internal-send hook.
- owner PluginId