05.11.2009, 18:18
Hi ! I'm actually scripting a shop system, where people can buy or sell some stuffs from their inventories. I'm having some problems for the buying part, as the prices and the quantities aren't always the same (setted by the seller).
So i have to extract the values from the " Menu row" they selected, to take the money, and give them the stuffs they bought.
It's hard to explain so i took a screen shot :

How can i do ?
I also add the script of the menu, dunno if it can help.
So i have to extract the values from the " Menu row" they selected, to take the money, and give them the stuffs they bought.
It's hard to explain so i took a screen shot :

How can i do ?
I also add the script of the menu, dunno if it can help.
Код:
public CreateAKBulletsMenus() { AK47Bullets = CreateMenu("AK47 Bullets", 2, 200.0, 100.0, 150.0, 150.0); new quantity[240]; for(new i = 0; i < sizeof(SHOP); i++) { if(SHOP[i][Item] == 24) { if(SHOP[i][Quantity] > 0) { format(quantity,240,"%d x AK47 Bullets",SHOP[i][Quantity]); AddMenuItem(AK47Bullets, 0, quantity); format(quantity,240," %d $",SHOP[i][Price]); AddMenuItem(AK47Bullets, 1, quantity); } } } AddMenuItem(AK47Bullets, 0, "[Exit]"); }