Raised This Month: $ Target: $400
 0% 

Detect nextmap?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
micke1101
Veteran Member
Join Date: Jan 2008
Location: Banned-town
Old 01-02-2009 , 10:30   Detect nextmap?
Reply With Quote #1

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
micke1101 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-02-2009 , 10:52   Re: Detect nextmap?
Reply With Quote #2

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
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-02-2009 , 10:54   Re: Detect nextmap?
Reply With Quote #3

Or retrieve the pointer in plugin.cfg, but this is only needed for 1st map after startup.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
micke1101
Veteran Member
Join Date: Jan 2008
Location: Banned-town
Old 01-02-2009 , 11:01   Re: Detect nextmap?
Reply With Quote #4

Quote:
Originally Posted by Exolent[jNr] View Post
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!
micke1101 is offline
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 09:13.


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