Raised This Month: $32 Target: $400
 8% 

register message vs event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 08-19-2022 , 22:42   register message vs event
Reply With Quote #1

Hello! I have a doubt, which is better to use, register event or message, thinking that it will be called several times in short intervals, there are times when the same event or message share a name and both can be used, but what is it? faster and more efficient?, for modding is better to use message i think, cause u can edit the message ints/coords/string etc, if i wanna add an extra effect i need to use event? thanks!

Last edited by MrPickles; 08-19-2022 at 22:44.
MrPickles is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-20-2022 , 01:30   Re: register message vs event
Reply With Quote #2

Use the one that does what you need it to do. It is highly unlikely that there will be any appreciable difference in performance. If you find that when you implement it and it's causing issues then re-examine then.

Such broad and generic questions don't generally get good responses. It's better if you ask specifically about something you're trying to do.
__________________

Last edited by fysiks; 08-20-2022 at 01:42.
fysiks is offline
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 08-20-2022 , 02:29   Re: register message vs event
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
Use the one that does what you need it to do. It is highly unlikely that there will be any appreciable difference in performance. If you find that when you implement it and it's causing issues then re-examine then.

Such broad and generic questions don't generally get good responses. It's better if you ask specifically about something you're trying to do.
i said it

Quote:
for modding is better to use message i think, cause u can edit the message ints/coords/string etc, if i wanna add an extra effect i need to use event? thanks!
It's more of a doubt than a specific question.

Last edited by MrPickles; 08-20-2022 at 02:30.
MrPickles is offline
Old 08-20-2022, 08:54
kww
This message has been deleted by kww. Reason: stupid
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-20-2022 , 09:01   Re: register message vs event
Reply With Quote #4

Events are hooked as post, you can not block or alter the event.
Messages are hooked as pre, it allows you to block/alter the message.

That's all there is to it. Pick the one that does what you need.
This is not a question about efficiency or performance.
__________________

Last edited by HamletEagle; 08-20-2022 at 09:01.
HamletEagle is offline
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 08-20-2022 , 16:01   Re: register message vs event
Reply With Quote #5

Quote:
Originally Posted by HamletEagle View Post
Events are hooked as post, you can not block or alter the event.
Messages are hooked as pre, it allows you to block/alter the message.

That's all there is to it. Pick the one that does what you need.
This is not a question about efficiency or performance.
thanksss
MrPickles 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 08:22.


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