CBaseServer::GetPlayerInfo
0x00107ed0 · 288 bytes · __thiscall
_ZN11CBaseServer13GetPlayerInfoEiP13player_info_s
Decompiled
undefined (3 params)
/* CBaseServer::GetPlayerInfo(int, player_info_s*) */
undefined4 __thiscall
CBaseServer::GetPlayerInfo(CBaseServer *this,int param_1,player_info_s *param_2)
{
int *piVar1;
int iVar2;
void *pvVar3;
int *piVar4;
CByteswap local_20 [16];
if (param_2 == (player_info_s *)0x0) {
return 0;
}
if (-1 < param_1) {
piVar4 = *(int **)(this + 200);
if ((piVar4 == (int *)0x0) && (piVar1 = *(int **)(this + 0xbc), piVar1 != (int *)0x0)) {
piVar4 = (int *)(**(code **)(*piVar1 + 0x10))(piVar1,"userinfo");
*(int **)(this + 200) = piVar4;
}
iVar2 = (**(code **)(*piVar4 + 0x10))(piVar4);
if (param_1 < iVar2) {
piVar4 = *(int **)(this + 200);
if ((piVar4 == (int *)0x0) && (piVar1 = *(int **)(this + 0xbc), piVar1 != (int *)0x0)) {
piVar4 = (int *)(**(code **)(*piVar1 + 0x10))(piVar1,"userinfo");
*(int **)(this + 200) = piVar4;
}
pvVar3 = (void *)(**(code **)(*piVar4 + 0x30))(piVar4,param_1,0);
if (pvVar3 != (void *)0x0) {
_V_memcpy(param_2,pvVar3,0x8c);
local_20[0] = (CByteswap)((byte)local_20[0] | 3);
CByteswap::SwapFieldsToTargetEndian
(local_20,param_2,param_2,(datamap_t *)player_info_s::m_DataMap);
return 1;
}
}
}
_V_memset(param_2,0,0x8c);
return 0;
}
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.