Local Chat
#4

Here, I'll show you my /l (local chat) command and I hope it helps you out.

Код:
		if(strcmp(cmd,"/l",true)==0 || strcmp(cmd,"/b",true)==0)
		{
		  new tmp[256];
		  new playername[24];
		  new string[150];
		  tmp=strtokmsg(cmdtext,idx);
		  if(!strlen(tmp))
		  {
		    SendClientMessage(playerid,White,"USAGE : /l [text]");
		    return 1;
		  }
		  for(new i = 0; i < MAX_PLAYERS; i++)
		  {
				GetPlayerName(playerid,playername,sizeof(playername));
				format(string,sizeof(string),"Local Chat~ %s : %s",playername,tmp);
				if(GetDistanceBetweenPlayers(playerid,i)<125)
				{
				  SendClientMessage(i,White,string);
				}
		  }
		  return 1;
		}
Reply


Messages In This Thread
Local Chat - by Soeren - 24.12.2008, 13:56
Re: Local Chat - by Soeren - 25.12.2008, 11:19
Re: Local Chat - by LarzI - 25.12.2008, 11:50
Re: Local Chat - by x-cutter - 25.12.2008, 13:04
Re: Local Chat - by Soeren - 25.12.2008, 13:16
Re: Local Chat - by Ycto - 25.12.2008, 14:18
Re: Local Chat - by Soeren - 25.12.2008, 15:38
Re: Local Chat - by dax123 - 25.12.2008, 16:01
Re: Local Chat - by Soeren - 25.12.2008, 17:18
Re: Local Chat - by Serbish - 25.12.2008, 17:22

Forum Jump:


Users browsing this thread: 1 Guest(s)