ACE3/addons/gunbag/functions/fnc_weaponName.sqf
BrettMayson 3edeff217a
Arsenal - Action Buttons (#9069)
* work on arsenal actions

* cycle through pages

* docs

* cleanup

* Update addons/gunbag/functions/fnc_weaponName.sqf

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>

* missing fil

* Update addons/arsenal/functions/fnc_itemInfo.sqf

* Update addons/arsenal/functions/fnc_refresh.sqf

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>

* remove CBA_loadoutSet gunbag cache

* update fnc_refresh

* fix 3den

---------

Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: Salluci <salluci.lovi@gmail.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
2023-07-25 09:30:49 +03:00

27 lines
504 B
Plaintext

#include "script_component.hpp"
/*
* Author: Ir0n1E, Brett Mayson
* Get gunbag weapon name
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [player] call ace_gunbag_fnc_weaponName
*
* Public: No
*/
params ["_unit"];
private _state = (backpackContainer _unit) getVariable [QGVAR(gunbagWeapon), []];
private _name = localize LSTRING(empty);
if (_state isNotEqualTo []) then {
_name = getText (configFile >> "CfgWeapons" >> _state#0 >> "displayName");
};
_name