12.01.2011, 07:20
helo all
my problem is that i've make a timer but it doesn't work
can some one help me for that pls
my problem is that i've make a timer but it doesn't work
can some one help me for that pls
Код:
forward infectedtimer(playerid);
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_FIRE) && (team[playerid] == 2))
{
if(GetDistanceBetweenPlayers(playerid,target) <= 1)
{
SetTimer("infectedtimer", 5000, 1);
}
}
}
public infectedtimer(playerid)
{
new Float:hp;
if(team[playerid] == 2)
{
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp-7);
SendClientMessage(playerid,GREEN,"you turn to a zombie.");
}
return 1;
}


