Detecting game start in a listen server?
I'm trying to write a small plugin to allow me to run a few commands once the game actually starts on a listen server, but I can't seem to find a method of detecting game start.
I tried hooking client_putinserver and checking the id, but it never runs for host. Hooking the log message might be best, but I'm not sure which would be best to hook. Any ideas/example code would be welcome. |
Do you mean the start of a new round, or just the start of a map.
For the round: Code:
When a new map is started, one of the first functions that is called is plugin_init. Just do this: Code:
|
I didn't even think to use plugin_init, that works (although I had to set task to wait for everything else to finish loading).
Thanks |
Wait....you didn't use plugin_init()?
I can't even think of something to say. |
Quote:
(;)) |
Quote:
|
plugin_init called after map initialized (all entities spawned etc).
|
| All times are GMT -4. The time now is 05:06. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.