SA-MP Forums Archive
How to give infinite life? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to give infinite life? (/showthread.php?tid=109729)



How to give infinite life? - Guiihz - 22.11.2009

How to give a INFINITE life in command?

I trying:
SetPlayerHealth(playerid, 9999999999999);

And one hit he dead, what the command to give a infinite life?
Sorry my english and thanks.


Re: How to give infinite life? - Guiihz - 22.11.2009

up

plz need help.


Re: How to give infinite life? - (.Aztec); - 22.11.2009

Just set it to like 250,000 or something.


Re: How to give infinite life? - BP13 - 22.11.2009

This works fine for me.

SetPlayerHealth(playerid,999999);


Re: How to give infinite life? - Zeex - 22.11.2009

Yes, it works but it's not really infinite and they will get killed somewhen though...

It's better do that like ****** said:
pawn Код:
#define FLOAT_INFINITY   (Float:0x7F800000)
and then
pawn Код:
SetPlayerHealth(playerid, FLOAT_INFINITY);



Re: How to give infinite life? - Guiihz - 22.11.2009

No work :/


Re: How to give infinite life? - Backwardsman97 - 22.11.2009

Quote:
Originally Posted by ZeeX
Yes, it works but it's not really infinite and they will get killed somewhen though...

It's better do that like ****** said:
pawn Код:
#define FLOAT_INFINITY   (Float:0x7F800000)
and then
pawn Код:
SetPlayerHealth(playerid, FLOAT_INFINITY);
Me and my friend tested that in my server when he first posted it and it caused de-sync issues. While you couldn't die, when your health was set to this, it would show your character being killed on everyone else's screen. Same with vehicles. But that was before 0.3 so it might work now.


Re: How to give infinite life? - Guiihz - 22.11.2009

Other anwsner,
How to give exaust in use command? 1x in 20 minute?
Ex: /an have exaust.
:S