L L4D2node

EventList_RegisterPrivateEvent

0x0044c5e0 · 91 bytes · __cdecl

_Z30EventList_RegisterPrivateEventPKc

Decompiled

undefined (1 param)

/* EventList_RegisterPrivateEvent(char const*) */

undefined4 EventList_RegisterPrivateEvent(char *param_1)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  
  puVar1 = (undefined4 *)ListFromString(param_1);
  if (puVar1 == (undefined4 *)0x0) {
    puVar1 = (undefined4 *)EventList_AddEventEntry(param_1,g_HighestEvent + 1,true,1);
    uVar2 = *puVar1;
  }
  else {
    if (*(short *)((int)puVar1 + 10) == 0) {
      Warning("***\nShared<->Private Event collision!\n***\n");
      return 0xffffffff;
    }
    uVar2 = *puVar1;
  }
  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)