ACE3/addons/common/functions/fnc_serverEvent.sqf

29 lines
588 B
Plaintext
Raw Normal View History

/*
* 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"
2015-05-14 22:12:40 +00:00
//IGNORE_PRIVATE_WARNING("_handleNetEvent");
2015-05-14 18:06:06 +00:00
PARAMS_2(_eventName,_eventArgs);
#ifdef DEBUG_EVENTS
2015-08-26 15:39:44 +00:00
ACE_LOGINFO_1("* Server Event: %1",_eventName);
ACE_LOGINFO_1(" args=%1",_eventArgs);
#endif
ACEg = [_eventName, _eventArgs];
2015-05-14 18:06:06 +00:00
if (!isServer) then {
publicVariableServer "ACEg";
} else {
["ACEg", ACEg] call FUNC(_handleNetEvent);
};