mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Arsenal - Add ace_arsenal_fnc_saveLoadout
as API to save loadouts (#10151)
* Added fnc_saveLoadout * Changed to toLower for other languages * GitHub didn't like editing the file in the browser * Fix case-sensitive _loadoutIndex Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Unicode support Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * setVariable in case no loadouts are saved * Fix return not happening properly * Added scripting example * Update docs/wiki/framework/arsenal-framework.md --------- Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
@ -588,3 +588,12 @@ TAG_my_arsenal_essentials = ["arifle_AK12_F", "LMG_03_F"];
|
||||
[ace_arsenal_currentBox, TAG_my_arsenal_essentials] call ace_arsenal_fnc_addVirtualItems
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
```
|
||||
|
||||
### 10.4 Saving loadouts to profile
|
||||
A loadout can be saved to the player's profile using `ace_arsenal_fnc_saveLoadout`.
|
||||
|
||||
```sqf
|
||||
private _loadout = [ACE_player] call CBA_fnc_getLoadout; // or getUnitLoadout ACE_player
|
||||
private _replaceExisting = true; // optional, default: false
|
||||
["Current Loadout", _loadout, _replaceExisting] call ace_arsenal_fnc_saveLoadout;
|
||||
```
|
||||
|
Reference in New Issue
Block a user