22.12.2013, 18:57
Yo, didn't read through exactly everything and sorry for that. One thing that you should add in your proxdetector is to check if the player sending the string is in the same virtual world as the player near them:
to
Why? Because people like me use different virtual worlds for different for instance bank interiors for role-play servers. Then I don't want someone in bank B see something that was written in bank A.
Code:
stock ProxDetector(Float:radi, playerid, string[],color) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); foreach(Player,i) { if(IsPlayerInRangeOfPoint(i,radi,x,y,z)) { SendClientMessage(i,color,string); } } }
Code:
stock ProxDetector(Float:radio, playerid, string[], color) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); foreach(Player,i) { if((IsPlayerInRangeOfPoint(i,radi,x,y,z)) && ((GetPlayerVirtualWorld(playerid)) == (GetPlayerVirtualWorld(i))) { SendClientMessage(i,color,string); } } }