Files
DayZ-Epoch/SQF/dayz_code/compile/fn_gearMenuChecks.sqf
icomrade e54b9983dd Replace forEach with Count
Use count where you do not need _forEachIndex variable, it's quicker
than forEach.
2014-05-27 15:37:57 -04:00

21 lines
512 B
Plaintext

private ["_cTarget","_isOk","_display","_inVehicle"];
disableSerialization;
_display = (_this select 0);
_inVehicle = (vehicle player) != player;
_cTarget = cursorTarget;
if(_inVehicle) then {
_cTarget = (vehicle player);
};
_isOk = false;
{
if(!_isOk) then {
_isOk = _cTarget isKindOf _x;
};
} count ["LandVehicle","Air", "Ship"];
if((locked _cTarget) && _isOk && (((vehicle player) distance _cTarget) < 12)) then {
cutText [(localize "str_epoch_player_7") , "PLAIN DOWN"];
_display closeDisplay 1;
};