CSave::WriteString
0x004a7ef0 · 90 bytes · __thiscall
_ZN5CSave11WriteStringEPK8string_ti
Decompiled
undefined (3 params)
/* CSave::WriteString(string_t const*, int) */
void __thiscall CSave::WriteString(CSave *this,string_t *param_1,int param_2)
{
size_t sVar1;
int iVar2;
char *__s;
int iVar3;
iVar3 = 0;
if (0 < param_2) {
do {
__s = *(char **)(param_1 + iVar3 * 4);
if (__s == (char *)0x0) {
iVar2 = 1;
__s = "";
}
else {
sVar1 = strlen(__s);
iVar2 = sVar1 + 1;
}
iVar3 = iVar3 + 1;
BufferData(this,__s,iVar2);
} while (iVar3 != param_2);
}
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.