/All Chat
#1

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.
Reply
#2

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

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;
}
Reply
#4

Thanks kaisersouse that worked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)