[AJUDA]Vip days
#1

pawn Код:
CMD:darvip(playerid, params[])
{
    new id;
    if(ssanf(params,"d", id)) return SendClientMessage(playerid, BRANCO,"[INFO]: /darvip [playerid]");
    {
        if(!IsPlayerConnected(id)) return SendClientMessage(playerid, VERMELHO, "[INFO]: Jogador invбlido!");
            new Year, Month, Day;
        getdate(Year, Month, Day);
        new arquivo[34], playername[MAX_PLAYER_NAME];
        GetPlayerName(id, playername, sizeof(playername));
            format(arquivo, sizeof(arquivo), "Contas/%s.ini", playername);
            DOF2_SetInt(arquivo ,"Vip", getdate());
            PlayerInfo[id][mVip] = 1;
         
    }
    return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{
    new arquivo[34], playername[MAX_PLAYER_NAME]; //
    GetPlayerName(playerid, playername, sizeof(playername));
    format(arquivo, sizeof(arquivo), "Contas/%s.ini", playername);
    PlayerInfo[playerid][mVip] = DOF2_GetInt(arquivo, "Vip");
    if(getdate() - 30 > DOF2_GetInt(arquivo,"Vip"))
    PlayerInfo[playerid][mVip] == 0;
    return 1;
}
Isso vai dar certo?
Reply


Messages In This Thread
[AJUDA]Vip days - by mengueh - 17.05.2012, 23:49
Re: [AJUDA]Vip days - by ViictorDaay- - 17.05.2012, 23:52
Re: [AJUDA]Vip days - by mengueh - 17.05.2012, 23:56
Re: [AJUDA]Vip days - by ViictorDaay- - 18.05.2012, 00:01
Re: [AJUDA]Vip days - by H1g0r - 18.05.2012, 00:01
Re: [AJUDA]Vip days - by mengueh - 18.05.2012, 00:02
Re: [AJUDA]Vip days - by ViictorDaay- - 18.05.2012, 00:06
Re: [AJUDA]Vip days - by mengueh - 18.05.2012, 00:07
Re: [AJUDA]Vip days - by paulor - 18.05.2012, 00:12
Re: [AJUDA]Vip days - by mengueh - 18.05.2012, 00:24

Forum Jump:


Users browsing this thread: 7 Guest(s)