[Pedido] System
#8

Basicamente se resume somente a isto...Coloque para salvar o mes que vai expirar e o level do VIP...

pawn Код:
#include <a_samp>

new LevelVip[MAX_PLAYERS];
new ExpirarMesVip[MAX_PLAYERS];
forward VerificarVip();

main()
{
    print("Hello Word");
}

public OnGameModeInit()
{
    SetTimer("VerificarVip", 3000, 1);
    return 1;
}

public VerificarVip()
{
    new dia, mes, ano;
    getdate(ano, mes, dia);
    for(new vip; vip < MAX_PLAYERS; vip++)
    {
        if(LevelVip[vip] > 0)
        {
            if(ExpirarMesVip[vip] == mes)
            {
                SendClientMessage(vip, 0xFFFFFFAA, "O seu tempo de VIP acabou-se");
                LevelVip[vip] = 0;
            }
        }
    }
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/vip", true))
    {
        SendClientMessage(playerid, 0xFFFFFFAA, "Ok. Agora vocк й VIP level 2, e terб um mes para usar seus direitos de VIP");
        LevelVip[playerid] = 2;
        new dia, mes, ano;
        getdate(ano, mes, dia);
        ExpirarMesVip[playerid] = mes + 1;
        if(ExpirarMesVip[playerid] > 12) ExpirarMesVip[playerid] = 1;
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
[Pedido] System - by diretor7 - 29.05.2011, 03:14
Re: [Pedido] System - by Macintosh - 29.05.2011, 13:52
Re: [Pedido] System - by diretor7 - 29.05.2011, 19:24
Re: [Pedido] System - by TheGarfield - 29.05.2011, 20:44
Re: [Pedido] System - by diretor7 - 31.05.2011, 02:40
Re: [Pedido] System - by Ricop522 - 31.05.2011, 03:06
Re: [Pedido] System - by TheGarfield - 31.05.2011, 03:31
Re: [Pedido] System - by Falcon. - 31.05.2011, 03:45
Re: [Pedido] System - by Ricop522 - 31.05.2011, 03:47
Re: [Pedido] System - by diretor7 - 31.05.2011, 05:33

Forum Jump:


Users browsing this thread: 4 Guest(s)