09.08.2011, 17:16
Try to make your own "ProxDetector".
Like this :
Might not be so efficient, read ******'s post about making scriptings more efficient.
Like this :
pawn Код:
#define LOCAL_MESSAGE_RANGE 50
stock SendLocalMessage(sender, receiver = -1, string[], color)
{
new Float:Pos[3], Around = -1;
GetPlayerPos(sender, Pos[0], Pos[1], Pos[2]);
for(new i; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i) || i == sender) continue; // Remove || i == sender if you want the message also to be sent to "sender"
if(IsPlayerInRange(i, LOCAL_MESSAGE_RANGE, LOCAL_MESSAGE_RANGE, Pos[0], Pos[1], Pos[2]))
{
Around++;
SendClientMessage(i, color, string);
}
}
if(!Around) { return 0; }
else { return Around; }
}