open.mp forum
[Pawn] How can I make players invincible? - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] How can I make players invincible? (/showthread.php?tid=2138)



How can I make players invincible? - XDK6 - 2021-06-25

Hello guys! I'm a newbie scripter. I needd help how to make a playerid invincible.


RE: How can I make players invincible? - Pinch - 2021-06-25

You probably should consider using weapon-config.inc as it makes it as simple as possible.

I am not saying that you shouldn't look into WC's source code later (once you learn the basics it should be a bit clearer to you).


RE: How can I make players invincible? - Otakeiro - 2021-06-26

Just set your life at a high value.

Code:
SetPlayerHealth(playerid, 999999.0);



RE: How can I make players invincible? - Pinch - 2021-06-26

(2021-06-26, 07:06 AM)Otakeiro Wrote: Just set your life at a high value.

Code:
SetPlayerHealth(playerid, 999999.0);

That's by no means invicible