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 {
|
2016-04-25 20:48:24 +00:00
|
|
|
ACE_LOGERROR_1("Synced event key [%1] not found (removeSyncedEventHandler).", _name);
|
2015-04-17 17:21:41 +00:00
|
|
|
false
|
|
|
|
};
|
|
|
|
|
2015-12-14 12:08:19 +00:00
|
|
|
private _data = HASH_GET(GVAR(syncedEvents),_name);
|
|
|
|
_data params ["", "", "", "_eventId"];
|
2015-04-17 17:21:41 +00:00
|
|
|
|
2016-05-22 15:29:05 +00:00
|
|
|
[_eventId] call CBA_fnc_removeEventHandler;
|
2015-08-26 13:20:11 +00:00
|
|
|
HASH_REM(GVAR(syncedEvents),_name);
|