Page 1 of 1

Module: Map Name Patcher v1.0 [Linux + Windows]

Posted: Tue Oct 20, 2026 7:01 am
by Archive-Poster
MapName Patcher
1.0

Informations

♠ You may change the map name through Patch_MapName native
♠ Maximum length is 128 characters [not sure about the maximum length of the string]

Installation

♠ Upload mapname_patcher_amxx.dll and mapname_patcher_amxx_i386.so in addons/amxmodx/modules
♠ Attach your plugin to AMX Mod X adding line YourPluginName.amxx in addons/amxmodx/configs/plugins.ini

AMX Mod X connection

♠ Example of plugin:

Code: Select all

/* AMX Mod X */
#include < amxmodx >
#include < mapname_patcher >

public plugin_cfg( )
  Patch_MapName( "de_dust2 (Bomb)" );

Re: Module: Map Name Patcher v1.0 [Linux + Windows]

Posted: Tue Oct 20, 2026 7:02 am
by Archive-Poster
Either you download Notepad Plus Plus software and create a new file with UTF-8 without BOM [ANSI as UTF-8] encoding or download the attached file then edit it.

Example:

Code: Select all

#include < amxmodx >
#include < mapname_patcher >

public plugin_cfg( ) {
    new File = fopen( "addons/amxmodx/configs/MapName.ini", "r" );
    if( File != 0 ) {
        static Buffer[ 256 ];
        fgets( File, Buffer, charsmax( Buffer ) );
        fclose( File );
        trim( Buffer );
        Patch_MapName( Buffer );
    }
} 

Re: Module: Map Name Patcher v1.0 [Linux + Windows]

Posted: Tue Oct 20, 2026 7:03 am
by Archive-Poster
Cool stuff
I remove the prefix from the map name (de_, cs_, as_, awp_, etc).

Code: Select all

    new szMapName[ 32 ]
    get_mapname( szMapName, charsmax( szMapName ) )
    
    if( containi( szMapName, "_" ) != -1 )
    {
        new szMapPrefix[ 10 ]
        new szMapSufix[ 32 ]
        
        strtok( szMapName, szMapPrefix, charsmax( szMapPrefix ), szMapSufix, charsmax( szMapSufix ), '_' )
        
        Patch_MapName( szMapSufix )        
    } 

Re: Module: Map Name Patcher v1.0 [Linux + Windows]

Posted: Tue Oct 20, 2026 7:04 am
by Archive-Poster
Can this change each map name? Because I can only change all map names to the same name
Yes after my post i realized how dumb I was

I made this way

Code: Select all

#include < amxmodx >
#include < mapname_patcher >

public plugin_init()
{
    
    new szMapName[ 32 ]
    get_mapname( szMapName, charsmax( szMapName ) )
    
    if(equali(szMapName,"de_dust2"))
    {
    Patch_MapName( "de_dust2 [FZ]" );
    }
}

Re: Module: Map Name Patcher v1.0 [Linux + Windows]

Posted: Tue Oct 20, 2026 7:05 am
by Archive-Poster
small bug

start server

"de_dust" change to "Dust"

restart map - servers crash

because no map "Dust"
Use changelevel %MapName% instead.