01.08.2010, 01:44
u want it for all players?
pawn Код:
forward countdown(playerid);
public countdown(playerid)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i,7.0,x,y,z))
{
if(CountDown==6) GameTextForPlayer(i,"~p~Starting...",1000,6);
CountDown--;
if(CountDown==0)
{
//GameTextForPlayer(i,"~g~GO~ r~!",1000,6);
CountDown = -1;
GameTextForPlayer(i,"~g~GO~ r~!",1000,6);
TogglePlayerControllable(i,true);
PlayerPlaySound(i,1057, 0.0, 0.0, 0.0);
return 0;
}
else
{
new text[7]; format(text,sizeof(text),"~w~%d",CountDown);
GameTextForPlayer(i,text,1000,6);
PlayerPlaySound(i,1056, 0.0, 0.0, 0.0);
TogglePlayerControllable(i,false);
//GameTextForPlayer(i,text,1000,6);
}
SetTimerEx("countdown",1000,0,"i",playerid);
}
}
return 0;
}