how to set all players health using a timer ?
#1

hey
hi i have
Код:
ishungry[playerid];
and in
hungrytimer
Код HTML:
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i)
        {
getplayerhealth(i,phealth)
setplayerhealth(i,phealth-5)
so my problem is
if two players at the same time had ishungry[playerid]=1;

the timer will count from id 0 when id 0 dies then it goes to low health id 1
(like timer will first low health id 0 then goto 1 and 2 and 3 )
but i want the timer low the both ids health at the same time

not count from 0 to 10 players !


even if id 1 had ishungy=1 and the timer is already lowing his health
then if id 0 got ishungry=1 then it will stop low id1's health and it will low health id0 when id0 dies it go back to id 1 and starts lowing health id 1 from last health he got
Reply
#2

Show us the whole code, please. That will make it easier.
You should also use PVars.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)