mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
28 lines
526 B
Plaintext
28 lines
526 B
Plaintext
/*
|
|
* Author: jaynus
|
|
*
|
|
* Remove a synced event handler
|
|
*
|
|
* Argument:
|
|
* 0: Name (String)
|
|
*
|
|
* Return value:
|
|
* Boolean of success
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
PARAMS_1(_name);
|
|
|
|
private ["_data", "_eventId"];
|
|
|
|
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
|
ACE_LOGERROR("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);
|