Raised This Month: $ Target: $400
 0% 

Blocking Messages doubt


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 07-24-2010 , 08:29   Blocking Messages doubt
Reply With Quote #1

Simple question, expresed in the code:

Code:
new gMsgShowMenu; public plugin_init() {     gMsgShowMenu = get_user_msgid("ShowMenu");     set_msg_block(gMsgShowMenu, BLOCK_SET);         register_message(gMsgShowMenu, "MessageShowMenu"); } public MessageShowMenu(msgid, dest, id) {     // the code here will be executed?     // Or not, becouse the msg is blocked? }

Or i have to put a return PLUGIN_HANDLED to block it and before that add the code that i want?
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-24-2010 , 09:15   Re: Blocking Messages doubt
Reply With Quote #2

You could just test it, change the message to SayText, add a message in hook and type something in-game.
It's not that hard and it won't take more than a few minutes.
__________________
Hunter-Digital is offline
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 07-24-2010 , 10:30   Re: Blocking Messages doubt
Reply With Quote #3

Ye i know but, i posted becouse i can't test now.

That i want to know is what means "block" in this case... means that complete block the messages and cannot be registered or block the message send by the game but you can register it.

Sry for my english.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 07-25-2010 , 09:44   Re: Blocking Messages doubt
Reply With Quote #4

Ok just tested it, it's blocked completly, the registered function doesn't trigger.
__________________
Hunter-Digital is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-25-2010 , 10:15   Re: Blocking Messages doubt
Reply With Quote #5

That message wont ever be sent to players.
But MessageShowMenu callcack can be called.

You should just log something into the callback or look at amxx sources to know if function gonna be executed (register_message and registered_event).
Then if you need to catch specific messages/events you should use register_event.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
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 05:32.


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