SendClientMessage to only nearby players
#4

Quote:
Originally Posted by Ihsan_Cingisiz
Quote:
Originally Posted by Joe Torran C
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 10.0, x, y, z))
{
  SendClientMessage(i, COLOR, "Hello");
}
That will send a message to anyone 10.0 from the player, Is it yards? 10 yard radius? Idk i just know that it will send a msg to everyone within 10.0
Can;t you put that in my script?
Oh come on.
pawn Код:
if(strcmp(cmd, "/b", true) == 0)
  {
  strmid(tmp, cmdtext, 3, strlen(cmdtext));
  if(!strlen(tmp))
  {
  SendClientMessage(playerid,COLOR_RED,"USAGE: /b [message]");
  return 1;
  }
  new Float:x, Float:y, Float:z;
  GetPlayerPos(playerid, x, y, z);
  if(IsPlayerInRangeOfPoint(playerid, 10.0, x, y, z))
  {
  GetPlayerName(playerid, sendername, sizeof(sendername));
  format(string, sizeof(string),"(([%s]: %s ))",sendername,tmp);
  SendClientMessage(i, COLOR, string);
  print(string);
  }
  return 1;
  }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)