AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   CurWeapon - message vs Event (https://forums.alliedmods.net/showthread.php?t=326532)

Abhinash 08-04-2020 16:48

CurWeapon - message vs Event
 
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.

fysiks 08-04-2020 23:09

Re: CurWeapon - message vs Event
 
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.

Abhinash 08-05-2020 03:53

Re: CurWeapon - message vs Event
 
Quote:

Originally Posted by fysiks (Post 2713042)
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

HamletEagle 08-05-2020 04:25

Re: CurWeapon - message vs Event
 
Quote:

Originally Posted by Abhinash (Post 2713061)
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.

Abhinash 08-05-2020 12:49

Re: CurWeapon - message vs Event
 
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 ?

HamletEagle 08-05-2020 14:54

Re: CurWeapon - message vs Event
 
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.


All times are GMT -4. The time now is 12:01.

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