A Question About "Winning HP"
#7

pawn Код:
new Health[MAX_TEAM];

Health[TEAM_COP] = SetTimerEx("Increasing",2000,1,"d",TEAM_COP);//Wherever you want to start increasing the team HP

forward Increasing(teamid);//Forwarding your callback

public Increasing(teamid)
{
    new Float:x;//Create a new float variable "x"
    foreach(Player,i)//Use foreach
    {
        if(gTeam[i] == teamid)//If player tim is teamid which in this case is TEAM_COP
        {
            GetPlayerHealth(playerid,x);//You know..
            SetPlayerHealth(playerid,x + 3);//This already..
        }
    }
    return 1;
}

KillTimer(Health[TEAM_COP]);//If you want to stop increasing
Reply


Messages In This Thread
A Question About "Winning HP"[RESOLVED BY varthshenon] - by ServerScripter - 03.09.2011, 13:01
Re: A Question About "Winning HP" - by ServerScripter - 03.09.2011, 13:06
Re: A Question About "Winning HP" - by =WoR=Varth - 03.09.2011, 13:07
Re: A Question About "Winning HP" - by ServerScripter - 03.09.2011, 13:13
Re: A Question About "Winning HP" - by =WoR=Varth - 03.09.2011, 13:24
Re: A Question About "Winning HP" - by ServerScripter - 03.09.2011, 13:28
Re: A Question About "Winning HP" - by =WoR=Varth - 03.09.2011, 13:43
Re: A Question About "Winning HP" - by ServerScripter - 03.09.2011, 13:47
Re: A Question About "Winning HP" - by =WoR=Varth - 03.09.2011, 14:07
Re: A Question About "Winning HP" - by ServerScripter - 03.09.2011, 14:09

Forum Jump:


Users browsing this thread: 1 Guest(s)