GCSDK::SQLTypeFromField
0x00090810 · 302 bytes · __cdecl
_ZN5GCSDK16SQLTypeFromFieldERKNS_11CColumnInfoEPci
Decompiled
undefined (3 params)
/* GCSDK::SQLTypeFromField(GCSDK::CColumnInfo const&, char*, int) */
char * GCSDK::SQLTypeFromField(CColumnInfo *param_1,char *param_2,int param_3)
{
undefined4 uVar1;
uVar1 = *(undefined4 *)(param_1 + 0x84);
*param_2 = '\0';
switch(uVar1) {
case 0:
V_snprintf(param_2,param_3,"VARBINARY(%d)",*(undefined4 *)(param_1 + 0x94));
return param_2;
case 1:
V_snprintf(param_2,param_3,"VARCHAR(%d)",*(undefined4 *)(param_1 + 0x94));
return param_2;
case 2:
V_strncpy(param_2,"TINYINT",param_3);
break;
case 3:
V_strncpy(param_2,"SMALLINT",param_3);
return param_2;
case 4:
V_strncpy(param_2,"INT",param_3);
return param_2;
case 5:
V_strncpy(param_2,"BIGINT",param_3);
return param_2;
case 6:
V_strncpy(param_2,"REAL",param_3);
return param_2;
case 7:
V_strncpy(param_2,"FLOAT",param_3);
return param_2;
}
return param_2;
}
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.