skotracker

IgiLoadInit.sqf

Apr 19th, 2018
58
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. //if (isDedicated) exitwith {};
  3. //if (isServer) exitwith {};
  4. //waitUntil { !(isNull player) };
  5. waitUntil { time > 0 };
  6.  
  7. IL_EV_Count = 0;
  8. IL_Veh_Array = [];
  9.  
  10.  
  11. //cutText ["IgiLoad is loading. Please wait...","PLAIN",2];
  12. sleep (random 30);
  13.  
  14. //cutText [Format ["IgiLoad init Player: %1", Player],"PLAIN",2];
  15.  
  16. _null = [Player] execVM "IgiLoad\IgiLoad.sqf";
  17. waitUntil {scriptDone _null};
  18.  
  19. sleep (random (IL_Check_Veh_Max - IL_Check_Veh_Min));
  20.  
  21. {
  22.     if ((typeOf _x) in (IL_Supported_Vehicles_All)) then
  23.     {
  24.         IL_Veh_Array = IL_Veh_Array + [_x];
  25.         _null = [_x] execVM "IgiLoad\IgiLoad.sqf";
  26.         waitUntil {scriptDone _null};
  27.     };
  28. } forEach (vehicles);
  29.  
  30. call compileFinal preprocessFileLineNumbers "IgiLoad\IgiLoadTaru.sqf";
  31. //cutText ["IgiLoad loaded. Have fun :)","PLAIN",2];
  32.  
  33. while {true} do
  34. {
  35.     sleep (IL_Check_Veh_Min + (random (IL_Check_Veh_Max - IL_Check_Veh_Min)));
  36.     IL_LST_Count = nearestObjects[getPos player,IL_Supported_Init_All,75];
  37.     //Delete vehicles from "IL_Veh_Array" if not in "vehicles"
  38.     {
  39.         if !(_x in vehicles) then
  40.         {
  41.             IL_Veh_Array = IL_Veh_Array - [_x];
  42.         };
  43.     } forEach (IL_Veh_Array);
  44.     {
  45.         if (((typeOf _x) in (IL_Supported_Vehicles_All)) && !(_x in IL_Veh_Array)) then
  46.         {
  47.             IL_Veh_Array = IL_Veh_Array + [_x];
  48.             _null = [_x] execVM "IgiLoad\IgiLoad.sqf";
  49.             waitUntil {scriptDone _null};
  50.         };
  51.     } forEach IL_LST_Count;
  52. };
Add Comment
Please, Sign In to add comment