Countdown doesn't work correctly!
#8

Quote:
Originally Posted by iMonk3y
Посмотреть сообщение
SetTimer will get called as many times as there are players in range of point. I would do the following operation: Remove red and add green.
Код:
public CountDown()
{
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(playerid,X,Y,Z);
    for(new i = 0; i < MAX_PLAYERS; i++)
    foreach(Player,i)
    {
        GetPlayerPos(i,X,Y,Z);
        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);
            }
        }
    }
    if(Count > 0) SetTimer("CountDown", 1000, 0);
    return 1;
}
well as i undarstood every1 will get countdown but i want at one player position...
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)