Little help needed with player ID's
#1

So i'm going to add there player ID's shown when they're writing in the normal chat. (Global)

Now when someone says something, it's only showing their name's. For an example:

Код:
Michell: Testing the chat
When i want it to be:
Код:
Michell (0): Testing the chat
How should i proceed? GetPlayerID? Or? :S
Reply
#2

It's easy:

pawn Код:
public OnPlayerText(playerid, text[])
{
    new pName[MAX_PLAYER_NAME], msg[256];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(msg, sizeof(msg), "%s (%d): %s", pName, playerid, text);
    SendPlayerMessageToAll(playerid, msg);
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)