PacketErrorMessage
0x001c1ec0 · 136 bytes · __regparm3
_ZL18PacketErrorMessage16ePacketErrorTypePKc
Decompiled
undefined (2 params)
/* PacketErrorMessage(ePacketErrorType, char const*) */
void __regparm3 PacketErrorMessage(int param_1,undefined4 param_2)
{
code *pcVar1;
undefined4 uVar2;
longdouble lVar3;
*(int *)(PacketErrorMessage(ePacketErrorType,char_const*)::nMsgCount + param_1 * 4) =
*(int *)(PacketErrorMessage(ePacketErrorType,char_const*)::nMsgCount + param_1 * 4) + 1;
lVar3 = (longdouble)Plat_FloatTime();
if (0.5 < (double)lVar3 -
*(double *)
(PacketErrorMessage(ePacketErrorType,char_const*)::flLastMsgTime + param_1 * 8)) {
pcVar1 = *(code **)(*(int *)g_pVEngineServer + 0x124);
uVar2 = va("(%d reports) %s",
*(undefined4 *)
(PacketErrorMessage(ePacketErrorType,char_const*)::nMsgCount + param_1 * 4),param_2)
;
(*pcVar1)(g_pVEngineServer,uVar2);
*(undefined4 *)(PacketErrorMessage(ePacketErrorType,char_const*)::nMsgCount + param_1 * 4) = 0;
*(double *)(PacketErrorMessage(ePacketErrorType,char_const*)::flLastMsgTime + param_1 * 8) =
(double)lVar3;
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.