14.03.2015, 19:37
@Patrik,
he wants it so they can't type it again ever... Not if they have VIP already...
Basically do something like this, #OP:
Then...
Make sure you incorporate the DonateGotten variable into your loading / saving system.
he wants it so they can't type it again ever... Not if they have VIP already...
Basically do something like this, #OP:
pawn Код:
CMD:buyvip(playerid, params[])
{
if(PlayerInfo[playerid][pDonateGotten] >= 1)
{
SendClientMessage(playerid, COLOR_YELLOW, " You are already a VIP-Player!.");
return 1;
}
ShowPlayerDialogEx(playerid, BUYVIP, DIALOG_STYLE_LIST, "Buy Personal Donator Package", "Bronze Donator - {00FF00}Free\n{FFFFFF}Silver Donator - {00FF00}Free\n{FFFFFF}Gold Donator - {00FF00}Free", "Select", "Cancel");
return 1;
}
pawn Код:
if(dialogid == BUYVIP)
{
if(response)
{
if(listitem == 0)
{
PlayerInfo[playerid][pDonator] = 1;
PlayerInfo[playerid][pDonateGotten] = 1;
SendClientMessage(playerid, COLOR_YELLOW,"Server : You bought a free 31 days Bronze Donator Package!");
new adminmessss[128];
format(adminmessss, sizeof(adminmessss), "AdmCmd: %s has just get his/her free Bronze Donator Package!.", GetPlayerNameEx(playerid));
ABroadCast(COLOR_LIGHTRED,adminmessss,1);
}
if(listitem == 1)
{
PlayerInfo[playerid][pDonator] = 2;
PlayerInfo[playerid][pDonateGotten] = 1;
SendClientMessage(playerid, COLOR_YELLOW,"Server : You have bought a free 31 days Silver Donator Package.");
new vipmesss[128];
format(vipmesss, sizeof(vipmesss), "AdmCmd: %s has just get his/her free Silver Donator Package!", GetPlayerNameEx(playerid));
ABroadCast(COLOR_LIGHTRED,vipmesss,1);
}
if (listitem == 2)
{
PlayerInfo[playerid][pDonator] = 3;
PlayerInfo[playerid][pDonateGotten] = 1;
SendClientMessage(playerid, COLOR_YELLOW,"Server : You have bought a free 31 days Gold Donator Package.");
new goldmess[128];
format(goldmess, sizeof(goldmess), "AdmCmd: %s has just get his/her free Gold Donator Package!", GetPlayerNameEx(playerid));
ABroadCast(COLOR_LIGHTRED,goldmess,1);
}
}
}