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 intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.