Raised This Month: $ Target: $400
 0% 

Special multilingual


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-08-2010 , 17:42   Re: Special multilingual
Reply With Quote #6

If you use ^x04 or any other colors like that in the ML file, you will have to fix them with the plugin.

Code:
FixMLColor( const szKey[ ], szFixedKey[ ], const iFixedKeyLen ) {     static const szReplaces[ ][ 2 ][ ] =     {         { "^^x04", "^4" },         { "^^x03", "^3" },         { "^^x01", "^1" },         { "^^4", "^4" },         { "^^3", "^3" },         { "^^1", "^1" },         { "!g", "^4" },         { "!t", "^3" },         { "!y", "^1" }     };         copy( szFixedKey, iFixedKeyLen, szKey );         for( new i = 0; i < sizeof( szReplaces ); i++ )     {         replace_all( szFixedKey, iFixedKeyLen, szReplaces[ i ][ 0 ], szReplaces[ i ][ 1 ] );     }         return strlen( szFixedKey ); }

Language file:
Code:
[en]
SUCKEST_MAP = ^x04The suckest map is: ^x03%s
-- or --
SUCKEST_MAP = ^4The suckest map is: ^3%s
-- or --
SUCKEST_MAP = !gThe suckest map is: !t%s
Usage:
Code:
new szMessage[ 192 ]; formatex( szMessage, charsmax( szMessage ), "%L", id, "SUCKEST_MAP", szMap ); FixMLColor( szMessage, szMessage, charsmax( szMessage ) ); message_begin( MSG_ONE, g_iMsgID_SayText, _, id ); write_byte( id ); write_string( szMessage ); message_end( );
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
 



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 08:41.


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