SA-MP Forums Archive
Setting player health from saving system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Setting player health from saving system (/showthread.php?tid=507977)



Setting player health from saving system - DarkLored - 20.04.2014

So i made an account system but when i save someone's health and set it in OnPlayerSpawn call back it kills my character while i make sure that i set it to 80.

this code is OnPlayerSpawn call back
whats wrong with it?
pawn Код:
SetPlayerHealth(playerid,pInfo[playerid][pHealth]);



Re: Setting player health from saving system - Flake. - 20.04.2014

If you're trying to load their health every time they spawn wouldn't that be rendered pointless? Because they would die then spawn THEN load their health which would be the same as it already was?

Also show how you save/load the players health.


Re: Setting player health from saving system - DarkLored - 20.04.2014

Your right i have changed a few things and it worked out when i set my players health in the login then it worked.
+1