[Help] Health
#2

Quote:
Originally Posted by viddo
Посмотреть сообщение
Hello, How can i make it that if the player's hp is on a certain point it starts to automatically loses by 5 pts or something?
PHP код:
new Float:Healthhptimer;
GetPlayerHealth(playerid,Health); 
PHP код:
If(Health 20)
{
   
hptimer SetTimer("losehp",1000,true); //calls the timer every second

PHP код:
public hptimer(playerid)
{
   
SetPlayerHealth(playeridHealth -5); //player loses 5hp each time the timer is called.

PHP код:
KillTimer hptimer//kills timer 
Here u got some code snippets, i think you should be able to put those in the right functions.
Reply


Messages In This Thread
[Help] Health - by viddo - 19.03.2012, 20:50
AW: [Help] Health - by Blunt P - 19.03.2012, 21:00
Re: [Help] Health - by new121 - 19.03.2012, 21:04
Re: [Help] Health - by viddo - 19.03.2012, 22:56

Forum Jump:


Users browsing this thread: 1 Guest(s)