Posts: 292
Threads: 87
Joined: Feb 2011
Reputation:
0
Hello, well i really like the original San Andreas menus, or the function CreateMenu. So i have lets say ammunition shops, food places where i use this system. But lets say i want to have the prices of items dynamic, so lets say if i decide to change Deagle cost from $100 to $150 in the server, then when i go to ammunition shop select Deagle it will show me: Buy item - $150. Whats the best way to go about this? My biggest concern is having strings in them and also not having a bunch of menus, where it just says Buy item - (price), which would be quite a lot of extra menus after you select an item. Also whats the best way to use menus? I mean i just create them on GameModeInit. Is there a better way by creating them and destroying them?? Thank you, i hope my concerns are clear.
Posts: 292
Threads: 87
Joined: Feb 2011
Reputation:
0
I know its on the wiki, i just cannot implement it in my head.. And theres nothing that would explain how to have for example prices with strings in a menu. Thanks for trying to help though!
Posts: 292
Threads: 87
Joined: Feb 2011
Reputation:
0
I understand that, but check this out. So i have a menu. I create OnGameModeInit:
AddMenuItem(examplemenu, 0, "BUY");
AddMenuItem(examplemenu, 1, "$150");
So now i would have to create 10 different menus that have BUY in them and prices, because of the different costs? Because lets say this is were i start of:
examplemenu = CreateMenu("Guns", 1, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(examplemenu, 0, "Deagle");
AddMenuItem(examplemenu, 0, "9mm");
Now lets say i select one of these and then my menu is this for lets say deagle:
examplemenu2 = CreateMenu("Guns", 2, 200.0, 100.0, 150.0, 150.0);
AddMenuItem(examplemenu2, 0, "BUY");
AddMenuItem(examplemenu2, 1, "$150");
So if i wanted to do it like this, then for selecting lets say the 9mm option, i would have to have yet another menu created just to have BUY and price in it? Because i do not want prices in the first selection menu. I want it to be like, you select what you want and then it says the to buy it and the price. So again my question is that, i would have to keep on creating new menus because of the differentiating costs??