Jump to content
samir17864

Check if Virtual Garage display is closed

Recommended Posts

I got it:
 

_pos = player getPos [30,getDir player];
BIS_fnc_garage_center = createVehicle [ "Land_HelipadCircle_F", _pos, [], 0, "CAN_COLLIDE" ];
uinamespace setvariable ["bis_fnc_garage_defaultClass", "B_TargetSoldier" ];
["Open",true] call BIS_fnc_garage;
[missionNamespace, "garageClosed", {hint "Garage Closed";}] call BIS_fnc_addScriptedEventHandler;

garageClosed is triggered when the Virtual Garage display is closed, and you can run whatever script you want ( in the above example hint "Garage Closed";)

Oh, by the way the 3rd line (uinamespace setvariable ["bis_fnc_garage_defaultClass", "B_TargetSoldier" ];) will make the Virtual Garage open without adding any vehicle when it is first open, because the garage default class is set to something not available in the garage.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×