16.06.2014, 08:23
i want to make that when players sends a message it should be displayed as
[ID:2]BlaBla: Bla bla.....
instead of
BlaBla: [ID:2] how?
[ID:2]BlaBla: Bla bla.....
instead of
BlaBla: [ID:2] how?
public OnPlayerText(playerid, text[])
{
new Msg[128], Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
format(Msg, sizeof(Msg), "[ID: %d] %s: %s", playerid, Name, text);
SendClientMessageToAll(GetPlayerColor(playerid), Msg);
return 0;
}
public OnPlayerText(playerid, text[])
{
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
new msg[128];
format(msg, sizeof(msg), "{323299}[ID: %d]{FFFFFF}%s:{FFFFFF} %s",playerid,pname, text);
SendPlayerMessageToAll(playerid, msg);
return 0;
}