ACE3/addons/gunbag/functions/fnc_status.sqf

27 lines
611 B
Plaintext
Raw Normal View History

2016-05-03 08:21:21 +00:00
/*
* 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 {
2016-05-04 04:31:35 +00:00
[localize LSTRING(empty)] call EFUNC(common,displayTextStructured);
2016-05-03 08:21:21 +00:00
} else {
2016-05-04 04:31:35 +00:00
private _weapon = (_state select 0) select 0;
[getText (configFile >> "CfgWeapons" >> _weapon >> "displayname"),
getText (configFile >> "CfgWeapons" >> _weapon >> "picture")] call EFUNC(common,displayTextPicture);
2016-05-03 08:21:21 +00:00
};