Countdown doesn't work correctly!
#1

it just spams numbers randomly -_-
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;
}
Command:
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"
};
Reply


Messages In This Thread
Countdown doesn't work correctly! - by [WSF]ThA_Devil - 04.09.2011, 09:46
AW: Countdown doesn't work correctly! - by Nero_3D - 04.09.2011, 09:55
Re: Countdown doesn't work correctly! - by Basicz - 04.09.2011, 09:59
Re: Countdown doesn't work correctly! - by [WSF]ThA_Devil - 04.09.2011, 10:01
Re: Countdown doesn't work correctly! - by Basicz - 04.09.2011, 10:05
Re: Countdown doesn't work correctly! - by [WSF]ThA_Devil - 04.09.2011, 10:07
Re: Countdown doesn't work correctly! - by iMonk3y - 04.09.2011, 10:07
Re: Countdown doesn't work correctly! - by [WSF]ThA_Devil - 04.09.2011, 10:16
Re: Countdown doesn't work correctly! - by Basicz - 04.09.2011, 10:16
Re: Countdown doesn't work correctly! - by [WSF]ThA_Devil - 04.09.2011, 10:50

Forum Jump:


Users browsing this thread: 1 Guest(s)