2015-01-13 23:27:42 +00:00
|
|
|
/*
|
|
|
|
* Author: Nou
|
|
|
|
*
|
|
|
|
* Execute a event only on the server.
|
|
|
|
*
|
|
|
|
* Argument:
|
|
|
|
* 0: Event name (string)
|
|
|
|
* 1: Event args (any)
|
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* Nothing
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
private ["_eventName", "_eventArgs"];
|
|
|
|
|
|
|
|
_eventName = _this select 0;
|
|
|
|
_eventArgs = _this select 1;
|
|
|
|
|
2015-04-02 23:05:21 +00:00
|
|
|
#ifdef DEBUG_EVENTS
|
|
|
|
diag_log text format[ARR_2("* Server Event: %1",_eventName)];
|
|
|
|
diag_log text format[ARR_2(" args=%1",_eventArgs)];
|
|
|
|
#endif
|
2015-01-13 23:27:42 +00:00
|
|
|
|
|
|
|
ACEg = [_eventName, _eventArgs];
|
|
|
|
if(!isServer) then {
|
|
|
|
publicVariableServer "ACEg";
|
|
|
|
} else {
|
|
|
|
["ACEg", ACEg] call FUNC(_handleNetEvent);
|
|
|
|
};
|