if((dialogid == BUYTOYS) && response) { new stringg[512]; for(new x;x<MAX_PLAYERTOYS;x++) { new name[24]; format(name, sizeof(name), "None"); for(new i;i<sizeof(HoldingObjectsAll);i++) { if(HoldingObjectsAll[i][holdingmodelid] == PlayerToyInfo[playerid][x][ptModelID]) { format(name, sizeof(name), "%s", HoldingObjectsAll[i][holdingmodelname]); } } format(stringg, sizeof(stringg), "%s(%d) %s (Bone: %s)\n", stringg, x, name, HoldingBones[PlayerToyInfo[playerid][x][ptBone]]); } ShowPlayerDialogEx(playerid, BUYTOYS2, DIALOG_STYLE_LIST, "Select a Slot", stringg, "Select", "Cancel"); }
Show us your command to open this dialog and dialogid for BUYTOYS2
|
CMD:buytoys(playerid, params[]) { // (TEMPORARY - ZHAO NOTE) NO VIP added yet /*if(IsPlayerInRangeOfPoint(playerid, 4, 2787.095947, 2390.353027, 1240.531127)) { if(PlayerInfo[playerid][pDonator] < 3) { SendClientMessage(playerid, COLOR_WHITE, "* you're not a Gold or Undefined Donator!"); } else { ShowPlayerDialogEx(playerid, BUYTOYSGOLD, DIALOG_STYLE_MSGBOX, "Toy Store", "Welcome to the VIP toy store! Here you can buy accessories to attach to your player.\n\nFirst, we will choose a slot to store the toy in.","Continue", "Cancel"); } }*/ if(IsAtClothShop(playerid)) { ShowPlayerDialogEx(playerid, BUYTOYS, DIALOG_STYLE_MSGBOX, "Toy Store", "Welcome to the toy store! Here you can buy accessories to attach to your player.\n\nFirst, we will choose a slot to store the toy in.\n(Note: Non-Donators can only hold 5 toys, Bronze-Gold Donator can hold 6-8)","Continue", "Cancel"); //ShowPlayerDialogEx(playerid, BUYTOYS, DIALOG_STYLE_MSGBOX, "Toy Store", "Welcome to the toy store! Here you can buy accessories to attach to your player.\n\nFirst, we will choose a slot to store the toy in.\n(Note: You can only hold 5 toys)","Continue", "Cancel"); } else { SendClientMessage(playerid, COLOR_WHITE, " You're not in a Clothing Shop!"); } return 1; }
if((dialogid == BUYTOYS) && response) { new stringg[512]; for(new x;x<MAX_PLAYERTOYS;x++) { new name[24]; format(name, sizeof(name), "None"); for(new i;i<sizeof(HoldingObjectsAll);i++) { if(HoldingObjectsAll[i][holdingmodelid] == PlayerToyInfo[playerid][x][ptModelID]) { format(name, sizeof(name), "%s", HoldingObjectsAll[i][holdingmodelname]); } } format(stringg, sizeof(stringg), "%s(%d) %s (Bone: %s)\n", stringg, x, name, HoldingBones[PlayerToyInfo[playerid][x][ptBone]]); } ShowPlayerDialogEx(playerid, BUYTOYS2, DIALOG_STYLE_LIST, "Select a Slot", stringg, "Select", "Cancel"); } if((dialogid == BUYTOYS2) && response) { if(listitem == 5 && PlayerInfo[playerid][pDonator] < 1) return SendClientMessage(playerid, COLOR_WHITE, "* You must be a Bronze+ Donator to use that slot!"); if(listitem == 6 && PlayerInfo[playerid][pDonator] < 2) return SendClientMessage(playerid, COLOR_WHITE, "* You must be a Silver+ Donator to use that slot!"); if(listitem == 7 && PlayerInfo[playerid][pDonator] < 3) return SendClientMessage(playerid, COLOR_WHITE, "* You must be a Gold+ Donator to use that slot!"); if(PlayerToyInfo[playerid][listitem][ptModelID] != 0) return SendClientMessage(playerid, COLOR_YELLOW, "* You already have something in that slot. Delete it with /toys"); slotselection[playerid] = listitem; new stringg[3500]; for(new x;x<sizeof(HoldingObjects);x++) { format(stringg, sizeof(stringg), "%s%s ($%d)\n", stringg, HoldingObjects[x][holdingmodelname], HoldingObjects[x][holdingprice]); } ShowPlayerDialogEx(playerid, BUYTOYS3, DIALOG_STYLE_LIST, "Select an Item", stringg, "Buy", "Cancel"); }
if(PlayerInfo[playerid][pDonator] >= 1)