Raised This Month: $ Target: $400
 0% 

register_event map start?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blaza
Member
Join Date: May 2005
Old 03-18-2006 , 02:44   register_event map start?
Reply With Quote #1

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.
Blaza is offline
Send a message via ICQ to Blaza Send a message via AIM to Blaza Send a message via MSN to Blaza Send a message via Yahoo to Blaza
VEN
Veteran Member
Join Date: Jan 2005
Old 03-18-2006 , 03:18  
Reply With Quote #2

Probably your plugin isn't started at the time you trying to catch that log message. Use plugin_init or plugin_cfg forward instead.
VEN is offline
Blaza
Member
Join Date: May 2005
Old 03-18-2006 , 10:29  
Reply With Quote #3

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?
Blaza is offline
Send a message via ICQ to Blaza Send a message via AIM to Blaza Send a message via MSN to Blaza Send a message via Yahoo to Blaza
VEN
Veteran Member
Join Date: Jan 2005
Old 03-18-2006 , 11:08  
Reply With Quote #4

plugin_init() - map start
plugin_end() - map end
VEN is offline
Blaza
Member
Join Date: May 2005
Old 03-18-2006 , 11:37  
Reply With Quote #5

ok thx
Blaza is offline
Send a message via ICQ to Blaza Send a message via AIM to Blaza Send a message via MSN to Blaza Send a message via Yahoo to Blaza
Reply



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 16:30.


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