Raised This Month: $342 Target: $400
 85%   Almost there!

CurWeapon - message vs Event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Abhinash
Senior Member
Join Date: Jan 2015
Location: India,kolkata
Old 08-04-2020 , 16:48   CurWeapon - message vs Event
Reply With Quote #1

So, I got to see that CurWeapon is used in two ways as register_message and register_event.
I want to know the difference between two types and which is used for what.
__________________
Want help in Zombie Plague ?
Visit - zppv.boards.net
Abhinash is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-04-2020 , 23:09   Re: CurWeapon - message vs Event
Reply With Quote #2

Look at the definition of register_message() and register_event() and you should be able to figure out the basic difference. You can also look at plugins that use these to see how they use them.

Note: These links are for AMX Mod X 1.8.2.
__________________
fysiks is offline
Abhinash
Senior Member
Join Date: Jan 2015
Location: India,kolkata
Old 08-05-2020 , 03:53   Re: CurWeapon - message vs Event
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
Look at the definition of register_message() and register_event() and you should be able to figure out the basic difference. You can also look at plugins that use these to see how they use them.

Note: These links are for AMX Mod X 1.8.2.
Fyksis which is more efficient and what about AMX Mod X 1.9
__________________
Want help in Zombie Plague ?
Visit - zppv.boards.net
Abhinash is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-05-2020 , 04:25   Re: CurWeapon - message vs Event
Reply With Quote #4

Quote:
Originally Posted by Abhinash View Post
Fyksis which is more efficient and what about AMX Mod X 1.9
Read the links. The choice between the 2 is not about efficiency.
__________________
HamletEagle is offline
Abhinash
Senior Member
Join Date: Jan 2015
Location: India,kolkata
Old 08-05-2020 , 12:49   Re: CurWeapon - message vs Event
Reply With Quote #5

I read it. So the as per the link register_message hooks directly to the engine. So, using message is better than event ?
What do you say ?
__________________
Want help in Zombie Plague ?
Visit - zppv.boards.net
Abhinash is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-05-2020 , 14:54   Re: CurWeapon - message vs Event
Reply With Quote #6

It's not a 1 to 1 comparison, it depends on what you want to do. register_message allows you to block and alter the message, register_event doesn't.
__________________
HamletEagle is offline
Reply


Thread Tools
Display Modes

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 18:07.


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