Host_GetHostInfo
0x0017a070 · 106 bytes · __cdecl
_Z16Host_GetHostInfoPfPiS0_Pci
Decompiled
undefined (5 params)
/* Host_GetHostInfo(float*, int*, int*, char*, int) */
void Host_GetHostInfo(float *param_1,int *param_2,int *param_3,char *param_4,int param_5)
{
int iVar1;
iVar1 = CBaseServer::GetNumClients((CBaseServer *)&sv);
*param_1 = g_fFramesPerSecond;
*param_2 = iVar1;
if (param_4 != (char *)0x0) {
if (DAT_003b7f70 == '\0') {
*param_4 = '\0';
}
else {
V_strncpy(param_4,&DAT_003b7f70,param_5);
}
}
iVar1 = CBaseServer::GetMaxClients((CBaseServer *)&sv);
*param_3 = iVar1;
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.