ACE3/addons/common/functions/fnc_removeSyncedEventHandler.sqf

27 lines
537 B
Plaintext
Raw Normal View History

2016-05-30 16:37:03 +00:00
/*
* Author: jaynus
* Remove a synced event handler
*
* Arguments:
* 0: Name <STRING>
*
* Return Value:
* Boolean of success
*
* Public: No
*/
#include "script_component.hpp"
params ["_name"];
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
ACE_LOGERROR_1("Synced event key [%1] not found (removeSyncedEventHandler).", _name);
false
};
private _data = HASH_GET(GVAR(syncedEvents),_name);
_data params ["", "", "", "_eventId"];
2016-06-09 12:24:45 +00:00
[_eventId] call CBA_fnc_removeEventHandler;
2016-05-30 16:37:03 +00:00
HASH_REM(GVAR(syncedEvents),_name);