CSave::WriteString
0x004a8300 · 151 bytes · __thiscall
_ZN5CSave11WriteStringEPKcPK8string_ti
Decompiled
undefined (4 params)
/* CSave::WriteString(char const*, string_t const*, int) */
void __thiscall CSave::WriteString(CSave *this,char *param_1,string_t *param_2,int param_3)
{
string_t *psVar1;
char *__s;
size_t sVar2;
int iVar3;
if (param_3 < 1) {
iVar3 = 0;
}
else {
psVar1 = param_2 + param_3 * 4;
iVar3 = 0;
do {
while (__s = *(char **)param_2, __s != (char *)0x0) {
param_2 = param_2 + 4;
sVar2 = strlen(__s);
iVar3 = iVar3 + 1 + sVar2;
if (param_2 == psVar1) goto LAB_004a8360;
}
param_2 = param_2 + 4;
iVar3 = iVar3 + 1;
} while (param_2 != psVar1);
}
LAB_004a8360:
WriteHeader(this,param_1,iVar3);
/* WARNING: Could not recover jumptable at 0x004a8391. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(int *)this + 0x40))();
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.