AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   register_event map start? (https://forums.alliedmods.net/showthread.php?t=25662)

Blaza 03-18-2006 02:44

register_event map start?
 
How can Iset a event trigger for when a map loads?

I tried
Code:
register_logevent("on_map_start", 2, "0=Started map");
in my plugin_init but it doesnt seem to trigger.

In case I did it wrong, here is the corrasponding line from the server logs:
Code:

L 03/17/2006 - 22:14:12: Started map "de_italystreets_cz" (CRC "2060379185")
Thanks for any help.

VEN 03-18-2006 03:18

Probably your plugin isn't started at the time you trying to catch that log message. Use plugin_init or plugin_cfg forward instead.

Blaza 03-18-2006 10:29

I thought plugin_init/cfg only exec on server start?

The help file that comes with amxx states that
Quote:

This is called on ServerActivate. You should call register_plugin here.
Are plugin_init/cfg exec'ed on map change too?

VEN 03-18-2006 11:08

plugin_init() - map start
plugin_end() - map end

Blaza 03-18-2006 11:37

ok thx


All times are GMT -4. The time now is 16:30.

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