Chat ID Players - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Chat ID Players (
/showthread.php?tid=268678)
Chat ID Players -
aniol16 - 13.07.2011
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
Re: Chat ID Players -
Wesley221 - 13.07.2011
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
Re: Chat ID Players -
aniol16 - 13.07.2011
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
Re: Chat ID Players -
aniol16 - 13.07.2011
will help someone?
Re: Chat ID Players -
Skylar Paul - 13.07.2011
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;
}
Re: Chat ID Players -
Vince - 13.07.2011
pawn Код:
format(string, sizeof(string), "{666666}%i {%06x}%s: {ffffff}%s ", playerid, (GetPlayerColor(playerid) >>> 8), name, text);
Re: Chat ID Players -
aniol16 - 13.07.2011
Yeah, that's Good Men
Thanks for help'ing