displaying id in chat - 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: displaying id in chat (
/showthread.php?tid=577101)
displaying id in chat -
suni - 09.06.2015
i dont know how to display the player's id next to their name in the main chat when they are talking
can someone show me how to display the id in the main chat?
Re: displaying id in chat -
swiftyrus - 09.06.2015
You can use something like this:
Код:
public OnPlayerText(playerid, text[])
{
new pText[144];
format(pText, sizeof (pText), "(%d) %s", playerid, text);
SendPlayerMessageToAll(playerid, pText);
return 0; // ignore the default text and send the custom one
}
A message will be seen as:
playername: (0) My message.
Re: displaying id in chat -
suni - 11.06.2015
Quote:
Originally Posted by swiftyrus
You can use something like this:
Код:
public OnPlayerText(playerid, text[])
{
new pText[144];
format(pText, sizeof (pText), "(%d) %s", playerid, text);
SendPlayerMessageToAll(playerid, pText);
return 0; // ignore the default text and send the custom one
}
A message will be seen as:
playername: (0) My message.
|
ty +rep