ACE3/addons/gunbag/functions/fnc_status.sqf
2016-05-04 06:31:35 +02:00

27 lines
611 B
Plaintext

/*
* Author: Ir0n1E
* check gunbag status full/empty
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* Nothing
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit"];
private _state = (backpackContainer _unit) getVariable [QGVAR(GunbagWeapon),[]];
if (count _state <= 0) then {
[localize LSTRING(empty)] call EFUNC(common,displayTextStructured);
} else {
private _weapon = (_state select 0) select 0;
[getText (configFile >> "CfgWeapons" >> _weapon >> "displayname"),
getText (configFile >> "CfgWeapons" >> _weapon >> "picture")] call EFUNC(common,displayTextPicture);
};