Jump to content
RaptorElite

Loading the same gear and loadout after respawning

Recommended Posts

I searched for a script or command that could reload all the gear and loadout that I had at the start of an MP game, after I respawned after getting killed. I did get a hit on a weaponrespawn.sqf script *forgot the author* but that script just saved what I had in my vest and uniform, not my backpack, so I'm wondering if anyone would be able to help?

Share this post


Link to post
Share on other sites

initPlayerLocal.sqf

waitUntil {sleep 0.5; BIS_fnc_init};
yourGlobalLoadoutArray = getUnitLoadout player;
onPlayerRespawn.sqf

if (!isNil "yourGlobalLoadoutArray") then 
{
 player setUnitLoadout yourGlobalLoadoutArray;
};
  • Like 1

Share this post


Link to post
Share on other sites

initPlayerLocal.sqf

[player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory;
player addMPEventHandler ["MPRespawn", {[player, [missionNamespace, "inventory_var"]] call BIS_fnc_loadInventory;}];

 

Share this post


Link to post
Share on other sites

Why wait for respawning?  Change the players loadout randomly throughout the mission!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×