L L4D2node

CBaseEntity::KeyValue

0x0040d770 · 151 bytes · __thiscall

_ZN11CBaseEntity8KeyValueEPKcRK6Vector

Decompiled

undefined (3 params)

/* CBaseEntity::KeyValue(char const*, Vector const&) */

void __thiscall CBaseEntity::KeyValue(CBaseEntity *this,char *param_1,Vector *param_2)

{
  int in_GS_OFFSET;
  char local_120 [256];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  V_snprintf(local_120,0x100,"%f %f %f",(double)*(float *)param_2,(double)*(float *)(param_2 + 4),
             (double)*(float *)(param_2 + 8));
  (**(code **)(*(int *)this + 0x84))(this,param_1,local_120);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* 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)