Chat ID Players
#1

Hello ... I have a question how to do chat-like such as in the picture?


Uploaded with ImageShack.us
Thanks in advance for your help
Reply
#2

pawn Код:
public OnPlayerText(playerid, text[])
{
    new name[24], string[128]; GetPlayerName(playerid, name, sizeof name);
    format(string, sizeof string, "%i %s: %s ", playerid, name, text);
    SendClientMessageToAll(GetPlayerColor(playerid), string);
    return 0;
}
Untested, tell me if there are any errors
Reply
#3

Hmm .. okay, but how to do it another way? ie I mean the same as in the picture: D
@UP checked and is fine, but when I write it writes in the color of nick and is such a thing
0 Nickname: blablabla
for example, everything is gray, I mean the gray player ID and nickname teeth were in color
Reply
#4

will help someone?
Reply
#5

Use HEX codes infront of them. Get the color codes from www.colorpicker.com.

pawn Код:
public OnPlayerText(playerid, text[])
{
///{FFFFFF} = White
    new name[24], string[128]; GetPlayerName(playerid, name, sizeof name);
    format(string, sizeof string, "{FFFFFF}%i %s: %s ", playerid, name, text);
    SendClientMessageToAll(GetPlayerColor(playerid), string);
    return 0;
}
Reply
#6

pawn Код:
format(string, sizeof(string), "{666666}%i {%06x}%s: {ffffff}%s ", playerid, (GetPlayerColor(playerid) >>> 8), name, text);
Reply
#7

Yeah, that's Good Men
Thanks for help'ing
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)