2015-04-17 17:21:41 +00:00
|
|
|
/*
|
|
|
|
* Author: jaynus
|
|
|
|
* Call and propegate a synced event
|
|
|
|
*
|
2015-09-20 13:52:40 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: Name <STRING>
|
|
|
|
* 1: Arguments <ARRAY>
|
|
|
|
* 2: TTL <NUMBER, CODE> [Optional] for this specific event call
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* Boolean of success <BOOL>
|
2015-08-26 13:20:11 +00:00
|
|
|
*
|
2015-09-20 13:52:40 +00:00
|
|
|
* Public: No
|
2015-04-17 17:21:41 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
2015-05-14 18:06:06 +00:00
|
|
|
|
2015-09-20 13:52:40 +00:00
|
|
|
params ["_name", "_args", ["_ttl", 0]];
|
2015-04-17 17:21:41 +00:00
|
|
|
|
2015-09-20 13:52:40 +00:00
|
|
|
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
2015-08-26 13:20:11 +00:00
|
|
|
ACE_LOGERROR("Synced event key not found.");
|
2015-04-17 17:21:41 +00:00
|
|
|
false
|
|
|
|
};
|
|
|
|
|
2015-12-14 12:08:19 +00:00
|
|
|
private _eventData = [_name, _args, _ttl];
|
2015-09-20 13:52:40 +00:00
|
|
|
|
2015-08-26 13:20:11 +00:00
|
|
|
["SEH", _eventData] call FUNC(globalEvent);
|