mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
bdc58441f4
* block double loading * prevent double loading * block double loading * use nil * use nil * fix some wrong variables * not needed here * unload only one person * prevent duping * wrong makro * wrong makro * wrong macros * wrong macros
31 lines
717 B
Plaintext
31 lines
717 B
Plaintext
/*
|
|
* Author: Grey
|
|
* Checks whether magazine can be unloaded from static weapon
|
|
*
|
|
* Arguments:
|
|
* 0: static <OBJECT>
|
|
* 1: unit <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* canUnloadMagazine <BOOL>
|
|
*
|
|
* Example:
|
|
* [_target,_player] call ace_mk6mortar_fnc_canUnloadMagazine
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_static","_unit"];
|
|
|
|
if !(alive _static && GVAR(useAmmoHandling) && _static getVariable [QGVAR(initialized),false]) exitWith {false};
|
|
if (_static getVariable [QGVAR(inUse), false]) exitWith {false};
|
|
|
|
private _canUnloadMagazine = false;
|
|
|
|
private _ammoCount = ((magazinesAllTurrets _static) select 1) select 2;
|
|
if (_ammoCount > 0) then {
|
|
_canUnloadMagazine = true;
|
|
};
|
|
_canUnloadMagazine
|