14.03.2015, 13:37
The title says, is that possible for example, he typed /buyvip.. After he get his FREE VIP then he cannot repeat it again for entire life of his account.. I mean if he typed it again .. There will be a word that saying ... You already got your FREE VIP.. Here's my code..
+1 Reputation for who helps me.!
Код:
CMD:buyvip(playerid, params[]) { { 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; }
Код:
if(dialogid == BUYVIP) { if(response) { if(listitem == 0) { PlayerInfo[playerid][pDonator] = 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; 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; 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); } } }