L L4D2node

CDirector::RunSingleScript

0x0087dc10 · 115 bytes · __thiscall

_ZN9CDirector15RunSingleScriptEPKcNS_14ScriptLevels_tE

Decompiled

undefined (3 params)

/* CDirector::RunSingleScript(char const*, CDirector::ScriptLevels_t) */

undefined4 __thiscall CDirector::RunSingleScript(CDirector *this,char *param_1,int param_3)

{
  HSCRIPT__ *pHVar1;
  undefined4 uVar2;
  
  UTIL_LogPrintf("CDirector::RunSingleScript, %s, level: %d\n",param_1,param_3);
  if (*(int *)(this + 0x488) == -1) {
    (**(code **)(*(int *)this + 0x48))(this);
  }
  pHVar1 = (HSCRIPT__ *)0x0;
  if (*(HSCRIPT__ **)(this + param_3 * 0xc + 0x488) != (HSCRIPT__ *)&DAT_ffffffff) {
    pHVar1 = *(HSCRIPT__ **)(this + param_3 * 0xc + 0x488);
  }
  uVar2 = VScriptServerRunScript(param_1,pHVar1,true);
  PostRunScript(this);
  return uVar2;
}

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)