Selecting Virtual Arsenal loadouts on the respawn menu.

All credits go to Larrow on the BI Forums

Description.ext

// Respawn at Base respawn = 3; // Respawn Delay respawnDelay = 2; // Respawn Template needed respawnTemplates[] = {"menuInventory"}; // Respawn at start of map, 1 = yes, 0 = no, but run respawn script on map start -1 = No, and do not run respawn script on map start respawnOnStart = 1;

// This file runs locally after the map begins. initPlayerLocal.sqf

// Initializes Variables _arsenalNames = []; _arsenalDataLocal = [];

// Pulls data from your Profile _arsenalData = profilenamespace getvariable ["bis_fnc_saveInventory_data",[]];

// Steps through the Arsenal Data pushing the entries to the array for "_i" from 0 to (count _arsenalData - 1) step 2 do { _name = _arsenalData select _i; _arsenalDataLocal = _arsenalDataLocal + [_name,_arsenalData select (_i + 1)]; _nul = _arsenalNames pushBack ( format[ "missionnamespace:%1", _name ] ); };

// Updates respawn loadouts with your Arsenal Inventory missionnamespace setvariable ["bis_fnc_saveInventory_data",_arsenalDataLocal]; [player,_arsenalNames] call bis_fnc_setrespawninventory;

// This File runs locally when the player is killed, Runs the same code block as initPlayerLocal.sqf, but this iteration will include any changes you made between map start or previous death and most recent death. onPlayerKilled.sqf // Initializes Variables _arsenalNames = []; _arsenalDataLocal = [];

// Pulls data from your Profile _arsenalData = profilenamespace getvariable ["bis_fnc_saveInventory_data",[]];

// Steps through the Arsenal Data pushing the entries to the array for "_i" from 0 to (count _arsenalData - 1) step 2 do { _name = _arsenalData select _i; _arsenalDataLocal = _arsenalDataLocal + [_name,_arsenalData select (_i + 1)]; _nul = _arsenalNames pushBack ( format[ "missionnamespace:%1", _name ] ); };

// Updates respawn loadouts with your Arsenal Inventory missionnamespace setvariable ["bis_fnc_saveInventory_data",_arsenalDataLocal]; [player,_arsenalNames] call bis_fnc_setrespawninventory;

/r/armadev Thread