[Ajuda] 660000 contando como 6min
#1

Olб.

Em meu sistema de up uso um SetTimerEx com 660000 millisegundos, mas, o jogador ganha exp/up a cada 6 minutos, qual й o erro?

Em OnPlayerSpawn
pawn Код:
Timer_UP[playerid] = SetTimerEx("GE", 660000, true, "is", -1, -1);
Public GE

pawn Код:
forward GE(playerid);
public GE(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        new s[36];
        format(s, sizeof(s), "Contas/%s.ini", pNick(playerid));

        if(IsPlayerConnected(i))
        {
            if(Experiencia[i] >= 5)
            {
                pLevel[i]++;
                Experiencia[i] = 0;
                TLM[i] = 10;

                SetPlayerScore(playerid, dini_Int(s, "Level"));

                format(strc, sizeof(strc), "| LEVEL | Vocк ganhou +1 level! Level atual: %d", pLevel[i]);
                SendClientMessage(i, CINFO, strc);

                PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);

                dini_IntSet(s, "ExpJogador", Experiencia[i]);
                dini_IntSet(s, "Level", pLevel[i]);

                TeM(playerid);
            }
            else
            {
                Experiencia[i]++;
                TLM[i] = 10;

                format(strc, sizeof(strc), "| EXP | Vocк ganhou +1 ponto de experiencia. (%d/5)", Experiencia[i]);
                SendClientMessage(i, CINFO, strc);

                PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);

                dini_IntSet(s, "ExpJogador", Experiencia[i]);

                TeM(playerid);
            }
        }
    }
    return 1;
}
Reply
#2

Troque

pawn Код:
Timer_UP[playerid] = SetTimerEx("GE", 660000, true, "is", -1, -1);
por

pawn Код:
Timer_UP[playerid] = SetTimerEx("GE", 10*360000, true, "is", -1, -1);
Reply
#3

66*60*1000
Minutos / Segundos / Milesimos.
Reply
#4

Troque:
pawn Код:
SetTimerEx("GE", 660000, true, "is", -1, -1);
Por:
pawn Код:
SetTimerEx("GE", 66 * 60 * 1000, true, "d", playerid);
Reply
#5

pawn Код:
new Timer_UP;

Timer_UP = SetTimer("GE", (11 * 60 * 1000), true);

forward GE();
public GE()
{
    for(new i = (MAX_PLAYERS - 1); i > -1; --i)
    {
        if(IsPlayerConnected(i))
        {
            new s[36];
            format(s, sizeof(s), "Contas/%s.ini", pNick(i));

            if(Experiencia[i] >= 5)
            {
                pLevel[i]++;
                Experiencia[i] = 0;
                TLM[i] = 10;

                SetPlayerScore(i, dini_Int(s, "Level"));

                format(strc, sizeof(strc), "| LEVEL | Vocк ganhou +1 level! Level atual: %d", pLevel[i]);
                SendClientMessage(i, CINFO, strc);

                PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);

                dini_IntSet(s, "ExpJogador", Experiencia[i]);
                dini_IntSet(s, "Level", pLevel[i]);

                TeM(i);
            }
            else
            {
                Experiencia[i]++;
                TLM[i] = 10;

                format(strc, sizeof(strc), "| EXP | Vocк ganhou +1 ponto de experiencia. (%d/5)", Experiencia[i]);
                SendClientMessage(i, CINFO, strc);

                PlayerPlaySound(i, 1057, 0.0, 0.0, 10.0);

                dini_IntSet(s, "ExpJogador", Experiencia[i]);

                TeM(i);
            }
        }
    }
    return 1;
}
Reply
#6

pawn Код:
1*60000 = 1 Minuto, aletere o valor 1 para a quantidade de minutos que quiser
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)