2015-03-15 16:27:21 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
//Add Event Handlers
|
2024-03-28 18:57:23 +00:00
|
|
|
[QGVAR(setupCustomKey), LINKFUNC(serverSetupCustomKeyEH)] call CBA_fnc_addEventHandler;
|
|
|
|
[QGVAR(setVehicleLock), LINKFUNC(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 {
|
2024-03-28 18:57:23 +00:00
|
|
|
["CAManBase", "InventoryOpened", LINKFUNC(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;
|