L L4D2node

CTestScriptMgr::StartTestScript

0x00219bd0 · 186 bytes · __thiscall

_ZN14CTestScriptMgr15StartTestScriptEPKc

Decompiled

undefined (2 params)

/* CTestScriptMgr::StartTestScript(char const*) */

bool __thiscall CTestScriptMgr::StartTestScript(CTestScriptMgr *this,char *param_1)

{
  int iVar1;
  int in_GS_OFFSET;
  char local_210 [512];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (*(int *)(this + 4) != 0) {
    (**(code **)(*(int *)(g_pFileSystem + 4) + 0xc))(g_pFileSystem + 4,*(int *)(this + 4));
    *(undefined4 *)(this + 4) = 0;
  }
  V_snprintf(local_210,0x200,"testscripts\\%s",param_1);
  iVar1 = (**(code **)(*(int *)(g_pFileSystem + 4) + 8))(g_pFileSystem + 4,local_210,"rt",0);
  *(int *)(this + 4) = iVar1;
  if (iVar1 != 0) {
    RunCommands(this);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar1 != 0;
  }
                    /* 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)