L L4D2node

DoIncludeScript

0x00b47460 · 96 bytes · __cdecl

_Z15DoIncludeScriptPKcP9HSCRIPT__

Decompiled

undefined (2 params)

/* DoIncludeScript(char const*, HSCRIPT__*) */

undefined4 DoIncludeScript(char *param_1,HSCRIPT__ *param_2)

{
  undefined4 uVar1;
  char *pcVar2;
  undefined8 uVar3;
  
  uVar3 = VScriptServerRunScript(param_1,param_2,true);
  if ((char)uVar3 == '\0') {
    if (g_ScriptLastCompileScriptMissing == '\0') {
      uVar1 = DoIncludeScript(param_1,(HSCRIPT__ *)((ulonglong)uVar3 >> 0x20));
      return uVar1;
    }
    pcVar2 = "unknown";
    if (param_1 != (char *)0x0) {
      pcVar2 = param_1;
    }
    DevMsg("IncludeScript Warning - Script %s either missing or empty\n",pcVar2);
  }
  return (int)uVar3;
}

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)