L L4D2node

CCommand::FindArg

0x0003eac0 · 109 bytes · __thiscall

_ZNK8CCommand7FindArgEPKc

Decompiled

undefined (2 params)

/* CCommand::FindArg(char const*) const */

undefined * __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_000b2b65;
        }
        if (*(int *)this <= iVar4 + 1) {
          return &DAT_000b2b65;
        }
        return *(undefined **)(this + iVar4 * 4 + 0x40c);
      }
      iVar4 = iVar4 + 1;
    } while (iVar4 != iVar1);
  }
  return (undefined *)0x0;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)