mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-07-05 08:59:32 +03:00
added get_event_state native
added get_event_state native
This commit is contained in:
parent
92e78f7ca5
commit
8da905fbfa
@ -1937,6 +1937,19 @@ static cell AMX_NATIVE_CALL disable_event(AMX *amx, cell *params)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static cell AMX_NATIVE_CALL get_event_state(AMX *amx, cell *params)
|
||||
{
|
||||
auto handle = EventHandles.lookup(params[1]);
|
||||
|
||||
if (!handle)
|
||||
{
|
||||
LogError(amx, AMX_ERR_NATIVE, "Invalid event handle: %d", params[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return handle->m_event->getForwardState() == FSTATE_ACTIVE ? 1 : 0;
|
||||
}
|
||||
|
||||
static cell AMX_NATIVE_CALL user_kill(AMX *amx, cell *params) /* 2 param */
|
||||
{
|
||||
int index = params[1];
|
||||
|
Loading…
x
Reference in New Issue
Block a user