ACE3/addons/gunbag/functions/fnc_status.sqf

29 lines
621 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"];
2016-06-12 11:51:23 +00:00
private _state = (backpackContainer _unit) getVariable [QGVAR(gunbagWeapon), []];
2016-05-03 08:21:21 +00:00
2016-06-12 11:51:23 +00:00
if (_state isEqualTo []) then {
2016-05-17 09:21:48 +00:00
[localize LSTRING(empty)] call EFUNC(common,displayTextStructured);
2016-05-03 08:21:21 +00:00
} else {
2016-06-12 11:51:23 +00:00
_state params ["_weapon"];
[
getText (configFile >> "CfgWeapons" >> _weapon >> "displayname"),
getText (configFile >> "CfgWeapons" >> _weapon >> "picture")
] call EFUNC(common,displayTextPicture);
2016-05-03 08:21:21 +00:00
};