Change chatting way - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Change chatting way (
/showthread.php?tid=316114)
Change chatting way -
Superthijs - 05.02.2012
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?
Re: Change chatting way -
KingHual - 05.02.2012
Yes, you can. You need to learn to script though.
Re: Change chatting way -
Superthijs - 05.02.2012
I can script. But I don't know how to do this.
Re: Change chatting way -
AndreT - 05.02.2012
Return 0 in OnPlayerText callback and send the message in your own format (format, SendClientMessageToAll). Simple as that.
Re: Change chatting way -
KingHual - 05.02.2012
Код:
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.
Re: Change chatting way -
Superthijs - 05.02.2012
Thanks!