Menu with different options if conditions are met
Hi Guys,
So just to explain, what I am trying to do is have a menu of weapons with different skins available for players if they have purchased it. Problem I have is that if I select Carbon from the menu but I don't have Burner available then I will receive model Burner rather than Carbon. Simply because if I don't have option Burner than option Carbon is first and responds to case 0. How do I show things in the menu but don't let players choose it unless my condition is met? I know I am confusing but I cannot explain it clearer. Please ask questions, I will answer all of them for help :) . Code:
public display_pistolet(id) |
Re: Menu with different options if conditions are met
I have realised that
Code:
if(Burner1[id] > 0){ |
Re: Menu with different options if conditions are met
The solution is to use the menu item's "info" to uniquely identify the items in the menu. With this method, shown below, when you choose option 5, only option 5 will be executed.
PHP Code:
|
Re: Menu with different options if conditions are met
That's brilliant, do you also happen to know if there is a chance to show the option in the menu but don't let the people use it unless they met this criteria? Otherwise the menu is blank and people may not know what's the matter.
|
Re: Menu with different options if conditions are met
you can create a menu item callback and return ITEM_DISABLED there when needed
Code:
|
Re: Menu with different options if conditions are met
Brilliant! That's what I was looking for. Thanks!
|
| All times are GMT -4. The time now is 20:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.