Add addDefaultLoadout function

This commit is contained in:
Ozan Eğitmen 2018-09-02 15:30:40 +03:00
parent 16a3bd096a
commit c3502d6dcc
2 changed files with 22 additions and 0 deletions

View File

@ -1,3 +1,4 @@
PREP(addDefaultLoadout);
PREP(addListBoxItem);
PREP(addStat);
PREP(addVirtualItems);

View File

@ -0,0 +1,21 @@
#include "script_component.hpp"
/*
* Author: 654wak654
* Adds a loadout to the "Default Loadouts" list.
*
* Arguments:
* 0: Name of loadout <STRING>
* 1: getUnitLoadout array <ARRAY>
*
* Return Value:
* None
*
* Example:
* ["Squad Leader", getUnitLoadout sql1] call ace_arsenal_fnc_addDefaultLoadout
*
* Public: Yes
*/
params [["_name", "", [""]], ["_loadout", [], [[]], 10];
GVAR(defaultLoadoutsList) append [_name, _loadout];