L L4D2node

CDirector::GetScriptValue

0x0087d6c0 · 172 bytes · __thiscall

_ZN9CDirector14GetScriptValueEPKcS1_Pci

Decompiled

undefined (5 params)

/* CDirector::GetScriptValue(char const*, char const*, char*, int) */

char * __thiscall
CDirector::GetScriptValue(CDirector *this,char *param_1,char *param_2,char *param_3,int param_4)

{
  char cVar1;
  char *local_28 [2];
  undefined2 local_20;
  ushort local_1e;
  
  if ((*(int *)(this + 0x4b8) != -1) && (g_pScriptVM != (int *)0x0)) {
    local_28[0] = (char *)0x0;
    local_1e = 0;
    local_20 = 0;
                    /* try { // try from 0087d70d to 0087d743 has its CatchHandler @ 0087d775 */
    cVar1 = (**(code **)(*g_pScriptVM + 0x90))(g_pScriptVM,*(int *)(this + 0x4b8),param_1,local_28);
    if (cVar1 != '\0') {
      V_strncpy(param_3,local_28[0],param_4);
      (**(code **)(*g_pScriptVM + 0x9c))(g_pScriptVM,local_28);
      param_2 = param_3;
    }
    if ((local_1e & 1) != 0) {
      free(local_28[0]);
      return param_2;
    }
  }
  return param_2;
}

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)