a3_exile_occupation/scripts/reactions/getIn.sqf
second_coming 120f9e053c v35 fixes
2016-05-03 11:15:03 +01:00

24 lines
583 B
Plaintext

// Triggered if a player gets in a captured AI vehicle
// Marks the vehicle as claimed by a player and frees up a slot to spawn another AI controlled vehicle
_vehicle = _this select 0;
_unit = _this select 2;
if(isPlayer _unit) then
{
[_vehicle] call SC_fnc_vehicleDestroyed;
if(SC_extendedLogging) then
{
_logDetail = format ["[OCCUPATION:claimVehicle]:: Unit %3 has claimed vehicle %2 at %1",time,_vehicle,_unit];
[_logDetail] call SC_fnc_log;
};
}
else
{
if(damage _vehicle > 0) then
{
[_vehicle] call SC_fnc_repairVehicle;
};
};