Hiding menu options & Drop weapon [ Solved ]
1.How to hide the menu after a player chosed one option?
Code:
2.And how i can make a player drop weapon and cant pickup? I used Code:
|
Try make weaponbox entity not solid.
|
At the menu, any code to make an submenu unselectable ?
Please need help. |
For the menu, try making a global variable, ie, g_MenuDone[33].
On putinserver, assign every id g_MenuDone[id] = 0. Do a check in the menu, Code:
Everytime they make a selection, make the players id 1, Code:
On every round end, reset the variable. So on round end, you should have something like Code:
|
Help
Ok. I'm a newbie in amxx scripting. Can you modifi my script? I searched for global variables in doc but haven't found about them.
Code:
How to add that function in here? Plz help me. Newbie ask for help :cry: |
Just add this at the end of your giveWeapon function:
show_menu(id, 0, " ", 0) That'll remove the menu from displaying. |
show_menu(id, 0, " ", 0) doesn't work. :(( I got this error: Error: Expected token: ")", but found "-identifier-" on line 79
Ok, sucks. I will try to make other type of plugin, not with menus :((. |
You have more problems than just that, I just tried compiling what you had on here:
That line that you mentioned is due to this: if( MENU_KEY_3 == No ending bracket, besides that what is it suppose to be doing? Another problem inside: plugin_init() new g_MenuDone[id] ^ what is that for? plugin_init doesn't send an id, so why is that declared here ? :shock: |
A little tip, properly structure you statements and functions. It makes finding errors quicker and updating your script in the future.
Code:
|
For giveWeapon(id, key)
You could use a switch statement instead of loads of if/else if/else Example: Code:
|
| All times are GMT -4. The time now is 05:06. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.