SA-MP Forums Archive
[Ajuda] Ajuda aqui com meu IF - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ajuda aqui com meu IF (/showthread.php?tid=411921)



Ajuda aqui com meu IF - Jumper. - 31.01.2013

Galerinha sera que da para me ajudar, fui ver um FS antigo e fiquei cismado em concertar ele para postar aqui para vcs, bom sу falta esse pequeno bug e esta 100%, o que acontece й que quando chega a 3600 segundos ele nгo faz as funзхes, segue o cуdigo
pawn Код:
#define SEGUNDOSLEVEL          3600
pawn Код:
public SegundoaMais()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        PlayerInfo[i][pSegundos] ++;
        if(PlayerInfo[i][pLevel] >= SEGUNDOSLEVEL)
        {
            PlayerInfo[i][pSegundos] = 0;
            LevelUP(i);
        }
    }
    return 1;
}
alguem pode ajudar? desde ja grato =)


Re: Ajuda aqui com meu IF - Joao Pedro - 31.01.2013

Код:
SetTimer("SegundoaMais", SEGUNDOSLEVEL);
Faltou o timer para iniciar a funзгo no tempo...


Re: Ajuda aqui com meu IF - Etton - 31.01.2013

Код:
public SegundoaMais()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        PlayerInfo[i][pSegundos] ++;
        if(PlayerInfo[i][pSegundos] >= SEGUNDOSLEVEL)
        {
            PlayerInfo[i][pSegundos] = 0;
            LevelUP(i);
        }
    }
    return 1;
}



Re: Ajuda aqui com meu IF - Jumper. - 31.01.2013

aaaaaaaaaaaaava? kkkkk vc acha q nao coloquei amigo, ele ja ta tudo certin =) nгo й isso que to falando, o timer й de um em um segundo
pawn Код:
segundos = SetTimer("SegundoaMais",1000,1);
o FS consiste em salvar seus segundos jogados, quando chega em 3600 segundos vc upa um level hehe, bem bolado nй? mas ele passa de 3600 segundos e nao rola a funзгo


@EDIT

Quote:
Originally Posted by Etton
Посмотреть сообщение
Код:
public SegundoaMais()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        PlayerInfo[i][pSegundos] ++;
        if(PlayerInfo[i][pSegundos] >= SEGUNDOSLEVEL)
        {
            PlayerInfo[i][pSegundos] = 0;
            LevelUP(i);
        }
    }
    return 1;
}
kkkkkkkkkkkkkkkk. nгo acredito que dei esse mole kkk, vlw mesmo ferakkkkkkkkkkkkkk


Re: Ajuda aqui com meu IF - Gii - 31.01.2013

Faзa um debug e veja qual funзгo nгo estб sendo executada como deveria, ao encontrar o cуdigo poste aqui!


Re: Ajuda aqui com meu IF - Joao Pedro - 31.01.2013

Cara desculpa, e nгo cheguei a ler seu post completo entгo fiz por alto o que interpretei.

Aonde a variavel PlayerInfo[i][pLevel] й incrementada?


Re: Ajuda aqui com meu IF - Jumper. - 31.01.2013

ja deu certo, sу dei um mole kkkkkkkkk


Re: Ajuda aqui com meu IF - Etton - 31.01.2013

Quote:
Originally Posted by LucasTotola
Посмотреть сообщение
ja deu certo, sу dei um mole kkkkkkkkk
Jб aconteceu vбrias vezes comigo, qualquer vacilo buga o cуdigo inteiro, por isso que sу codo quando estou totalmente concentrado :]