FindLaunchOptionByValue
0x006c4fa0 · 127 bytes · __regparm3
_ZL23FindLaunchOptionByValueP9KeyValuesPKc
Decompiled
undefined (2 params)
/* FindLaunchOptionByValue(KeyValues*, char const*) */
KeyValues * __regparm3 FindLaunchOptionByValue(KeyValues *param_1,char *param_2)
{
KeyValues *this;
char *pcVar1;
int iVar2;
if (param_1 == (KeyValues *)0x0) {
return (KeyValues *)0x0;
}
if ((param_2 != (char *)0x0) && (*param_2 != '\0')) {
for (this = (KeyValues *)KeyValues::GetFirstSubKey(param_1); this != (KeyValues *)0x0;
this = (KeyValues *)KeyValues::GetNextKey(this)) {
pcVar1 = (char *)KeyValues::GetString(this,(char *)0x0,"");
if (((pcVar1 != (char *)0x0) && (*pcVar1 != '\0')) &&
(iVar2 = _V_stricmp(pcVar1,param_2), iVar2 == 0)) {
return this;
}
}
}
return (KeyValues *)0x0;
}
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.