L L4D2node

EventList_RegisterSharedEvent

0x0044c560 · 111 bytes · __cdecl

_Z29EventList_RegisterSharedEventPKcii

Decompiled

undefined (3 params)

/* EventList_RegisterSharedEvent(char const*, int, int) */

undefined4 EventList_RegisterSharedEvent(char *param_1,int param_2,int param_3)

{
  int iVar1;
  undefined4 uVar2;
  int *piVar3;
  
  iVar1 = ListFromString(param_1);
  uVar2 = 0;
  if (iVar1 == 0) {
    if (DAT_00f7a01c < 1) {
LAB_0044c5ae:
      EventList_AddEventEntry(param_1,param_2,false,param_3);
      uVar2 = 1;
    }
    else if (param_2 != *g_EventList) {
      iVar1 = 0;
      piVar3 = g_EventList;
      do {
        iVar1 = iVar1 + 1;
        if (iVar1 == DAT_00f7a01c) goto LAB_0044c5ae;
        piVar3 = piVar3 + 3;
      } while (param_2 != *piVar3);
      uVar2 = 0;
    }
  }
  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)