AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Catch a map changing (https://forums.alliedmods.net/showthread.php?t=11267)

_Serj 03-14-2005 07:23

Catch a map changing
 
Hi!
Can somebody help me?

I want to handle a map changing event. I code next:
Code:
public plugin_init() {     ...     register_logevent("started_map", 3, "0=Started map")     ... } public started_map() {     server_print("Map started...")     ...     return PLUGIN_CONTINUE  }
But nothing happens.

If I catch the round start event:
Code:
register_logevent("round_start", 2, "1=Round_Start") ... public round_start() {     server_print("Round started...")     ...     return PLUGIN_CONTINUE  }
All is work!

Where is my mistake?

PM 03-14-2005 11:19

Do your map-changing-handling-code in your plugin_init or plugin_cfg (if you rely on all plugin_inits being already called).

_Serj 03-15-2005 01:44

Quote:

Originally Posted by PM
Do your map-changing-handling-code in your plugin_init or plugin_cfg (if you rely on all plugin_inits being already called).

Sorry PM, but I don't understand what you mean (my native language is Russian). :(

Can you explain it more simpler?
Thanks!

Stop... Do you mean when the map is changing the amxx don't call plugin_init yet? So what to do?!!

Freecode 03-15-2005 01:48

on Govarit shto v plugin_init() ti mojes delat shto tebe nado potomashta plugin_init() gets called kogda map zagrujilac :D

_Serj 03-15-2005 02:10

Quote:

Originally Posted by Freecode
on Govarit shto v plugin_init() ti mojes delat shto tebe nado potomashta plugin_init() gets called kogda map zagrujilac :D

Thanks pal!

Freecode 03-15-2005 12:08

:wink:


All times are GMT -4. The time now is 14:05.

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