case 8:
{
format(string, sizeof(string), "Бgua - %s\nSoda - %s\nBatatas - %s",
FormatNumber(BusinessData[bizid][bizPrices][0]),
FormatNumber(BusinessData[bizid][bizPrices][1]),
FormatNumber(BusinessData[bizid][bizPrices][2])
);
Dialog_Show(playerid, BusinessBuy, DIALOG_STYLE_LIST, BusinessData[bizid][bizName], string, "Comprar", "Cancelar");
}
Esse tutorial: https://sampforum.blast.hk/showthread.php?tid=571736
|
ShowPlayerDialog(playerid, 4112, DIALOG_STYLE_TABLIST_HEADERS, "Buy Weapon",
"Deagle\t$5000\t100\n\
Sawnoff\t$5000\t100\n\
Pistol\t$1000\t50", // Etc.
"Select", "Cancel");
COLUNA1 | COLUNA2 | Coluna3
ShowPlayerDialog(playerid, 4112, DIALOG_STYLE_TABLIST_HEADERS, "Titulo qualquer",
"COLUNA1 \t COLUNA2 \t COLUNA 3\n\
COLUNA1 \t COLUNA2 \t COLUNA 3\n\
COLUNA1 \t COLUNA2 \t COLUNA 3\n", "Select", "Cancel");
Como assim cara?
PHP код:
PARA FUNCIONA sistema de listas, tem que estar "DIALOG_STYLE_TABLIST_HEADERS", e ser do seguinte mйtodo: Код:
COLUNA1 | COLUNA2 | Coluna3 Seria mais ou menos assim: PHP код:
|
Se for para criar uma dialog do 0 do jeito que eu falei eu sei, eu quero editar essa minha e colocar como TABLIST_HEADERS, sу que isso: Dialog_Show(playerid, BusinessBuy, DIALOG_STYLE_LIST, BusinessData[bizid][bizName], string, "Comprar", "Cancelar");
tem o nome 'string' ali, no caso, aonde ficaria a "COLUNA1 \t COLUNA2 \t COLUNA 3\n\ |
Business_PurchaseMenu(playerid, bizid) { if (bizid == -1 || !BusinessData[bizid][bizExists]) return 0; static string[512]; switch (BusinessData[bizid][bizType]) { case 1, 6: { format(string, sizeof(string), "Celular - %s\nGPS - %s\nTinta Spray - %s\nMochila - %s\nGarrafa de Бgua - %s\nRefrigerante - %s\nBilhete de Loteria - %s\nRбdio - %s\nGalгo de Combъstivel - %s\nPй de Cabra - %s\nBoombox - %s\nMбscara - %s\nKit de Primeiros Socorros - %s\nKit de Reparo - %s\nNOS - %s\nTaco de Baseball - %s\nPizza Congelada - %s\nHamburger Congelado - %s", FormatNumber(BusinessData[bizid][bizPrices][0]), FormatNumber(BusinessData[bizid][bizPrices][1]), FormatNumber(BusinessData[bizid][bizPrices][2]), FormatNumber(BusinessData[bizid][bizPrices][3]), FormatNumber(BusinessData[bizid][bizPrices][4]), FormatNumber(BusinessData[bizid][bizPrices][5]), FormatNumber(BusinessData[bizid][bizPrices][6]), FormatNumber(BusinessData[bizid][bizPrices][7]), FormatNumber(BusinessData[bizid][bizPrices][8]), FormatNumber(BusinessData[bizid][bizPrices][9]), FormatNumber(BusinessData[bizid][bizPrices][10]), FormatNumber(BusinessData[bizid][bizPrices][11]), FormatNumber(BusinessData[bizid][bizPrices][12]), FormatNumber(BusinessData[bizid][bizPrices][13]), FormatNumber(BusinessData[bizid][bizPrices][14]), FormatNumber(BusinessData[bizid][bizPrices][15]), FormatNumber(BusinessData[bizid][bizPrices][16]), FormatNumber(BusinessData[bizid][bizPrices][17]) ); Dialog_Show(playerid, BusinessBuy, DIALOG_STYLE_LIST, BusinessData[bizid][bizName], string, "Comprar", "Cancelar"); } case 2: { format(string, sizeof(string), "Colete - %s\nDesert Eagle - %s\nShotgun - %s\nRifle - %s", FormatNumber(BusinessData[bizid][bizPrices][0]), FormatNumber(BusinessData[bizid][bizPrices][1]), FormatNumber(BusinessData[bizid][bizPrices][2]), FormatNumber(BusinessData[bizid][bizPrices][3]) ); Dialog_Show(playerid, BusinessBuy, DIALOG_STYLE_LIST, BusinessData[bizid][bizName], string, "Comprar", "Cancelar"); } case 3: { format(string, sizeof(string), "Roupas - %s\nУculos - %s\nChapйus - %s\nBandana - %s", FormatNumber(BusinessData[bizid][bizPrices][0]), FormatNumber(BusinessData[bizid][bizPrices][1]), FormatNumber(BusinessData[bizid][bizPrices][2]), FormatNumber(BusinessData[bizid][bizPrices][3]) ); Dialog_Show(playerid, BusinessBuy, DIALOG_STYLE_LIST, BusinessData[bizid][bizName], string, "Comprar", "Cancelar"); } case 4: { format(string, sizeof(string), "Бgua - %s\nSoda - %s\nBatatas - %s\nHamburger de Galinha - %s\nHamburger de Frango - %s\nNuggets de Frango - %s\nSalada - %s", FormatNumber(BusinessData[bizid][bizPrices][0]), FormatNumber(BusinessData[bizid][bizPrices][1]), FormatNumber(BusinessData[bizid][bizPrices][2]), FormatNumber(BusinessData[bizid][bizPrices][3]), FormatNumber(BusinessData[bizid][bizPrices][4]), FormatNumber(BusinessData[bizid][bizPrices][5]), FormatNumber(BusinessData[bizid][bizPrices][6]) ); Dialog_Show(playerid, BusinessBuy, DIALOG_STYLE_LIST, BusinessData[bizid][bizName], string, "Comprar", "Cancelar"); } case 7: { string[0] = 0; for (new i = 0; i < sizeof(g_aFurnitureTypes); i ++) { format(string, sizeof(string), "%s%s - %s\n", string, g_aFurnitureTypes[i], FormatNumber(BusinessData[bizid][bizPrices][i])); } Dialog_Show(playerid, BusinessBuy, DIALOG_STYLE_LIST, BusinessData[bizid][bizName], string, "Comprar", "Cancelar"); } case 8: { format(string, sizeof(string), "Бgua - %s\nSoda - %s\nBatatas - %s", FormatNumber(BusinessData[bizid][bizPrices][0]), FormatNumber(BusinessData[bizid][bizPrices][1]), FormatNumber(BusinessData[bizid][bizPrices][2]) ); Dialog_Show(playerid, BusinessBuy, DIALOG_STYLE_LIST, BusinessData[bizid][bizName], string, "Comprar", "Cancelar"); } } return 1; }
format(string, sizeof(string), "Celular - %s\nGPS - %s\nTinta Spray - %s\nMochila - %s\nGarrafa de Бgua - %s\nRefrigerante - %s\nBilhete de Loteria - %s\nRбdio - %s\nGalгo de Combъstivel - %s\nPй de Cabra - %s\nBoombox - %s\nMбscara - %s\nKit de Primeiros Socorros - %s\nKit de Reparo - %s\nNOS - %s\nTaco de Baseball - %s\nPizza Congelada - %s\nHamburger Congelado - %s",
format(string, sizeof(string), "Colete - %s\nDesert Eagle - %s\nShotgun - %s\nRifle - %s",
format(string, sizeof(string), "Roupas - %s\nУculos - %s\nChapйus - %s\nBandana - %s",
format(string, sizeof(string), "Бgua - %s\nSoda - %s\nBatatas - %s\nHamburger de Galinha - %s\nHamburger de Frango - %s\nNuggets de Frango - %s\nSalada - %s",
format(string, sizeof(string), "Бgua - %s\nSoda - %s\nBatatas - %s",