04.09.2011, 09:46
it just spams numbers randomly -_-
Command:
pawn Код:
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, 10.0, X, Y, Z))
{
if (Count > 0){
GameTextForPlayer(i, CountText[Count-1], 2500, 3);
Count--;
SetTimer("CountDown", 1000, 0);
}
else{
GameTextForPlayer(i,"~g~Go Go Go!!!", 2500, 3);
}
}
}
return 1;
}
pawn Код:
if (strcmp(cmdtext, "/count", true)==0)
{
new name[MAX_PLAYER_NAME], string[99];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has started countdown at their position!",name);
SendClientMessageToAll(0xFFFF00AA, string);
Count = 5;
CountDown(playerid);
return 1;
}
pawn Код:
new Count = 5;
new CountText[5][5] ={
"~r~1",
"~r~2",
"~r~3",
"~b~4",
"~b~5"
};