19.01.2013, 11:33
Like Rajat said, the chance is really small to get exactly 1 hp.
You can better us a range of like 1-15 hp, with other words:
You can use something like this in OnPlayerTakeDamage or in a timer, in OnPlayerTakeDamage it's better, since you will use less memory then...
At the part of //code you can use SetPlayerHealth(playerid, 999999), so the player gets godmode. Apart from that you can then use the rest of your code, like: /acceptdeath etc.
Good luck
You can better us a range of like 1-15 hp, with other words:
Quote:
new Float: health; GetPlayerHealth(playerid, health); if(health <= 10) { //code } |
At the part of //code you can use SetPlayerHealth(playerid, 999999), so the player gets godmode. Apart from that you can then use the rest of your code, like: /acceptdeath etc.
Good luck