View Single Post
Luix
Senior Member
Join Date: Dec 2009
Location: Venezuela
Old 12-22-2017 , 18:05   Re: Polymorph Compatibility
Reply With Quote #925

Quote:
Originally Posted by fysiks View Post
MOD Compatibility
Gungame:
  • Delete mapchooser.amxx.
  • Put poly_mapchooser.amxx in the /plugins folder.
  • Rename it as mapchooser.amxx
  • Add mapchooser.amxx to the list of plugins in the Polymorph MOD initializaition file.
This doesn't work, the poly_mapchooser.sma he uploaded doesn't register the plugin with the correct name in order to detect it.

Gungame detects the mapchooser this way:
PHP Code:
// start a map vote
stock start_mapvote()
{
    new 
dmmName[24], plugin;
    
    
// Galileo - galileo.amxx
    
if(galileoID != -1)
    {
        
log_amx("Starting a map vote from Galileo");
        
        
server_cmd("gal_startvote -nochange");
    }

    
// AMXX Nextmap Chooser - mapchooser.amxx
    
else if((plugin is_plugin_loaded("Nextmap Chooser")) != -1)
    {
        
log_amx("Starting a map vote from Nextmap Chooser");

        new 
oldWinLimit get_cvar_num("mp_winlimit"), oldMaxRounds get_cvar_num("mp_maxrounds");
        
set_cvar_num("mp_winlimit",0); // skip winlimit check
        
set_cvar_num("mp_maxrounds",-1); // trick plugin to think game is almost over

        // call the vote
        
if(callfunc_begin_i(get_func_id("voteNextmap",plugin),plugin) == 1)
            
callfunc_end();

        
// set maxrounds back
        
set_cvar_num("mp_winlimit",oldWinLimit);
        
set_cvar_num("mp_maxrounds",oldMaxRounds);
    } 
I just changed the name of the plugin to "Nextmap Chooser" like the default plugin to make it work. Hope it works for you too
Attached Files
File Type: sma Get Plugin or Get Source (poly_mapchooser.sma - 875 views - 335 Bytes)
__________________

Last edited by Luix; 12-22-2017 at 18:10.
Luix is offline