A3-Conquest.Altis / scripts / AEGIS / Protected / Protected_Area_Exit.sqf
Protected_Area_Exit.sqf
Raw
// Exit Protected Area Alert
_protectedAreaCoords = _this select 0;
_protectedAreaRadius = _this select 1;

"Protected_Area" cutText ["", "PLAIN"];
titleText ["<t color='#FFFFFF' size='2'font='PuristaBold'>EXITING PROTECTED AREA</t>", "PLAIN DOWN", -1, true, true];
player say2D "hintCollapse";

// Invulnerbaility Toggle
vehicle player allowDamage true;
player allowDamage true;

// Un-Protect empty Vehicles
{
	if ({alive _x} count crew _x < 1) then {
		{
			vehicle _x allowDamage true;
			_x allowDamage true;
		} count (crew _x);
		vehicle _x allowDamage true;
		_x allowDamage true;
	}
} forEach (nearestObjects [_protectedAreaCoords,[],_protectedAreaRadius]);