mirror of
https://github.com/Teh-Dango/Sarge-AI.git
synced 2024-08-30 16:32:11 +00:00
65e4453908
Major Update. Now supporting DesolationRedux, Epoch and Exile.
36 lines
718 B
Plaintext
36 lines
718 B
Plaintext
/****************************************************************
|
|
File: UPSMON_checkleaveVehicle.sqf
|
|
Author: MONSADA
|
|
|
|
Description:
|
|
If every on is outside, make sure driver can move
|
|
Parameter(s):
|
|
<--- leader
|
|
<--- vehicle
|
|
<--- driver
|
|
Returns:
|
|
Nothing
|
|
****************************************************************/
|
|
private["_npc","_vehicle","_driver","_in"];
|
|
_npc = _this select 0;
|
|
_vehicle = _this select 1;
|
|
_driver = _this select 2;
|
|
_in = false;
|
|
|
|
//Take time to go all units
|
|
sleep 5;
|
|
{
|
|
if (_x != vehicle _x) then {_in = true};
|
|
}foreach units _npc;
|
|
|
|
|
|
// if no one is inside
|
|
if (!_in) then {
|
|
_driver enableAI "MOVE";
|
|
sleep 1;
|
|
_driver stop false;
|
|
sleep 1;
|
|
_driver leaveVehicle _vehicle;
|
|
sleep 1;
|
|
};
|