How to set health
#9

Quote:
Originally Posted by Strawhats
Посмотреть сообщение
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
im getting errors

C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\death.pwn(20) : error 021: symbol already defined: "GetPlayerHealth"
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\death.pwn(21) : error 010: invalid function or declaration
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\death.pwn(34) : warning 217: loose indentation
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\death.pwn(35) : warning 217: loose indentation
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\death.pwn(96) : warning 217: loose indentation
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\death.pwn(97) : warning 217: loose indentation
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\death.pwn(104) : warning 217: loose indentation
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\death.pwn(121) : warning 217: loose indentation
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\death.pwn(13 : warning 217: loose indentation
C:\Users\Humi\Desktop\REVO-RP\PR-RP\filterscripts\death.pwn(21 : warning 203: symbol is never used: "health
Reply


Messages In This Thread
How to set health - by REVO-RP - 19.01.2013, 11:22
Re: How to set health - by Goldino - 19.01.2013, 11:23
Re: How to set health - by captainjohn - 19.01.2013, 11:25
Re: How to set health - by REVO-RP - 19.01.2013, 11:25
Re: How to set health - by REVO-RP - 19.01.2013, 11:28
Re: How to set health - by RajatPawar - 19.01.2013, 11:29
Re: How to set health - by captainjohn - 19.01.2013, 11:33
Re: How to set health - by Baboon - 19.01.2013, 11:33
Re: How to set health - by REVO-RP - 19.01.2013, 11:48
Re: How to set health - by captainjohn - 19.01.2013, 12:00

Forum Jump:


Users browsing this thread: 1 Guest(s)