SA-MP Forums Archive
Infinitely Health (Godmode) - 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: Infinitely Health (Godmode) (/showthread.php?tid=572974)



Infinitely Health (Godmode) - Blackazur - 03.05.2015

What is the value for infinitely health (godmode)?


Re: Infinitely Health (Godmode) - Konstantinos - 03.05.2015

pawn Код:
#if !defined FLOAT_INFINITY
    #define FLOAT_INFINITY      (Float:0x7F800000)
#endif



AW: Infinitely Health (Godmode) - Blackazur - 03.05.2015

thanks but when i use it with SetPlayerHealth(playerid,Float:0x7F800000);

It won't work, if i spawn i always die, why?


Re: Infinitely Health (Godmode) - ReD_HunTeR - 03.05.2015

SetPlayerHealth(playerid, 99999999);

try this :P


Re: Infinitely Health (Godmode) - Nenzittow - 03.05.2015

Try this.

PHP код:
#define INFINITY    (Float:0x7F800000)
CMD:godmode(playeridparams[])
{
SendClientMessage(playerid0xFFFFFFFF,"[INFO] Godmode has been actived!");
SetPlayerHealth (playerid,INFINITY);
return 
1;




Re: AW: Infinitely Health (Godmode) - Konstantinos - 03.05.2015

Quote:
Originally Posted by Blackazur
Посмотреть сообщение
thanks but when i use it with SetPlayerHealth(playerid,Float:0x7F800000);

It won't work, if i spawn i always die, why?
I used it exactly like that in OnPlayerSpawn and whenever I spawn, everything is fine - I spawn with god mode.

How did you use it?