SetGameModeConvar
0x00502d40 · 100 bytes · __regparm3
_ZL17SetGameModeConvarPKcS0_S0_.part.18
Decompiled
undefined (3 params)
/* SetGameModeConvar(char const*, char const*, char const*) [clone .part.18] */
void __regparm3 SetGameModeConvar(char *param_1,char *param_2,char *param_3)
{
char cVar1;
undefined4 *local_24 [5];
ConVarRef::ConVarRef((ConVarRef *)local_24,param_2);
cVar1 = ConVarRef::IsValid((ConVarRef *)local_24);
if (cVar1 != '\0') {
(**(code **)*local_24[0])(local_24[0],param_3);
DevMsg(2,"%s setting %s to %s\n",param_1,param_2,param_3);
}
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.