2015-04-17 17:21:41 +00:00
|
|
|
/*
|
|
|
|
* Author: jaynus
|
|
|
|
* Remove a synced event handler
|
|
|
|
*
|
2015-09-19 17:26:45 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: Name <STRING>
|
2015-08-26 13:20:11 +00:00
|
|
|
*
|
2015-09-19 17:26:45 +00:00
|
|
|
* Return Value:
|
2015-04-17 17:21:41 +00:00
|
|
|
* Boolean of success
|
2015-09-19 17:26:45 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
2015-04-17 17:21:41 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
2015-05-14 22:12:40 +00:00
|
|
|
|
2015-09-19 17:26:45 +00:00
|
|
|
params ["_name"];
|
2015-05-14 22:12:40 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
2015-08-26 14:48:55 +00:00
|
|
|
ACE_LOGERROR("Synced event key not found.");
|
2015-04-17 17:21:41 +00:00
|
|
|
false
|
|
|
|
};
|
|
|
|
|
2015-09-19 17:26:45 +00:00
|
|
|
private ["_data", "_eventId"];
|
|
|
|
|
2015-04-17 17:21:41 +00:00
|
|
|
_data = HASH_GET(GVAR(syncedEvents),_name);
|
|
|
|
_eventId = _data select 3;
|
|
|
|
|
2015-09-19 17:26:45 +00:00
|
|
|
[_eventId] call FUNC(removeEventHandler);
|
2015-08-26 13:20:11 +00:00
|
|
|
HASH_REM(GVAR(syncedEvents),_name);
|