displaying id in chat
#1

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?
Reply
#2

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.
Reply
#3

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)