2015-01-14 20:44:32 +00:00
|
|
|
/*
|
|
|
|
* Author: Nou
|
|
|
|
*
|
|
|
|
* Remove all events of a certain event type.
|
|
|
|
*
|
|
|
|
* Argument:
|
|
|
|
* 0: Event name (string)
|
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* Nothing
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
2015-05-14 18:06:06 +00:00
|
|
|
private ["_eventNames", "_eventFunctions", "_eventIndex"];
|
|
|
|
PARAMS_1(_eventName);
|
2015-01-14 20:44:32 +00:00
|
|
|
|
2015-01-14 20:55:44 +00:00
|
|
|
_eventNames = GVAR(events) select 0;
|
2015-01-14 20:44:32 +00:00
|
|
|
_eventFunctions = [];
|
|
|
|
_eventIndex = _eventNames find _eventName;
|
2015-05-14 18:06:06 +00:00
|
|
|
if (_eventIndex != -1) then {
|
|
|
|
(GVAR(events) select 1) set [_eventIndex, []];
|
2015-01-14 20:44:32 +00:00
|
|
|
};
|