IgiLoad/IgiLoadInit.sqf
2018-02-05 07:40:57 -05:00

51 lines
1.2 KiB
Plaintext

waituntil {!isnil "bis_fnc_init"};
//if (isDedicated) exitwith {};
//if (isServer) exitwith {};
//waitUntil { !(isNull player) };
waitUntil { time > 0 };
IL_EV_Count = 0;
IL_Veh_Array = [];
systemChat "IgiLoad is loading. Please wait...";
sleep (random 30);
systemChat Format["IgiLoad init Player: %1", Player];
_null = [Player] execVM "IgiLoad\IgiLoad.sqf";
waitUntil {scriptDone _null};
sleep (random (IL_Check_Veh_Max - IL_Check_Veh_Min));
{
if ((typeOf _x) in (IL_Supported_Vehicles_All)) then
{
IL_Veh_Array = IL_Veh_Array + [_x];
_null = [_x] execVM "IgiLoad\IgiLoad.sqf";
waitUntil {scriptDone _null};
};
} forEach (vehicles);
systemChat "IgiLoad loaded. Have fun :)";
while {true} do
{
sleep (IL_Check_Veh_Min + (random (IL_Check_Veh_Max - IL_Check_Veh_Min)));
//Delete vehicles from "IL_Veh_Array" if not in "vehicles"
{
if !(_x in vehicles) then
{
IL_Veh_Array = IL_Veh_Array - [_x];
};
} forEach (IL_Veh_Array);
{
if (((typeOf _x) in (IL_Supported_Vehicles_All)) && !(_x in IL_Veh_Array)) then
{
IL_Veh_Array = IL_Veh_Array + [_x];
_null = [_x] execVM "IgiLoad\IgiLoad.sqf";
waitUntil {scriptDone _null};
};
} forEach (vehicles);
};