M. Rust 0 Posted March 2, 2020 I want players' loadouts to be saved when they leave the protection zone around their spawn so that when they respawn they have the loadout they created at the beginning of the mission. I know I need bis_fnc_saveInventory and then bis_fnc_loadInventory inside onPlayerRespawn.sqf but I don't know how to get the protection zone to save the inventory. I saw a video of this a looong time ago but I can't remember how to do it. If anyone knows of a video for it that would be appreciated. Share this post Link to post Share on other sites
Pyth3rEx 1 Posted March 2, 2020 Not sure what bis_fnc_saveInventory does but with a wild guess I'd say do a repeatable trigger on the safezone where 'onExit' executes bis_fnc_saveInventory or something along these lines. Share this post Link to post Share on other sites
baton1990 30 Posted March 2, 2020 If you use BIS virtual arsenal here the trick: in mission folder create two files initPlayerLocal.sqf and onPlayerRespawn.sqf. In initPlayerLocal.sqf file write and save: if ((!isServer) && (player != player)) then {waitUntil {player == player};}; //save loadout [missionNamespace, "arsenalClosed", { player setVariable ["Saved_Loadout",getUnitLoadout player]; }] call BIS_fnc_addScriptedEventHandler; In onPlayerRespawn.sqf file write and save: player setUnitLoadout (player getVariable ["Saved_Loadout",[]]); Profit 2 Share this post Link to post Share on other sites
M. Rust 0 Posted March 3, 2020 Perfect that's even better! Worked like a charm! Was setting up a mission for a clan I'm in and we use specific loadouts and need everyone to keep whatever they pick at mission start. Thanks baton! Share this post Link to post Share on other sites
jakeplissken 81 Posted March 4, 2020 Use this, it should work better. [player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory; Then when player respawns, they keep their loadout like this. [player, [missionNamespace, "inventory_var"]] call BIS_fnc_loadInventory; Share this post Link to post Share on other sites