2015-01-13 23:27:42 +00:00
|
|
|
/*
|
|
|
|
* Author: Nou
|
|
|
|
* Execute a event only on specific clients.
|
|
|
|
*
|
2015-09-19 22:55:58 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: Event name (STRING)
|
|
|
|
* 1: Event targets <OBJECT, ARRAY>
|
|
|
|
* 2: Event args <ANY>
|
2015-01-13 23:27:42 +00:00
|
|
|
*
|
|
|
|
* Note: If local executor is in list of targets, event will execute with
|
|
|
|
* network delay, and not immediatly.
|
|
|
|
*
|
2015-09-19 22:55:58 +00:00
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Public: Yes
|
2015-01-13 23:27:42 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-19 22:55:58 +00:00
|
|
|
params ["_eventName", "_eventTargets", "_eventArgs"];
|
2015-01-13 23:27:42 +00:00
|
|
|
|
2015-04-02 23:05:21 +00:00
|
|
|
#ifdef DEBUG_EVENTS
|
2015-08-26 15:39:44 +00:00
|
|
|
ACE_LOGINFO_2("* Target Event: %1 - %2",_eventName,_eventTargets);
|
|
|
|
ACE_LOGINFO_1(" args=%1",_eventArgs);
|
2015-04-02 23:05:21 +00:00
|
|
|
#endif
|
|
|
|
|
2015-01-13 23:27:42 +00:00
|
|
|
ACEc = [_eventName, _eventTargets, _eventArgs];
|
2015-09-19 22:55:58 +00:00
|
|
|
|
|
|
|
if (!isServer) then {
|
2015-01-13 23:27:42 +00:00
|
|
|
publicVariableServer "ACEc";
|
|
|
|
} else {
|
|
|
|
["ACEc", ACEc] call FUNC(_handleNetEvent);
|
2015-08-26 13:20:11 +00:00
|
|
|
};
|