CCommand::FindArg
0x00b6aa10 · 109 bytes · __thiscall
_ZNK8CCommand7FindArgEPKc
Decompiled
undefined (2 params)
/* CCommand::FindArg(char const*) const */
undefined1 * __thiscall CCommand::FindArg(CCommand *this,char *param_1)
{
int iVar1;
char *pcVar2;
int iVar3;
int iVar4;
iVar4 = 1;
iVar1 = *(int *)this;
if (1 < iVar1) {
do {
pcVar2 = "";
if (iVar4 < *(int *)this) {
pcVar2 = *(char **)(this + iVar4 * 4 + 0x408);
}
iVar3 = _V_stricmp(pcVar2,param_1);
if (iVar3 == 0) {
if (iVar1 <= iVar4 + 1) {
return &DAT_00d539c2;
}
if (*(int *)this <= iVar4 + 1) {
return &DAT_00d539c2;
}
return *(undefined1 **)(this + iVar4 * 4 + 0x40c);
}
iVar4 = iVar4 + 1;
} while (iVar4 != iVar1);
}
return (undefined1 *)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.