fnc_canReloadExternal.sqf 474 B

12345678910
  1. params ["_target", "_player", "_params"];
  2. if(!(alive _target) || !(alive _player)) exitWith { false };
  3. if(vehicle _target != _target) exitWith { false };
  4. _currentTurret = _target currentWeaponTurret [0];
  5. if(_currentTurret == "") then {
  6. _currentTurret = _target weaponsTurret [0] select 0;
  7. };
  8. _compatMags = [_currentTurret] call CBA_fnc_compatibleMagazines;
  9. _magazines = (magazinesAmmo _player) select {_x select 1 > 0 && (_x select 0) in _compatMags};
  10. count _magazines > 0