Hairy Potter 4 Posted February 28, 2018 I found a variant where the contents of the inventory are automatically saved when they die. onPlayerKilled.sqf [player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory; onPlayerRespawn.sqf [player, [missionNamespace, "inventory_var"]] call BIS_fnc_loadInventory; The option is simple and works fine, but in my case it's not entirely practical. Is it possible to change the process of saving from death, for example, to when you close the virtual arsenal? Like closing VA through "Esc" or "Close" button and the equipment selected by you is stored and loaded after death. 1 Share this post Link to post Share on other sites
davidoss 550 Posted February 28, 2018 initPlayerLocal.sqf [missionNamespace, "arsenalClosed", { player setVariable ["Saved_Loadout",getUnitLoadout player]; hint "Selected gear saved!" }] call BIS_fnc_addScriptedEventHandler; player addEventHandler ["Respawn",{ 0 = [_this select 0] spawn { params [["_player",objNull,[objNull]]]; waitUntil {sleep .2; alive _player}; _player setUnitLoadout (_player getVariable ["Saved_Loadout",[]]); }; }]; 2 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted February 28, 2018 Hello there Hairy Potter! Check also this: 2 Share this post Link to post Share on other sites
Hairy Potter 4 Posted February 28, 2018 2 hours ago, davidoss said: initPlayerLocal.sqf [missionNamespace, "arsenalClosed", { player setVariable ["Saved_Loadout",getUnitLoadout player]; hint "Selected gear saved!" }] call BIS_fnc_addScriptedEventHandler; player addEventHandler ["Respawn",{ 0 = [_this select 0] spawn { params [["_player",objNull,[objNull]]]; waitUntil {sleep .2; alive _player}; _player setUnitLoadout (_player getVariable ["Saved_Loadout",[]]); }; }]; Already checked. Works great. Thank you so much 1 hour ago, GEORGE FLOROS GR said: Hello there Hairy Potter! Check also this: It looks very interesting. Thank you! I'll try 1 Share this post Link to post Share on other sites