AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Detect nextmap? (https://forums.alliedmods.net/showthread.php?t=82989)

micke1101 01-02-2009 10:30

Detect nextmap?
 
Hi ive searched but couldnt find answer how can i detect which map has been choosen for next round and use it in a plugin.
Thanks in advanced and code example is appreciated

Exolent[jNr] 01-02-2009 10:52

Re: Detect nextmap?
 
If you are using the default map chooser from the AMX Mod X base package.

Code:
new amx_nextmap; public plugin_init() {     amx_nextmap = get_cvar_pointer("amx_nextmap"); } public yourfunction() {     new nextmap[64];     get_pcvar_string(amx_nextmap, nextmap, sizeof(nextmap) - 1);         // next map }

Make sure this is below the map chooser plugin in the plugins.ini

ConnorMcLeod 01-02-2009 10:54

Re: Detect nextmap?
 
Or retrieve the pointer in plugin.cfg, but this is only needed for 1st map after startup.

micke1101 01-02-2009 11:01

Re: Detect nextmap?
 
Quote:

Originally Posted by Exolent[jNr] (Post 737079)
If you are using the default map chooser from the AMX Mod X base package.

Code:
new amx_nextmap; public plugin_init() { amx_nextmap = get_cvar_pointer("amx_nextmap"); } public yourfunction() { new nextmap[64]; get_pcvar_string(amx_nextmap, nextmap, sizeof(nextmap) - 1); // next map }


Make sure this is below the map chooser plugin in the plugins.ini

Thank you!


All times are GMT -4. The time now is 09:13.

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