[Ajuda] Contagem regressiva
#1

Bem, meu code /Contar quando coloco 10 segundos, se tiver somente eu, conta normal, se tiver 2 players, vai pulando do 10 para o 8 dai pro 6 .... e etc

pawn Code:
public Contagem5()
{
    new string[20];
    new Float:posx, Float:posy, Float:posz;
    if(tContagem > 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                GetPlayerPos(i, posx, posy, posz);
                format(string, sizeof(string),"%d", tContagem);
                GameTextForAll(string,1000,3);
                PlayerPlaySound(i,1056, posx, posy, posz);
                SetTimer("Contagem5", 1000, false);
                TogglePlayerControllable(i, 0);
            }
        }
    }
    else if(tContagem == 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                TogglePlayerControllable(i, 1);
                GameTextForAll("] Go Go Go ]", 1000, 3);
                tContagem = 0;
                if(ContagemIniciada == true)
                {
                    ContagemIniciada = false;
                }
                GetPlayerPos(i, posx, posy, posz);
                PlayerPlaySound(i, 1057, posx, posy, posz);
            }
        }
    }
    return tContagem--;
}
Reply
#2

Й por que ele ta criando dois timers...

Manda o teu /contar
Reply
#3

pawn Code:
public Contagem5()
{
    new string[20];
    new Float:posx, Float:posy, Float:posz;
    if(tContagem > 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                GetPlayerPos(i, posx, posy, posz);
                format(string, sizeof(string),"%d", tContagem);
                GameTextForAll(string,1000,3);
                PlayerPlaySound(i,1056, posx, posy, posz);
                TogglePlayerControllable(i, 0);
            }
        }
        SetTimer("Contagem5", 1000, false);
    }
    else if(tContagem == 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                TogglePlayerControllable(i, 1);
                GameTextForAll("] Go Go Go ]", 1000, 3);
                tContagem = 0;
                if(ContagemIniciada == true)
                {
                    ContagemIniciada = false;
                }
                GetPlayerPos(i, posx, posy, posz);
                PlayerPlaySound(i, 1057, posx, posy, posz);
            }
        }
    }
    return tContagem--;
}
Reply
#4

Paulor thanks erro meu rs vlw.

#Estou impossibilitado de te dar Rep :/
Reply
#5

Quote:
Originally Posted by Murilo_sousa
View Post
Paulor thanks erro meu rs vlw.

#Estou impossibilitado de te dar Rep :/
No Problems..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)