[Ajuda] /bantemp acabando antes do tempo.
#1

Olб, bom dia!

O sistema de ban temporбrio, mas sempre que ele loga ele й desbanido atй mesmo sem acabar o tempo.

pawn Code:
forward CheckDesbanAuto(playerid);
public CheckDesbanAuto(playerid)
{
    new string3[128];
    new string4[128];
    new ANO, MES, DIA;
    new ip[16];
    GetPlayerIp(playerid, ip, sizeof ip);
    format(string3, sizeof(string3), "BanidosTemp/%s.ini", PlayerName(playerid));
    format(string4, sizeof(string4), "IPsBanidosTemp/%s.ini", ip);
    if(fexist(string3))
    {
        getdate(ANO, MES, DIA);
        if(DIA >= PlayerInfo[playerid][pDiaBanTemp] && MES >= PlayerInfo[playerid][pMesBanTemp] && ANO >= PlayerInfo[playerid][pAnoBanTemp])
        {
            dini_Remove(string3);
            FoiDesban[playerid] = 1;
            SendClientMessage(playerid, COLOR_GRAD1, "  Se deu bem!");
            NaoPodeLogar[playerid] = 0;
            if(fexist(string4))
            {
                SendClientMessage(playerid, COLOR_GRAD1, "  Se deu bem!");
                NaoPodeLogar[playerid] = 0;
                dini_Remove(string4);
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GRAD1, "  Se fudeo!");
            NaoPodeLogar[playerid] = 1;
            ForceClassSelection(playerid);
            SetTimerEx("BanAuto2", 100, 0, "i", playerid);
        }
    }
    else
    {
        NaoPodeLogar[playerid] = 0;
    }
    if(fexist(string4))
    {
        NaoPodeLogar[playerid] = 1;
        ForceClassSelection(playerid);
        SendClientMessage(playerid, COLOR_GRAD1, "  Se fudeo!");
        SetTimerEx("BanAuto2", 100, 0, "i", playerid);
    }
    else
    {
        NaoPodeLogar[playerid] = 0;
    }
    return true;
}
Vlw!
Reply
#2

Olб, boa noite!

Acho que o problema estб no: Alguйm ajuda ?!
pawn Code:
if(DIA >= PlayerInfo[playerid][pDiaBanTemp] && MES >= PlayerInfo[playerid][pMesBanTemp] && ANO >= PlayerInfo[playerid][pAnoBanTemp])
        {
Vlw!
Reply
#3

Olб, bom dia!

Up!

Vlw!
Reply
#4

Olб, boa noite!

UP!

Vlw!
Reply
#5

Olа, bom dia!

UP novamente alguem poderia me ajudar ?!

Vlw!
Reply
#6

Usa GetTime meu caro..
Reply
#7

Olб, bom dia!

paulor, poderia me mostrar como posso fazer isso ?!

Vlw!
Reply
#8

https://sampforum.blast.hk/showthread.php?tid=404067
http://forum.sa-mp.com/showpost.php?...postcount=1653
Reply
#9

Olб, bom dia!

paulor, teria que refazer meu sistema todo

Vlw!
Reply
#10

Quote:
Originally Posted by NuTShoT
View Post
Olб, bom dia!

paulor, teria que refazer meu sistema todo

Vlw!
Sim!

Se preferir, tem esse que suporta 30 dias somente, mas nгo precisa refazer seu sistema todo:
http://forum.sa-mp.com/showpost.php?...postcount=1581

Mas ainda sim aconselho GetTime pela maior seguranзa..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)