GCSDK::BuildInsertStatementText
0x00090e10 · 291 bytes · __cdecl
_ZN5GCSDK24BuildInsertStatementTextEP8CFmtStrNILi1024EEPKNS_11CRecordInfoE
Decompiled
undefined (2 params)
/* GCSDK::BuildInsertStatementText(CFmtStrN<1024>*, GCSDK::CRecordInfo const*) */
void GCSDK::BuildInsertStatementText(CFmtStrN *param_1,CRecordInfo *param_2)
{
int iVar1;
bool bVar2;
char *pcVar3;
int iVar4;
CFmtStrN<1024>::sprintf((CFmtStrN<1024> *)param_1,"INSERT INTO %s (",param_2 + 8);
iVar1 = *(int *)(param_2 + 0x9c);
if (iVar1 < 1) {
CFmtStrN<1024>::AppendFormat((CFmtStrN<1024> *)param_1,") VALUES (");
}
else {
iVar4 = 0;
bVar2 = false;
do {
pcVar3 = (char *)(iVar4 * 0xa0 + *(int *)(param_2 + 0x90));
if ((pcVar3[0x88] & 8U) == 0) {
if (bVar2) {
CFmtStrN<1024>::AppendFormat((CFmtStrN<1024> *)param_1,", ");
}
CFmtStrN<1024>::AppendFormat((CFmtStrN<1024> *)param_1,pcVar3);
bVar2 = true;
}
iVar4 = iVar4 + 1;
} while (iVar4 != iVar1);
CFmtStrN<1024>::AppendFormat((CFmtStrN<1024> *)param_1,") VALUES (");
iVar4 = 0;
bVar2 = false;
do {
if ((*(byte *)(iVar4 * 0xa0 + *(int *)(param_2 + 0x90) + 0x88) & 8) == 0) {
if (bVar2) {
CFmtStrN<1024>::AppendFormat((CFmtStrN<1024> *)param_1,", ");
}
CFmtStrN<1024>::AppendFormat((CFmtStrN<1024> *)param_1,"?");
bVar2 = true;
}
iVar4 = iVar4 + 1;
} while (iVar4 != iVar1);
}
CFmtStrN<1024>::AppendFormat((CFmtStrN<1024> *)param_1,")");
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.