[Ajuda] Ajuda sistema de vip
#1

Preciso de ajuda por favor,com eu abro as contas dos players e esta vip aparece o level normalmente mais ai eu entro no sv ai eu dou /vips e aparece que nгo tem vips on ;x.


pawn Код:
COMMAND:vips(playerid, params[])
{
    new VIPList[500], Name[24];
    if (APlayerData[playerid][LoggedIn] == true)
    {
        for (new i; i < MAX_PLAYERS; i++)
        {
            if (IsPlayerConnected(i))
            {
                GetPlayerName(i, Name, sizeof(Name));
                if (APlayerData[i][VIPLevel] > 0)
                {
                    format(VIPList, 500, "%sO %s й Jogador VIP. Nivel vip: %s\n", VIPList, Name, VIPLevelName[APlayerData[i][VIPLevel]]);
                    continue;
                }
            }
        }
        if (strlen(VIPList) > 0)
            ShowPlayerDialog(playerid, DialogNoResponse, DIALOG_STYLE_LIST, "Players Vips Online no LTB:", VIPList, "Ok", "Cancelar");
        else
            SendClientMessage(playerid, 0xFF0000FF, "Nenhum Player vip Online");
    }
    return 1;
}
Reply
#2

Ve na include PPC_FileOperations se tem lб alguma define para salvar o vip
Reply
#3

PlayerFile_Create

format(LineForFile, 100, "Vip %i\r\n", 0); // Construct the line: "Vip <playerlevel>"
fwrite(PFile, LineForFile); // And save it to the file

PlayerFile_Load

if (strcmp(ParameterName, "Vip", false) == 0) // If the parametername is correct ("Level")
APlayerData[playerid][VIPLevel] = strval(ParameterValue); // Store the playerlevel

PlayerFile_Save

format(LineForFile, 100, "Vip %i\r\n", APlayerData[playerid][PlayerVIP]); // Construct the line: "Level <playerlevel>"
fwrite(PFile, LineForFile); // And save it to the file
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)