CBaseClient::GetUserSetting
0x000f81a0 · 149 bytes · __thiscall
_ZNK11CBaseClient14GetUserSettingEPKc
Decompiled
undefined (2 params)
/* CBaseClient::GetUserSetting(char const*) const */
char * __thiscall CBaseClient::GetUserSetting(CBaseClient *this,char *param_1)
{
char *pcVar1;
int iVar2;
pcVar1 = "";
if (((*(KeyValues **)(this + 0xb0) != (KeyValues *)0x0) && (param_1 != (char *)0x0)) &&
(*param_1 != '\0')) {
pcVar1 = (char *)KeyValues::GetString(*(KeyValues **)(this + 0xb0),param_1,"");
if (*pcVar1 == '\0') {
if (this[0x10] != (CBaseClient)0x0) {
/* WARNING: Could not recover jumptable at 0x000f8235. Too many branches */
/* WARNING: Treating indirect jump as call */
pcVar1 = (char *)(**(code **)(**(int **)(this + 0x28) + 0x28))();
return pcVar1;
}
iVar2 = KeyValues::GetDataType(*(KeyValues **)(this + 0xb0),param_1);
if (iVar2 == 0) {
DevMsg("GetUserSetting: cvar \'%s\' unknown.\n",param_1);
}
}
}
return pcVar1;
}
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.