chat help!
#1

i want the t chat to be coloured like this please help me i will give rep.to people that help me!!

this is the T chat!

http://imageshack.us/photo/my-images/444/samp1o.png/ Pressing T and typing... i want it colored just like in picture please help me!i give rep. to all who help!

EDIT:I want each player to talk in this color even players in factions....
Reply
#2

Just format and string and send a message under the "OnPlayerText(playerid,text[])" function
Reply
#3

how?im romanian i understand harder..
Reply
#4

should work:
pawn Код:
public OnPlayerText(playerid,text[])
{
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,PlayerName,MAX_PLAYER_NAME);
    format(text,128,"%s Says: %s",PlayerName,text);
    SendClientMessageToAll(0x00E6E6FF,text);
    return 1;
}
Reply
#5

Quote:
Originally Posted by DarkKillerWithPride<3
Посмотреть сообщение
should work:
pawn Код:
public OnPlayerText(playerid,text[])
{
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,PlayerName,MAX_PLAYER_NAME);
    format(text,128,"%s Says: %s",PlayerName,text);
    SendClientMessageToAll(0x00E6E6FF,text);
    return 1;
}
Wouldn't it send double message?
pawn Код:
#include <a_samp>

#define COLOR_NAME  "{FF0000}" //this one is red. You add here you HEX color code
#define COLOR_TEXT  "{00FF00}" //this one is green which means player's text would be green. Same, chnage it with HEX color code

public OnPlayerText(playerid,text[])
{
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,PlayerName,MAX_PLAYER_NAME);
    format(text,128,""COLOR_NAME"%s(%d) says: "COLOR_TEXT"%s",PlayerName,text);
    SendClientMessageToAll(0x00E6E6FF,text);
    return 0;
}
Untested. Should work.
Reply
#6

warning 217: loose indentation
warning 217: loose indentation
warning 219: local variable "PlayerName" shadows a variable at a preceding level
warning 225: unreachable code

4 warnings help me fix them please.
Reply
#7

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
Wouldn't it send double message?
pawn Код:
#include <a_samp>

#define COLOR_NAME  "{FF0000}" //this one is red. You add here you HEX color code
#define COLOR_TEXT  "{00FF00}" //this one is green which means player's text would be green. Same, chnage it with HEX color code

public OnPlayerText(playerid,text[])
{
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,PlayerName,MAX_PLAYER_NAME);
    format(text,128,""COLOR_NAME"%s(%d) says: "COLOR_TEXT"%s",PlayerName,text);
    SendClientMessageToAll(0x00E6E6FF,text);
    return 0;
}
Untested. Should work.
Yeah man sorry your correct :L was just a quick point in the right direction. Thanks for the correction man.
Reply
#8

i put like this i want orange {AA3333}%s says:{0000BB}%s
{ORANGE}%s says:{LIGHTBLUE}%s where i get these?
Reply
#9

The {} colors are hex..

{RRGGBB} = Red Green Blue

{990000} = a dark red

{00CCCC} = a semi-dark cyan color...

{00FFFF} = what's in the picture most likely
Reply
#10

http://www.2createawebsite.com/build/hex-colors.html Like this. Just don't copy #
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)