2015-01-13 23:27:42 +00:00
|
|
|
/*
|
|
|
|
* Author: Nou
|
|
|
|
* Execute a event only on the server.
|
|
|
|
*
|
|
|
|
* Argument:
|
2015-09-19 18:34:07 +00:00
|
|
|
* 0: Event name <STRING>
|
|
|
|
* 1: Event args <ANY>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
2015-01-13 23:27:42 +00:00
|
|
|
*
|
2015-09-19 18:34:07 +00:00
|
|
|
* Public: Yes
|
2015-01-13 23:27:42 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-19 18:34:07 +00:00
|
|
|
params ["_eventName", "_eventArgs"];
|
2015-01-13 23:27:42 +00:00
|
|
|
|
2015-09-19 18:34:07 +00:00
|
|
|
#ifdef DEBUG_EVENTS
|
|
|
|
ACE_LOGINFO_1("* Server Event: %1",_eventName);
|
|
|
|
ACE_LOGINFO_1(" args=%1",_eventArgs);
|
|
|
|
#endif
|
2015-01-13 23:27:42 +00:00
|
|
|
|
|
|
|
ACEg = [_eventName, _eventArgs];
|
2015-09-19 18:34:07 +00:00
|
|
|
|
2015-05-14 18:06:06 +00:00
|
|
|
if (!isServer) then {
|
2015-01-13 23:27:42 +00:00
|
|
|
publicVariableServer "ACEg";
|
|
|
|
} else {
|
|
|
|
["ACEg", ACEg] call FUNC(_handleNetEvent);
|
|
|
|
};
|