Raised This Month: $ Target: $400
 0% 

Hooking Events


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-05-2015 , 10:15   Re: Hooking Events
Reply With Quote #5

I've never heard of those 4 events.

For round start, games use either the "round_start" or "teamplay_round_start" events. If a game is firing one of these events, it won't fire the other, so you need to hook both.

For round end, games use either the "round_end" or "teamplay_round_win" events. Nuclear Dawn uses "round_win" just to throw you off further.

HookEventEx can be used to hook events if you don't want the plugin to error if the event doesn't exist. This is mandatory for things like teamplay_round_start as not all games support it.

I'm not sure what you're trying to do with "game_message", but instead of "game_newmap" you should be using SourceMod's OnMapStart or OnConfigsExecuted callbacks. The latter must be used if you're reading cvar values.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 06-05-2015 at 10:19.
Powerlord is offline
 



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:00.


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