////////////////////////////////////////////////////////////////////////////
fn_changeGear.sqf (Activated within scroll menu)
////////////////////////////////////////////////////////////////////////////
//Load gear configuration for clients
[] call playerFunctions_fnc_gearConfig;
//Preload the arsenal
["Preload"] call BIS_fnc_arsenal;
//Put the items in the client's arsenal
[player, Arsitems, true, true] call BIS_fnc_addVirtualItemCargo;
[player, Arsbackpacks, true, true] call bis_Fnc_addVirtualBackpackCargo;
[player, Arsweapons, true, true] call BIS_fnc_addVirtualWeaponCargo;
[player, Arsmagazines, true, true] call BIS_fnc_addVirtualMagazineCargo;
//Spawn the Arsenal on the player
["Open",[nil,player]] spawn BIS_fnc_arsenal;
////////////////////////////////////////////////////////////////////////////
fn_gearConfig.sqf
////////////////////////////////////////////////////////////////////////////
_basicWeapons =
[
"arifle_MX_F",
"hgun_P07_F"
];
_basicMags =
[
"30Rnd_65x39_caseless_mag"
];
_basicItems =
[
"U_B_CombatUniform_mcam_tshirt"
];
_basicPacks =
[
"B_AssaultPack_mcamo"
];
_addonWeapons = [];
_addonMags = [];
_addonItems = [];
_addonPacks = [];
_toAddWeapons = [];
_toAddMags = [];
_toAddItems = [];
_toAddPacks = [];
playerRank = player getVariable "playerRank";
for [{_i = 0}, {_i <= playerRank}, {_i = _i + 1}] do
{
switch (_i) do
{
case 1: {}; //Use the basic Loadouts above
case 2: {
_toAddWeapons = ["arifle_MX_GL_F"];
_toAddMags = ["1Rnd_HE_Grenade_shell"];
};
};
_addonWeapons = _addonWeapons + _toAddWeapons;
_addonMags = _addonMags + _toAddMags;
_addonItems = _addonItems + _toAddItems;
_addonPacks = _addonPacks + _toAddPacks;
};
//Available Weapons
Arsweapons = _basicWeapons + _addonWeapons;
//Available Magazines
Arsmagazines = _basicMags + _addonMags;
//Available Items and Clothing and Attachments
Arsitems = _basicItems + _addonItems;
//Available Backpacks
Arsbackpacks = _basicPacks + _addonPacks;