MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / sm_CreateEvent

Function sm_CreateEvent

core/smn_events.cpp:106–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106static cell_t sm_CreateEvent(IPluginContext *pContext, const cell_t *params)
107{
108 char *name;
109 EventInfo *pInfo;
110
111 pContext->LocalToString(params[1], &name);
112
113 pInfo = g_EventManager.CreateEvent(pContext, name, params[2] ? true : false);
114
115 if (pInfo)
116 {
117 return handlesys->CreateHandle(g_EventManager.GetHandleType(), pInfo, pContext->GetIdentity(), g_pCoreIdent, NULL);
118 }
119
120 return BAD_HANDLE;
121}
122
123static cell_t sm_FireEvent(IPluginContext *pContext, const cell_t *params)
124{

Callers

nothing calls this directly

Calls 4

CreateEventMethod · 0.80
GetHandleTypeMethod · 0.80
CreateHandleMethod · 0.45
GetIdentityMethod · 0.45

Tested by

no test coverage detected