L L4D2node

CGameText::KeyValue

0x006f1f10 · 242 bytes · __thiscall

_ZN9CGameText8KeyValueEPKcS1_

Decompiled

undefined (3 params)

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

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

{
  int iVar1;
  undefined4 uVar2;
  CGameText local_2c [4];
  CGameText local_28;
  CGameText local_24;
  CGameText local_20;
  
  if (param_1 != "color") {
    iVar1 = _V_stricmp(param_1,"color");
    if (iVar1 != 0) {
      if (param_1 != "color2") {
        iVar1 = _V_stricmp(param_1,"color2");
        if (iVar1 != 0) {
          uVar2 = CBaseEntity::KeyValue((CBaseEntity *)this,param_1,param_2);
          return uVar2;
        }
      }
      V_StringToIntArray((int *)local_2c,4,param_2);
      this[0x45c] = local_2c[0];
      this[0x45d] = local_28;
      this[0x45e] = local_24;
      this[0x45f] = local_20;
      return 1;
    }
  }
  V_StringToIntArray((int *)local_2c,4,param_2);
  this[0x458] = local_2c[0];
  this[0x459] = local_28;
  this[0x45a] = local_24;
  this[0x45b] = local_20;
  return 1;
}

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)