2015-03-15 16:27:21 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
//Add Event Handlers
|
2016-05-25 00:37:24 +00:00
|
|
|
[QGVAR(setupCustomKey), {_this call FUNC(serverSetupCustomKeyEH)}] call CBA_fnc_addEventHandler;
|
|
|
|
[QGVAR(setVehicleLock), {_this call FUNC(setVehicleLockEH)}] call CBA_fnc_addEventHandler;
|
2016-04-24 16:26:13 +00:00
|
|
|
|
2021-10-11 20:48:30 +00:00
|
|
|
["CBA_settingsInitialized", {
|
2018-10-21 21:37:16 +00:00
|
|
|
TRACE_2("SettingsInitialized eh",GVAR(LockVehicleInventory),GVAR(VehicleStartingLockState));
|
2016-04-24 16:26:13 +00:00
|
|
|
|
2018-10-21 21:37:16 +00:00
|
|
|
if (hasInterface && {GVAR(LockVehicleInventory)}) then {
|
2018-10-10 01:21:46 +00:00
|
|
|
["CAManBase", "InventoryOpened", {_this call FUNC(onOpenInventory)}] call CBA_fnc_addClassEventHandler;
|
2016-04-24 16:26:13 +00:00
|
|
|
};
|
2018-10-21 21:37:16 +00:00
|
|
|
if (isServer && {GVAR(VehicleStartingLockState) != -1}) then {
|
|
|
|
[{
|
|
|
|
TRACE_1("adding lock handler",GVAR(VehicleStartingLockState));
|
|
|
|
{
|
|
|
|
[_x, "initpost", LINKFUNC(handleVehicleInitPost), true, [], true] call CBA_fnc_addClassEventHandler;
|
|
|
|
} forEach ["Car", "Tank", "Air"];
|
|
|
|
}, [], 0.25] call CBA_fnc_waitAndExecute;
|
|
|
|
};
|
2016-05-22 15:29:05 +00:00
|
|
|
}] call CBA_fnc_addEventHandler;
|