03.09.2011, 13:43
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