IgiLoadInit.sqf 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. waituntil {!isnil "bis_fnc_init"};
  2. //if (isDedicated) exitwith {};
  3. //if (isServer) exitwith {};
  4. //waitUntil { !(isNull player) };
  5. waitUntil { time > 0 };
  6. IL_EV_Count = 0;
  7. IL_Veh_Array = [];
  8. cutText ["IgiLoad is loading. Please wait...","PLAIN",2];
  9. sleep (random 30);
  10. cutText [Format ["IgiLoad init Player: %1", Player],"PLAIN",2];
  11. _null = [Player] execVM "IgiLoad\IgiLoad.sqf";
  12. waitUntil {scriptDone _null};
  13. sleep (random (IL_Check_Veh_Max - IL_Check_Veh_Min));
  14. {
  15. if ((typeOf _x) in (IL_Supported_Vehicles_All)) then
  16. {
  17. IL_Veh_Array = IL_Veh_Array + [_x];
  18. _null = [_x] execVM "IgiLoad\IgiLoad.sqf";
  19. waitUntil {scriptDone _null};
  20. };
  21. } forEach (vehicles);
  22. cutText ["IgiLoad loaded. Have fun :)","PLAIN",2];
  23. while {true} do
  24. {
  25. sleep (IL_Check_Veh_Min + (random (IL_Check_Veh_Max - IL_Check_Veh_Min)));
  26. //Delete vehicles from "IL_Veh_Array" if not in "vehicles"
  27. {
  28. if !(_x in vehicles) then
  29. {
  30. IL_Veh_Array = IL_Veh_Array - [_x];
  31. };
  32. } forEach (IL_Veh_Array);
  33. {
  34. if (((typeOf _x) in (IL_Supported_Vehicles_All)) && !(_x in IL_Veh_Array)) then
  35. {
  36. IL_Veh_Array = IL_Veh_Array + [_x];
  37. _null = [_x] execVM "IgiLoad\IgiLoad.sqf";
  38. waitUntil {scriptDone _null};
  39. };
  40. } forEach (vehicles);
  41. };