L L4D2node

CGamePlayerEquip::KeyValue

0x006f2060 · 257 bytes · __thiscall

_ZN16CGamePlayerEquip8KeyValueEPKcS1_

Decompiled

undefined (3 params)

/* CGamePlayerEquip::KeyValue(char const*, char const*) */

undefined4 __thiscall CGamePlayerEquip::KeyValue(CGamePlayerEquip *this,char *param_1,char *param_2)

{
  undefined4 uVar1;
  long lVar2;
  long lVar3;
  int iVar4;
  int in_GS_OFFSET;
  undefined4 local_b0 [4];
  char local_a0 [128];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  uVar1 = CBaseEntity::KeyValue((CBaseEntity *)this,param_1,param_2);
  if ((char)uVar1 == '\0') {
    iVar4 = 0;
    do {
      if (*(int *)(this + iVar4 * 4 + 0x448) == 0) {
        UTIL_StripToken(param_1,local_a0,0x80);
        AllocPooledString((char *)local_b0);
        *(undefined4 *)(this + (iVar4 + 0x110) * 4 + 8) = local_b0[0];
        lVar2 = strtol(param_2,(char **)0x0,10);
        lVar3 = 1;
        if (0 < lVar2) {
          lVar3 = lVar2;
        }
        uVar1 = 1;
        *(long *)(this + iVar4 * 4 + 0x4c8) = lVar3;
        break;
      }
      iVar4 = iVar4 + 1;
    } while (iVar4 != 0x20);
  }
  else {
    uVar1 = 0;
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)