tobias-ripper 2 Posted June 22, 2023 hello everyone, 1st post here. been looking for a way to have players respawn with the last loadout they had selected, and have it be fresh. im just getting my feet wet with making scenarios. i tried to search for it but by god the forum is overcrowded with posts and tbh, i don't want to feel that discouraged on day one. so, basically the idea would be to save a loadout when selected in arsenal, and apply that saved loadout on respawn. is there a "onLoadoutSelection.sqf" kind of thing i can use? i already have tried the onplayerkilled / onrespawn .sqf and the usual code that goes with it, but its not what i actually want. unless there is more code i can add to those, that would make it work as i intent. well yes, im pretty much asking for a handout but its not just me being lazy, im trully lost in all the options and info available. im sorry if this was asked a million times before 😞 Share this post Link to post Share on other sites
Gunter Severloh 4072 Posted June 22, 2023 Hello, Welcome to BI forums! See my video here for that: 2 Share this post Link to post Share on other sites
jakeplissken 81 Posted June 23, 2023 In initPlayerLocal.sqf. [missionnamespace,"arsenalClosed", { [player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory; titletext ["Arsenal loadout saved.", "PLAIN DOWN"]; }] call bis_fnc_addScriptedEventhandler; [missionnamespace,"arsenalOpened", { cuttext [format ["Welcome %1, your role is: %2.",profileNameSteam ,getText(configFile >> "CfgVehicles" >> (typeOf player) >> "displayName")],"PLAIN", 3]; }] call bis_fnc_addScriptedEventhandler; In the onPlayerRespawn.sqf file. [player, [missionNamespace, "inventory_var"]] call BIS_fnc_loadInventory; This will save the loadout when closing the arsenal and reload it when they respawn. This is very simple. 2 Share this post Link to post Share on other sites
tobias-ripper 2 Posted June 23, 2023 thank so much! both of you!@Gunter Severloh hey man. been watching your videos. it's been very helpful. i keep em at hand for some of the stuff i tend to forget. thank you very much.@jakeplissken thats amazing. i'll be using that one thank you so much! one would think the editor would come with most of this stuff baked in. shoulnd't be surprised. i've made some mods and maps for battlefield 2 back in the day but this is a whole new level for me. its like moving from windows to linux hahahahaha- 1 Share this post Link to post Share on other sites