2016-01-02 13:23:14 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
// Exit on player clients that are not hosts
|
|
|
|
if (hasInterface && !isServer) exitWith {};
|
|
|
|
|
|
|
|
["SettingsInitialized", {
|
|
|
|
if (isServer) then {
|
2016-01-02 13:42:05 +00:00
|
|
|
// Add disconnect EH if HC transferring enabled
|
|
|
|
if (GVAR(Enabled)) then {
|
|
|
|
addMissionEventHandler ["HandleDisconnect", {_this call FUNC(handleDisconnect)}];
|
|
|
|
};
|
2016-01-02 13:23:14 +00:00
|
|
|
} else {
|
2016-01-02 13:42:05 +00:00
|
|
|
// Register HC (this part happens on HC only)
|
|
|
|
["ACE_HeadlessClientJoined", [player]] call EFUNC(common,globalEvent);
|
2016-01-02 13:23:14 +00:00
|
|
|
};
|
|
|
|
}] call EFUNC(common,addEventHandler);
|