2015-04-17 17:21:41 +00:00
|
|
|
/*
|
|
|
|
* Author: jaynus
|
|
|
|
*
|
|
|
|
* Remove a synced event handler
|
|
|
|
*
|
|
|
|
* Argument:
|
|
|
|
* 0: Name (String)
|
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* Boolean of success
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
2015-05-14 22:12:40 +00:00
|
|
|
|
2015-04-17 17:21:41 +00:00
|
|
|
PARAMS_1(_name);
|
|
|
|
|
2015-05-14 22:12:40 +00:00
|
|
|
private ["_data", "_eventId"];
|
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
2015-04-17 17:21:41 +00:00
|
|
|
diag_log text format["[ACE] Error, synced event key not found."];
|
|
|
|
false
|
|
|
|
};
|
|
|
|
|
|
|
|
_data = HASH_GET(GVAR(syncedEvents),_name);
|
|
|
|
_eventId = _data select 3;
|
|
|
|
|
|
|
|
[_eventId] call ace_common_fnc_removeEventHandler;
|
|
|
|
HASH_REM(GVAR(syncedEvents),_name);
|