AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   stock print_color (https://forums.alliedmods.net/showthread.php?t=174645)

Debesėlis 12-23-2011 07:31

stock print_color
 
Can anyone help? Where is problem?

http://**************/photo/my-images...314241192.jpg/

plugin code:
Code:

stock print_color ( const id, const input[ ], any:... )
{
    new count = 1, players[ 32 ];
    static msg[ 191 ];
    vformat( msg, 190, input, 3 )
   
    replace_all( msg, 190, "!g", "^4" );
    replace_all( msg, 190, "!n", "^1" );
    replace_all( msg, 190, "!t", "^3" );
   
    if ( id ) players[ 0 ] = id; else get_players( players, count, "ch" )
    {
        for ( new i=0; i<count; i++ )
        {
            if ( is_user_connected( players[ i ] ) )
            {
                message_begin( MSG_ONE_UNRELIABLE, g_MsgSayText, _, players[ i ] );
                write_byte( players[ i ] );
                write_string( msg );
                message_end( );
            }
        }
    }
}

Code:

print_color( id, "!n%L", LANG_SERVER, "ITEMS" );
text file:
Code:

ITEMS = [AMXX]You got !t[ !g100AP !t]!n, !t[ !gHE !t]!n, !t[ !g2FB !t]!n, !t[ !gSG !t]!n, !t[ !gDef. kit !t] !nand !t[ !gAmmo !t]!n.

fysiks 12-23-2011 11:44

Re: stock print_color
 
I'm not entire sure what is going one but have you tried this one?

Debesėlis 12-23-2011 12:00

Re: stock print_color
 
Check image please. You see 2 text's of [ Ammo] ?

Maybe problem with this
Code:

vformat( msg, 190

ConnorMcLeod 12-23-2011 12:11

Re: stock print_color
 
What is the resolution you use ?
This is happening when sentence is too long for the screen, but it shouldn't happen with this sentence.

fysiks 12-23-2011 12:20

Re: stock print_color
 
Quote:

Originally Posted by Debesėlis (Post 1618392)
Check image please. You see 2 text's of [ Ammo] ?

Maybe problem with this
Code:

vformat( msg, 190

I "checked the image," I'm just offer a method of finding the issue.

Debesėlis 12-23-2011 12:44

Re: stock print_color
 
Quote:

Originally Posted by ConnorMcLeod (Post 1618400)
What is the resolution you use ?
This is happening when sentence is too long for the screen, but it shouldn't happen with this sentence.

My game resolution is 800x600 and my desktop is 1440x900.

ConnorMcLeod 12-23-2011 14:02

Re: stock print_color
 
Quote:

Originally Posted by Debesėlis (Post 1618420)
My game resolution is 800x600

Weird, try to put less color codes.


All times are GMT -4. The time now is 12:08.

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