Posts: 854
Threads: 154
Joined: Jun 2012
Reputation:
0
How do I set a player to have infinite life, or to never be able to die. Not SetPlayerHealth(playerid, 99999) .... But like actually infinite.
The problem is I have an include which makes the sniper a 1 shot death, but admins are never supposed to be able to die in my GM... So how do I set their health to infinite (or where they won't take damage)?
Thanks: jakejohnsonusa
Posts: 381
Threads: 12
Joined: Oct 2012
Reputation:
0
SetPlayerHealth() on a timer? like update 99999 every second for that player...
Posts: 854
Threads: 154
Joined: Jun 2012
Reputation:
0
Hmmm. I don't think that will fix my problem. Any other ways?
Posts: 815
Threads: 127
Joined: May 2011
Reputation:
0
Well if there is no other way, its better if you disable the sniper one shot die thing. And what mastermax7777 said, well its alright but there is no point if the sniper could kill him with one shot, injured positively he can regain the health but where could he update in a second?
Posts: 90
Threads: 11
Joined: Oct 2012
Reputation:
0
IsPlayerAdmin and a timer with SetPlayerHealth is what you need.
Posts: 854
Threads: 154
Joined: Jun 2012
Reputation:
0
Ok without using YSI, how can I do a timer? (Sorry, but I don't use or have YSI). The exact code for this would be great.
Thanks guys
+1 Rep to everyone!
Posts: 560
Threads: 117
Joined: Jan 2011
Reputation:
0
You said sniper is 1 shot kill, so just make it if(PlayerInfo[playerid][admin] == 0) or whatever your enum is for admins, so if your not an admin, then it kills you, if you are an admin, nothing happens.
Posts: 145
Threads: 6
Joined: Jun 2012
PHP код:
If(IsPlayerAdmin(playerid))
Not
PHP код:
If(IsPlayerAdmin(playerid)