ID in chat
#3

Quote:
Originally Posted by MoroJr™
pawn Код:
new name[24];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"[%d]%s: %s",playerid,name,text);
ProxDetector(30.0,playerid,string,0xFF,0xFF,0xFF,0xFF,0xFF);
If you don't have ProxtDetector , just search it
Why use ProxtDetector? all he wants is the NAME [ID] : to display when someone is typing...

Anyways, to do that you should use this code.

pawn Код:
public OnPlayerText(playerid, text[])
{
    new pName[MAX_PLAYER_NAME], string[128];
    GetPlayerName(playerid, pName,sizeof(pName));
    format(string,sizeof(string),"%s[%i]: %s",pName,playerid,text);
    printf(string);
    // ircSay(EchoConnection, EchoChan,string); ONLY USE THIS IF YOU HAVE AN IRC CHANNEL.
    SendClientMessageToAll(COLOR_WHITE,string);
    return 0;
}
Reply


Messages In This Thread
ID in chat - by Magie[CZ] - 05.05.2009, 17:45
Re: ID in chat - by Danut - 05.05.2009, 17:55
Re: ID in chat - by shitbird - 05.05.2009, 17:59

Forum Jump:


Users browsing this thread: 1 Guest(s)