How do you block radio commands?
As the topic asks...
I'm having issues with wc3 where a user selects an item from a shopmenu and a radio command is executed as well, so I'd like to temporarily block radio commands while the shopmenu is up. Thanks! |
Re: How do you block radio commands?
|
Re: How do you block radio commands?
Tried it... radio commands aren't triggered...
At least they're not triggered on a per-player basis (I did a print out to each entity if it was a valid player and nothing was ever printed when executing a command...) |
Re: How do you block radio commands?
just return PLUGIN_HANDLED in the function thats called on the menu key press,
that will block the menuselect cmd from going to other menus "under" ur custom menu. thats the ONLY way to do it, coz they can have some other menu under it than just one of the radio menus.. :? |
Re: How do you block radio commands?
To clarify, register a menu hook of the raido menu. Then maybe use a global var to see if there viewing the shopmenu and return PLUGIN_HANDLED on the hook. However, I'm not sure this will work, because the command may be "handled" before AMXX even calls your forward, in which it just wouldn't work. This has been gone over a million times, you can't override default commands, but menus may be a different story (fat chance).
|
Re: How do you block radio commands?
How do I register a hook on the radio menus?
|
Re: How do you block radio commands?
register_menu(), and then just put the title of the menu in register_menucmd() [Note: I forgot the exact natives].
|
Re: How do you block radio commands?
Please stop confuse the author of the thread, p3tsin already fully and clearly answered how to solve that issue.
|
Re: How do you block radio commands?
TY for posting that VEN, I totally even missed what p3tsin said.... I just changed all of it + am compiling now
|
| All times are GMT -4. The time now is 20:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.