L L4D2node

CBaseEntity::CallScriptFunction

0x0060f060 · 197 bytes · __thiscall

_ZN11CBaseEntity18CallScriptFunctionEPKcP12CVariantBaseI24CVariantDefaultAllocatorEb

Decompiled

undefined (4 params)

/* CBaseEntity::CallScriptFunction(char const*, CVariantBase<CVariantDefaultAllocator>*, bool) */

undefined4 __thiscall
CBaseEntity::CallScriptFunction(CBaseEntity *this,char *param_1,CVariantBase *param_2,bool param_3)

{
  undefined4 uVar1;
  int iVar2;
  
  uVar1 = ValidateScriptScope(this);
  if ((char)uVar1 == '\0') {
    DevMsg("\n***\nFAILED to create private ScriptScope. ABORTING script\n***\n");
    return uVar1;
  }
  iVar2 = (**(code **)(*g_pScriptVM + 0x48))
                    (g_pScriptVM,param_1,*(undefined4 *)(this + 1000),param_3);
  if (iVar2 != 0) {
    (**(code **)(*g_pScriptVM + 0x50))(g_pScriptVM,iVar2,0,0,param_2,*(undefined4 *)(this + 1000),1)
    ;
    (**(code **)(*g_pScriptVM + 0x4c))(g_pScriptVM,iVar2);
    return uVar1;
  }
  return 0;
}

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)