ACE3/addons/spectator/XEH_postInit.sqf

20 lines
790 B
Plaintext
Raw Normal View History

2015-06-29 02:34:21 +00:00
#include "script_component.hpp"
2015-07-15 11:03:54 +00:00
//#include "initKeybinds.sqf";
// Add interaction menu exception
["isNotSpectating", {!((_this select 0) getVariable [QGVAR(isSpectator), false])}] call EFUNC(common,addCanInteractWithCondition);
// Run spectator framework if enabled
2015-06-29 02:34:21 +00:00
["SettingsInitialized", {
2015-07-21 12:31:13 +00:00
GVAR(availableModes) = [[0,1,2], [1,2], [0], [1], [2]] select GVAR(restrictModes);
GVAR(availableVisions) = [[-2,-1,0,1], [-2,-1], [-2,0,1], [-2]] select GVAR(restrictVisions);
2015-07-21 14:53:20 +00:00
if !(hasInterface) exitWith {};
2015-07-21 12:31:13 +00:00
if (GVAR(system)) then {
2015-07-17 15:02:38 +00:00
// Add event handlers to correctly enter spectator upon death
player addEventHandler ["Killed", FUNC(handleKilled)];
player addEventHandler ["Respawn", FUNC(handleRespawn)];
};
}] call EFUNC(common,addEventHandler);