Raised This Month: $ Target: $400
 0% 

Hooking Events


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
GinNNy
Senior Member
Join Date: Mar 2014
Old 06-06-2015 , 00:20   Re: Hooking Events
Reply With Quote #6

Quote:
Originally Posted by Powerlord View Post
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.
https://wiki.alliedmods.net/Events_%...d_Scripting%29
Thank you for your help got it work
GinNNy is offline
 


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


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