L L4D2node

Test_CreateEntity

0x00af2bd0 · 101 bytes · __cdecl

_Z17Test_CreateEntityRK8CCommand

Decompiled

undefined (1 param)

/* Test_CreateEntity(CCommand const&) */

void Test_CreateEntity(CCommand *param_1)

{
  int iVar1;
  char *pcVar2;
  
  if (*(int *)param_1 < 2) {
    Error("Test_CreateEntity: requires entity classname argument.");
    if (*(int *)param_1 < 2) {
      pcVar2 = "";
      goto LAB_00af2be5;
    }
  }
  pcVar2 = *(char **)(param_1 + 0x40c);
LAB_00af2be5:
  iVar1 = CreateEntityByName(pcVar2,-1,true);
  if (iVar1 != 0) {
    return;
  }
  Error("Test_CreateEntity( %s ) failed.",pcVar2);
  return;
}

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)