Posts: 1,018
Threads: 320
Joined: Jul 2010
Hello I made proxdetector when someone player write on /b chat for example
/b hello
and when another player stand little further from that player he see that text in gray coolor ok that work but I noticed this I spawn on my house on vinewood and another player was on ls airport and I write on /b hello and he saw that text but he was on ls airoport far far away from me what's the problem?
pawn Код:
stock ProxDetectorElse(Float:radi,playerid,string[],color,elsecolor)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
foreach(Player,i)
{
if(!IsPlayerConnected(i))continue;
if(IsPlayerInRangeOfPoint(i,radi,x,y,z))
{
SendClientMessage(i,color,string);
}
else
{
SendClientMessage(i,elsecolor,string);
}
}
}
Posts: 1,018
Threads: 320
Joined: Jul 2010
yes I use in the same way like this from your post and I was in interior and outside and still I write on b hello he saw that text on ls airport
edit I use like this
pawn Код:
GetPlayerName(playerid,sendername,sizeof(sendername));
format(string,sizeof(string),"%s Kaze: %s",sendername,text);
ProxDetectorElse(5.0,playerid,string,WHITE,COLOR_GRAY);
color white is if player is too close to player who write something on /b and see that text in white color color_gray is if player a little further from thatt player who write and see that text in the gray color that work's but the problem with that decetor is like I said I was on vinewood and another player was on airport and he see what I was write on /b cchat
Posts: 1,018
Threads: 320
Joined: Jul 2010
it doens't matter there still is the problem something is wrong with that proxdetector
Posts: 1,018
Threads: 320
Joined: Jul 2010
I don't want this that is not what I want it only show to near player in white color or it just one color I want if another player is further from player who is on mobile or /b then he ssaw text in yellow white color not white.That everything is working with proxdetector which I show in my first post but the probblem is just when someone type something on /b and if another player in another part of city he saw that text how to fix that it must be mistake in getting player pos in that proxdetector or something like that. Thanks
Posts: 578
Threads: 56
Joined: Sep 2013
Reputation:
0
Sorry then I don't know how to help you :/ Good luck though.
Posts: 1,018
Threads: 320
Joined: Jul 2010
Thanks anyway and thanks for trying to help me

.
Anyone else? Thanks
Posts: 69
Threads: 3
Joined: Dec 2012
Reputation:
0
From my understanding, your current code says:
If Player B is near Player A, send them a message in color
else send Player B a message in elsecolor.
Add "else if" statements, so if Player B is within 10 metres, he gets color else if he is in 20 metres he will see elseif color. If they aren't within either area they will see nothing.