Jump to content
Sign in to follow this  
splatsh

Respawn with default weapon loadout?

Recommended Posts

Now, how do I respawn with the weapon I got when I start the game?

Now when I respawn I loose lots of mags, and so... how do I respawn with the weapoon loadout that I am using when I am starting the game?

I am using the game standard respawn, at base, no script.

Share this post


Link to post
Share on other sites

If you want to keep weapons you selected from the briefing menu, you need to "save" your setup and "restore" it after respawn. I use a player loop that include the following:

while {true} do {

waitUntil {!(alive player)};

// Save the weapon config of the player when he die.

PlayerWeapons = weapons player;
PlayerMagazines = magazines player;

waitUntil {alive player};

// Give back the weapons the player had when he died.

removeAllWeapons player;

{
	player addMagazine _x;
} forEach PlayerMagazines;

{
	player addWeapon _x;
} forEach PlayerWeapons;

};

In my loop, I also use other stuff that I cleaned up for ease of reading. Tracking on the map, first aid stuff, etc...

Share this post


Link to post
Share on other sites

how, show me how, where do you put this code, I need to copy and paste, and get it to work.... I have spend 4 days on this shit now.

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
Sign in to follow this  

×