Hooking Events
Hello
Can someone give me an example of hooking events in Sourcepawn like New round, round start and round ending. As i didn't see it anywhere here as AMXX have a tutorial here: https://forums.alliedmods.net/showthread.php?t=42159 |
Re: Hooking Events
Did you try searching? Anyways it's in the wiki
https://wiki.alliedmods.net/Events_%...d_Scripting%29 |
Re: Hooking Events
PHP Code:
|
Re: Hooking Events
These events are not working.
I got the right events thanks anyway. |
Re: Hooking Events
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. |
Re: Hooking Events
Here's a list of all events
https://wiki.alliedmods.net/Game_Events_(Source) |
Re: Hooking Events
Quote:
Thank you for your help got it work :) |
Re: Hooking Events
Quote:
|
| All times are GMT -4. The time now is 18:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.