[AJUDA]Vip days
#9

A logica esta correta, mas tinha coisas erradas no seu COD, ai esta corrigido!

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 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;
}

public OnPlayerConnect(playerid)
{
    new arquivo[34], playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    format(arquivo, sizeof(arquivo), "Contas/%s.ini", playername);
    if(getdate() - 30 >= DOF2_GetInt(arquivo, "Vip")) PlayerInfo[playerid][mVip] = 0;
    return 1;
}
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: 1 Guest(s)