[Ajuda] Ajuda sistema de vip - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ajuda sistema de vip (
/showthread.php?tid=463057)
Ajuda sistema de vip -
Canema - 10.09.2013
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;
}
Re: Ajuda sistema de vip -
JoaoMonteiro452 - 11.09.2013
Ve na include PPC_FileOperations se tem lб alguma define para salvar o vip
Re: Ajuda sistema de vip -
JoaoMonteiro452 - 11.09.2013
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