01.02.2011, 04:25
pawn Код:
if(strcmp(cmd,"/ddcount",true) == 0 || strcmp(cmd,"/ddcd",true) == 0){
if(PlayerInfo[playerid][pDM] == 1)SetTimer("DDCountdown", 1000, 1);
return 1;
}
public DDCountdown()
{
new string[64], ddcount = 20;
for(new i; i<GetMaxPlayers(); i++){
if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i,400,-1398.3799,994.8915,1024.0889))
{
if(ddcount > 0)
{
ddcount --;
format(string, sizeof(string), "~r~DD Countdown: ~n~~n~%d", ddcount);
GameTextForPlayer(i,string,1000,4);
}
else if(ddcount == 0)
{
ddcount = -1;
format(string, sizeof(string),"~r~DD Countdown: ~n~~n~~g~GO GO GO!",ddcount);
GameTextForPlayer(i,string,1000,4);
}
new Float:X, Float:Y, Float:Z;
GetPlayerPos(i, X,Y,Z);
PlayerPlaySound(i, 1056, X, Y, Z);
}
}
}
}