Raised This Month: $32 Target: $400
 8% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 10-14-2012 , 19:08   Module: Map Name Patcher v1.0 [Linux + Windows]
Reply With Quote #1

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
Attached Files
File Type: zip Mapname Patcher Source Code.zip (270.1 KB, 488 views)
File Type: dll mapname_patcher_amxx.dll (76.0 KB, 8531 views)
File Type: so mapname_patcher_amxx_i386.so (25.5 KB, 555 views)
File Type: inc mapname_patcher.inc (410 Bytes, 782 views)
__________________

Last edited by claudiuhks; 12-27-2012 at 22:36.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 10-14-2012 , 19:25   Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
Reply With Quote #2

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 );
    }

Attached Files
File Type: ini MapName.ini (9 Bytes, 555 views)
__________________

Last edited by claudiuhks; 10-14-2012 at 20:25.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Destro-
Veteran Member
Join Date: Jun 2010
Location: $me->location();
Old 10-14-2012 , 19:55   Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
Reply With Quote #3

very good
__________________
Destro- is offline
micapat
Veteran Member
Join Date: Feb 2010
Location: Nyuu, nyuu (France).
Old 10-14-2012 , 20:05   Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
Reply With Quote #4

Allocate "pMapName" is useless here, btw I'm not sure that the max size is 128 ( 32 ? ).
__________________
micapat is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 10-14-2012 , 20:17   Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
Reply With Quote #5

Quote:
Originally Posted by micapat View Post
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 View Post
Allocate "pMapName" is useless here
I agree.
__________________

Last edited by claudiuhks; 10-14-2012 at 20:20.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 10-14-2012 , 21:44   Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
Reply With Quote #6

Awesome
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
Bos93
Veteran Member
Join Date: Jul 2010
Old 10-15-2012 , 03:08   Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
Reply With Quote #7

Thanks :-)
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
xakintosh
I run no-steam servers!
Join Date: Feb 2010
Location: Edge of nowhere
Old 10-15-2012 , 03:45   Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
Reply With Quote #8

Is it possible to patch count for clients to change it too.
Well Done module.
__________________
As soon as possible.
xakintosh is offline
Send a message via Yahoo to xakintosh Send a message via Skype™ to xakintosh
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 10-15-2012 , 03:46   Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
Reply With Quote #9

Quote:
Originally Posted by xakintosh View Post
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.
__________________

Last edited by claudiuhks; 10-15-2012 at 03:48.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
xakintosh
I run no-steam servers!
Join Date: Feb 2010
Location: Edge of nowhere
Old 10-15-2012 , 06:07   Re: AMX Mod X: MapName Patcher 1.0 [Linux + Windows]
Reply With Quote #10

Just a question is it possible to change Dust2 ( Bomb ) to Private without dust2 extension.
__________________
As soon as possible.
xakintosh is offline
Send a message via Yahoo to xakintosh Send a message via Skype™ to xakintosh
Reply


Thread Tools
Display Modes

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 04:51.


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