23.03.2013, 18:18
Hello, I need help to create a saving dialogs after buying one toys with mSelection, ie after buying the toys, the display shows a dialog with slots for click on one and saved in that.
Please !
OnPlayerModelSelection.
Dialogs
Commands
My English is not very good so if you do not understand well let me know
Please !

OnPlayerModelSelection.
Код:
if(listid == toyslist) { if(response) { new index, string[128]; PlayerInfo[playerid][pToyModel][index] = modelid; GiveZaiatMoney(playerid, -300); format(string, sizeof(string), "* %s ha comprado un toy por $300.", RPN(playerid)); SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); SendClientMessage(playerid, COLOR_WHITE, " Puedes ver y editar los toys usando /toys."); } else SendClientMessage(playerid, 0xFFFF00FF, "As salido del catalogo de skins"); return 1; }
Код:
else if(dialogid == 19) { if(response) { switch(listitem) { case 0: toyslot[playerid] = 0; case 1: toyslot[playerid] = 1; case 2: toyslot[playerid] = 2; case 3: toyslot[playerid] = 3; case 4: toyslot[playerid] = 4; case 5: toyslot[playerid] = 5; case 6: toyslot[playerid] = 6; case 7: toyslot[playerid] = 7; case 8: toyslot[playerid] = 8; case 9: toyslot[playerid] = 9; } new index = toyslot[playerid]; if(PlayerInfo[playerid][pToyModel][index] == 0) { ShowDialog(playerid, 19); } else { ShowDialog(playerid, 28); } } }
Код:
CMD:ctoys(playerid, params[]) { new idx = GetPlayerVirtualWorld(playerid)-100; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "No estas logueado."); if(idx > 0 && idx < MAX_BIZ && BizInfo[idx][bType] != 2 || idx < 1 || idx > MAX_BIZ) return SendClientMessage(playerid, COLOR_GREY, "No estas en la tienda de Ropa."); if(BizInfo[idx][bProducts] < 1) return SendClientMessage(playerid, COLOR_GREY, "El negocio tiene los productos agotados."); if(PlayerInfo[playerid][pMoney] < 300) return SendClientMessage(playerid, COLOR_GREY, "No tienes suficiente dinero."); { ShowModelSelectionMenu(playerid, toyslist, "Elige el Toys"); } return 1; }