SA-MP Forums Archive
Chat - 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: Chat (/showthread.php?tid=363199)



Chat - DizzY2306 - 26.07.2012

Hello guys...im learning pawno and im wondering how to do this:
I want make command (let we say /me) that will do this
Joseph says hy
Let me explain. I dont want this: Joseph: says hy i want message without : to public chat
Thanks.


Re: Chat - Kakioshe22 - 26.07.2012

I want make command (let we say /me) that will do this
Joseph says hy
Let me explain. I dont want this: Joseph: says hy i want message without : to public chat

PHP код:
CMD:me(playerid,params[])
{
   new 
string[126], metextplayername;
   if(
sscanf(params"s"metext)) return SendClientMessage(playerid, -1"Usage: /me [text]");
   
GetPlayerName(playeridplayernamesizeof(playername));
   
format(string,sizeof(string), "%s(%d) says %s"playernameplayeridmetext);
   
SendClientMessageToAll(-1string);
   return 
1;