SendClientMessage to only nearby players
#7

Quote:
Originally Posted by Ihsan_Cingisiz
Quote:
Originally Posted by O_x
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;
 }
Uhh... Sorry but, i didnt know that it was right after people connected to test
the guy doens;t see what i type in /b
I'm sorry,It's probably my bad somewhere in what i made.
Wait for Joe Torran C to post here.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)