ACE3/addons/common/functions/fnc_useMagazine.sqf
Phyma ffaa195fe5 Conform function headers to coding guidelines (#5255)
* Fixed headers to work with silentspike python script

* Fixed rest of the files

* Fixed ace-team
2017-06-08 15:31:51 +02:00

35 lines
646 B
Plaintext

/*
* Author: Glowbal
* Use magazine
*
* Arguments:
* 0: unit <OBJECT>
* 1: magazine <STRING>
*
* Return Value:
* if magazine has been used. <BOOL>
*
* Example:
* [bob, "magazine"] call ace_common_fnc_useMagazine
*
* Public: Yes
*/
#include "script_component.hpp"
params ["_unit", "_magazine", ["_vehicleUsage", false]];
private _return = false;
if !(_vehicleUsage) then {
if (_magazine != "") then {
_unit removeMagazine _magazine;
_return = true;
};
[format ["fnc_useMagazine: %1 | %2", _this, _return]] call FUNC(debug);
//} else {
// @todo implement shared magazine functionality
};
_return