Id before name? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Id before name? (
/showthread.php?tid=345989)
Id before name? -
cod5devious - 26.05.2012
How do I do like
[ID]Devious: Hello
Is that possible?
Re: Id before name? -
Kitten - 26.05.2012
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;
}
Re: Id before name? -
cod5devious - 26.05.2012
Wow thanks again.
Your tooooo good
Re: Id before name? -
exclide1 - 21.06.2013
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.
Re: Id before name? -
kaisersouse - 21.06.2013
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)