Id before name?
#1

How do I do like

[ID]Devious: Hello

Is that possible?
Reply
#2

pawn Код:
public OnPlayerText(playerid, text[])
{
    new pName[24], stringbig[356];
    GetPlayerName(playerid,pName,24);
    format(stringbig,sizeof(stringbig),"[%d]{%06x}%s: {FFFFFF} %s",playerid,(GetPlayerColor(playerid) >>> 8), pName, text);
    SendClientMessageToAll(GetPlayerColor(playerid),stringbig);
    return 0;
}
Reply
#3

Wow thanks again.
Your tooooo good
Reply
#4

Quote:
Originally Posted by Kitten
Посмотреть сообщение
pawn Код:
public OnPlayerText(playerid, text[])
{
    new pName[24], stringbig[356];
    GetPlayerName(playerid,pName,24);
    format(stringbig,sizeof(stringbig),"[%d]{%06x}%s: {FFFFFF} %s",playerid,(GetPlayerColor(playerid) >>> 8), pName, text);
    SendClientMessageToAll(GetPlayerColor(playerid),stringbig);
    return 0;
}
Sorry for bumping old thread, but can you tell me what is the difference between this format line:
Код:
format(stringbig,sizeof(stringbig),"[%d]{%06x}%s: {FFFFFF} %s",playerid,(GetPlayerColor(playerid) >>> 8), pName, text);
And this one:
Код:
format(stringbig,sizeof(stringbig),"[%d] %s: {FFFFFF} %s",playerid, pName, text);
Thank you.
Reply
#5

The first one colors the players name like it would by default in SAMP chat (name in chat same color as radar blip)

The other doesn't colorize the name, so you run the risk of everyones name being the same color in chat (but not the same color as their radar blip)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)