Lestat Posted June 3, 2015 Share Posted June 3, 2015 What is all the player loses when s/he dies? I know they lose the skin, the weapons. But they don't lose the money for example. So whats is everything the player loses when s/he dies? I don't want my players to lose anything when they die, only a little bit of money for "respawn fees". So I need to know what do I need to re-add to them. Link to comment
solidsnake Posted June 3, 2015 Share Posted June 3, 2015 What is all the player loses when s/he dies?I know they lose the skin, the weapons. But they don't lose the money for example. So whats is everything the player loses when s/he dies? I don't want my players to lose anything when they die, only a little bit of money for "respawn fees". So I need to know what do I need to re-add to them. He won't lose anything at all & nothing gonna change. If you want him to lose something or have his data (like money) changed you must do a script that when the player died. This function is useful for you https://wiki.multitheftauto.com/wiki/OnPlayerWasted Link to comment
Lestat Posted June 4, 2015 Author Share Posted June 4, 2015 He does, he loses the skin and the weapons for example. Or is it because some resource I'm using? (I'm using killmessages, reload, etc). Link to comment
tosfera Posted June 4, 2015 Share Posted June 4, 2015 Solidsnake is right, when a player dies, nothing happens. He keeps his/her weapons, skin, data, etc. You can still get all the weapons from a dead player. Once you spawn the player using spawnPlayer, s/he will lose her/his weapons. It depends on your script if the player also loses their skin or not. If you want to keep the weapons, save the weapons on the elementData, spawn the player, give all the weapons from the elementData, remove the elementData. You can do the same for the skin. Link to comment
Gallardo9944 Posted June 4, 2015 Share Posted June 4, 2015 If you want to keep the weapons, save the weapons on the elementData, spawn the player, give all the weapons from the elementData, remove the elementData. You can do the same for the skin. Make sure that the element data is not in sync mode otherwise it will generate a lot of traffic when a lot of players die. Link to comment
Lestat Posted June 10, 2015 Author Share Posted June 10, 2015 Thank you, very good advice. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now