Код:
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;
}