ACE3/addons/atragmx/functions/fnc_delete_gun.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

32 lines
526 B
Plaintext

/*
* Author: Ruthberg
* Deletes the currently selected gun profile from the profileNamespace
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call ace_atragmx_fnc_delete_gun
*
* Public: No
*/
#include "script_component.hpp"
private _index = lbCurSel 6000;
if (_index == -1) exitWith {};
if (GVAR(currentGun) > _index) then {
GVAR(currentGun) = GVAR(currentGun) - 1;
};
GVAR(gunList) set [_index, 0];
GVAR(gunList) = GVAR(gunList) - [0];
lbDelete [6000, _index];
call FUNC(store_gun_list);