AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   Module: Map Name Patcher v1.0 [Linux + Windows] (https://forums.alliedmods.net/showthread.php?t=198362)

claudiuhks 10-14-2012 19:08

Module: Map Name Patcher v1.0 [Linux + Windows]
 
4 Attachment(s)
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]
♠ This extension is a possible request, see http://forums.alliedmods.net/showthread.php?t=194069
♠ Original idea by K.K.Lv
♠ Patching method by Twilight Suzuka at http://forums.alliedmods.net/showthread.php?t=23152

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

Source code

♠ View MapName Patcher C++ file!

AMX Mod X connection

♠ Example of plugin:
Spoiler

claudiuhks 10-14-2012 19:25

Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
 
1 Attachment(s)
Do you want a map name like this one?

http://oi47.tinypic.com/1gq05c.jpg

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:

PHP Code:

#include < amxmodx >
#include < mapname_patcher >

public plugin_cfg( ) {
    new 
File fopen"addons/amxmodx/configs/MapName.ini""r" );
    if( 
File != ) {
        static 
Buffer256 ];
        
fgetsFileBuffercharsmaxBuffer ) );
        
fcloseFile );
        
trimBuffer );
        
Patch_MapNameBuffer );
    }



Destro- 10-14-2012 19:55

Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
 
very good :)

micapat 10-14-2012 20:05

Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
 
Allocate "pMapName" is useless here, btw I'm not sure that the max size is 128 ( 32 ? ).

claudiuhks 10-14-2012 20:17

Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
 
Quote:

Originally Posted by micapat (Post 1819044)
I'm not sure that the max size is 128 ( 32 ? ).

Depends. The Server Browser query will only take 31 or 32 characters from string.
If you type status in your game console you will be able to see the string contains 128 characters.

Quote:

Originally Posted by micapat (Post 1819044)
Allocate "pMapName" is useless here

I agree.

Neeeeeeeeeel.- 10-14-2012 21:44

Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
 
Awesome:D

Bos93 10-15-2012 03:08

Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
 
Thanks :-)

xakintosh 10-15-2012 03:45

Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
 
Is it possible to patch count for clients to change it too.
Well Done module.

claudiuhks 10-15-2012 03:46

Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
 
Quote:

Originally Posted by xakintosh (Post 1819187)
Is it possible to patch count for clients to change it too.
Well Done module.

Will definitely try to patch other members from globalvars_t.
The problem is that globalvars_t doesn't contain clientsCount, just maxClients.

xakintosh 10-15-2012 06:07

Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
 
Just a question is it possible to change Dust2 ( Bomb ) to Private without dust2 extension.


All times are GMT -4. The time now is 10:15.

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