Advertisement
Erwin23p

GarageInit_2.sqf

Sep 28th, 2017
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 1.39 KB | None | 0 0
  1. waituntil {!isnil "bis_fnc_init"};
  2.  
  3. waitUntil { time > 0 };
  4.  
  5. _obj = _this select 0;
  6.  
  7. Veh_Array = [];
  8.  
  9. sleep (random 5);
  10.  
  11. pad1 = "Land_HelipadEmpty_F" createVehicle [0,0,0];
  12. pad2 = "Land_HelipadEmpty_F" createVehicle [0,0,0];
  13.  
  14. pad1 disableCollisionWith _obj;
  15. pad2 disableCollisionWith _obj;
  16.  
  17. pad1 attachTo [_obj, [-6.65,-5.75,0] ];
  18. pad2 attachTo [_obj, [1.3,-5.75,0] ];
  19. "Sign_Arrow_Blue_F" createVehicle (getPos pad1);
  20. "Sign_Arrow_Blue_F" createVehicle (getPos pad2);
  21.  
  22. /* Coordinates relative to Garage doors
  23.     //  OUT
  24.     [0,-2.3,0]  SMALL
  25.     [0,-4,0]    MID
  26.     [0,-5.5,0]  BIG
  27.     //  IN
  28.     [0,2,0]     SMALL
  29.     [0,4,0] MID
  30.     [0,4,0]     BIG
  31. */
  32.  
  33. _null = [Player] execVM "Scripts\Garage.sqf";
  34. waitUntil {scriptDone _null};
  35.  
  36. sleep (random 5);
  37.  
  38. {
  39.     if ((typeOf _x) in (Supported_Vehicles_ALL)) then
  40.     {
  41.         Veh_Array pushBack _x;
  42.         _null = [_x] execVM "Scripts\Garage.sqf";
  43.         waitUntil {scriptDone _null};
  44.     };
  45. } forEach (vehicles);
  46.  
  47. cutText ["Garage loaded","PLAIN",2];
  48.  
  49. while {true} do
  50. {
  51.     sleep (random [20,30,40]);
  52.    
  53.     //Delete vehicles from "Veh_Array" if not in "vehicles"
  54.     {
  55.         if !(_x in vehicles) then
  56.         {
  57.             Veh_Array = Veh_Array - [_x];
  58.         };
  59.     } forEach (Veh_Array);
  60.     {
  61.         if (((typeOf _x) in (Supported_Vehicles_All)) && !(_x in Veh_Array)) then
  62.         {
  63.             Veh_Array pushBack [_x];
  64.             _null = [_x] execVM "Scripts\Garage.sqf";
  65.             waitUntil {scriptDone _null};
  66.         };
  67.     } forEach (vehicles);
  68. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement