Raised This Month: $51 Target: $400
 12% 

How do you block radio commands?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 11-10-2006 , 21:02   How do you block radio commands?
Reply With Quote #1

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!
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
The Specialist
BANNED
Join Date: Nov 2006
Old 11-10-2006 , 21:18   Re: How do you block radio commands?
Reply With Quote #2

here you go

http://forums.alliedmods.net/showthread.php?t=45461
The Specialist is offline
Send a message via AIM to The Specialist
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 11-10-2006 , 21:30   Re: How do you block radio commands?
Reply With Quote #3

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...)
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 11-11-2006 , 07:21   Re: How do you block radio commands?
Reply With Quote #4

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..
__________________
plop
p3tsin is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 11-11-2006 , 08:27   Re: How do you block radio commands?
Reply With Quote #5

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).
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 11-11-2006 , 11:01   Re: How do you block radio commands?
Reply With Quote #6

How do I register a hook on the radio menus?
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Zenith77
Veteran Member
Join Date: Aug 2005
Old 11-11-2006 , 12:39   Re: How do you block radio commands?
Reply With Quote #7

register_menu(), and then just put the title of the menu in register_menucmd() [Note: I forgot the exact natives].
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 11-11-2006 , 15:10   Re: How do you block radio commands?
Reply With Quote #8

Please stop confuse the author of the thread, p3tsin already fully and clearly answered how to solve that issue.
VEN is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 11-11-2006 , 15:40   Re: How do you block radio commands?
Reply With Quote #9

TY for posting that VEN, I totally even missed what p3tsin said.... I just changed all of it + am compiling now
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:48.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode