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

Which is best to HookEvents?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Steveh
Member
Join Date: Oct 2010
Old 04-20-2011 , 06:44   Which is best to HookEvents?
Reply With Quote #1

Hello,
When hooking events, is it better to hook them in OnMapStart() or OnPluginStart(). Or does it not matter?

Steveh
Steveh is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 04-20-2011 , 06:49   Re: Which is best to HookEvents?
Reply With Quote #2

Plugin start, you only want to hook them once or you'll get an error. OnMapStart would be ok too but every OnMapEnd you would have to unhook. So just hooking once OnPluginStart() is best.
__________________
Silvers is offline
Steveh
Member
Join Date: Oct 2010
Old 04-20-2011 , 07:08   Re: Which is best to HookEvents?
Reply With Quote #3

Thanks for your quick reply!

Steveh
Steveh 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 01:08.


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