SA-MP Forums Archive
/All 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /All Chat (/showthread.php?tid=90191)



/All Chat - Adamrcook - 06.08.2009

Ok, I don't know why this is so hard for me to do. I'm just not good at this string shit or whatever. I'm making a DM/Light Roleplay script and it has chat limited to a radius of about 20 or so. Well, now I want a All Chat where you can type /all [Message] and everyone sees it. For some reason I can't get it. I tried searching and nothing. Also, I'm using dcmd. Any help is appreciated.


Re: /All Chat - xCoder - 06.08.2009

lol if you press T or F6 type a message and everybody can see it


Re: /All Chat - kaisersouse - 06.08.2009

Quote:
Originally Posted by xCoder
lol if you press T or F6 type a message and everybody can see it
No. As he said hes limiting the chat radius.

Change as needed:

Код:
dcmd_g(const playerid, const params[])
{
	if(!params[0]) return SendClientMessage(playerid,COLOR_ERROR,"Syntax Error: \"/g <TEXT>\".");
  	if(strlen(params) > 120) return SendClientMessage(playerid,COLOR_ERROR, "Error: Input too long. Please shorten your message to 120 chars.");
    new string128[128];
    format(string128, sizeof(string128), "[%i][GLOBAL] %s",playerid,params);
    SendPlayerMessageToAll(playerid,string128);
	return 1;
}



Re: /All Chat - Adamrcook - 06.08.2009

Thanks kaisersouse that worked.