Posts: 88
Threads: 28
Joined: Jul 2011
Reputation:
0
Hi, I want to modify the chat system.
It standard says 'Superthijs: blahblah' when I type something.
Is it possible to modify it, like it will say 'Superthijs says: blahblah' or something?
Posts: 2,286
Threads: 18
Joined: Jun 2010
Yes, you can. You need to learn to script though.
Posts: 88
Threads: 28
Joined: Jul 2011
Reputation:
0
I can script. But I don't know how to do this.
Posts: 966
Threads: 5
Joined: Jul 2011
Reputation:
0
Return 0 in OnPlayerText callback and send the message in your own format (format, SendClientMessageToAll). Simple as that.
Posts: 2,286
Threads: 18
Joined: Jun 2010
Код:
public OnPlayerText(playerid, text[])
{
new string[256], pname[MAX_PLAYER_NAME], color;
color = GetPlayerColor(playerid);
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "{%x}%s {ffffff}said: %s", color, pname ,text);
SendClientMessageToAll(0xffffffff, string);
return 0;
}
Here.