Problem with ID 0
#4

Try to make your own "ProxDetector".

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; }
}
Might not be so efficient, read ******'s post about making scriptings more efficient.
Reply


Messages In This Thread
Problem with ID 0 - by Takumi.WS - 09.08.2011, 16:46
Re: Problem with ID 0 - by Shadoww5 - 09.08.2011, 17:03
Re: Problem with ID 0 - by Norck - 09.08.2011, 17:11
Re: Problem with ID 0 - by Cameltoe - 09.08.2011, 17:16
Re: Problem with ID 0 - by Takumi.WS - 09.08.2011, 17:44
Re: Problem with ID 0 - by Cameltoe - 09.08.2011, 17:48
Re: Problem with ID 0 - by Takumi.WS - 09.08.2011, 18:01
Re: Problem with ID 0 - by Cameltoe - 09.08.2011, 18:07
Re: Problem with ID 0 - by Takumi.WS - 09.08.2011, 18:14
Re: Problem with ID 0 - by Cameltoe - 09.08.2011, 18:19

Forum Jump:


Users browsing this thread: 2 Guest(s)