Raised This Month: $ Target: $400
 0% 

Colour text


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ƒa†es™
Senior Member
Join Date: May 2009
Location: Garena
Old 07-08-2009 , 03:17   Re: Colour text
Reply With Quote #10

Quote:
Originally Posted by SchlumPF* View Post
SayText message ->"^x04 green ^x01con_color ^x03 team_color" OR colorchat

if you want to show a red text to counter-terrorist you should use colorchat, else i would recommend writing an own little stock like this:

PHP Code:
stock chat_printplr, const message[], { FloatSqlResult}:... )
{
    static 
msg[192], saytextmaxplayers;
    
formatmsg191"^x04[ZP]^x01 " ); // (green)[ZP] (con_color)message
    
vformatmsg[7], 185message);
 
    if( !
saytext )
    {
        
saytext get_user_msgid"SayText" );
    }
 
    if( !
maxplayers )
    {
        
maxplayers get_maxplayers( );
    }
 
    if( 
plr <= maxplayers && plr )
    {
        
message_beginMSG_ONE_UNRELIABLEsaytext, {000}, plr );
        
write_byteplr );
        
write_stringmsg );
        
message_end( );
    }
    else if( !
plr )
    {
        for( new 
1<= maxplayersi++ )
        {
            if( !
is_user_connected) )
            {
                continue;
            }
 
            
message_beginMSG_ONE_UNRELIABLEsaytext, { 00}, );
            
write_byte);
            
write_stringmsg );
            
message_end( );
        }
    }
 
    return 
1;

I use the stock it doesn't work ? or i'm wrong.

PHP Code:
#include <amxmodx>
 
#define TIME_DELAY 1.0
#define TEXT_SAY "^x04[AMX]^x01Testing Colour." 
 
public plugin_init() 
{
        
register_plugin("Colourtext","1337","always.")
        
set_task(TIME_DELAY"Colour"0__"b")
}
 
public 
Colour()
{
        
client_print(0print_chatTEXT_SAY)
}
 
stock chat_printplr, const message[], { FloatSqlResult}:... )
{
    static 
msg[192], saytextmaxplayers;
    
formatmsg191"^x04[AMX]^x01 " );
    
vformatmsg[7], 185message);
 
    if( !
saytext )
    {
        
saytext get_user_msgid"SayText" );
    }
 
    if( !
maxplayers )
    {
        
maxplayers get_maxplayers( );
    }
 
    if( 
plr <= maxplayers && plr )
    {
        
message_beginMSG_ONE_UNRELIABLEsaytext, {000}, plr );
        
write_byteplr );
        
write_stringmsg );
        
message_end( );
    }
    else if( !
plr )
    {
        for( new 
1<= maxplayersi++ )
        {
            if( !
is_user_connected) )
            {
                continue;
            }
 
            
message_beginMSG_ONE_UNRELIABLEsaytext, { 00}, );
            
write_byte);
            
write_stringmsg );
            
message_end( );
        }
    }
 
    return 
1;

It still no colour.
__________________
ƒa†es™ 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 15:43.


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