mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
108ff4f644
Regex used: \[(.+?),(.+?),(.+?)\]\s+call\s+E?FUNC\((common,)?(target|object)Event\) [$1,$3,$2] call CBA_fnc_targetEvent E?FUNC\((common,)?(server|global|local)Event\) CBA_fnc_$2Event E?FUNC\((common,)?(add|remove)EventHandler\) CBA_fnc_$2EventHandler
27 lines
563 B
Plaintext
27 lines
563 B
Plaintext
/*
|
|
* 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"];
|
|
|
|
[_eventId] call CBA_fnc_removeEventHandler;
|
|
HASH_REM(GVAR(syncedEvents),_name);
|