24.12.2013, 11:50
This is a code I found in this forum (I'm sorry I could not find the topic)
It's better than ProxDetector
pawn Код:
stock SendRangedMessage(sourceid, color, message[], Float:range)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(sourceid, x, y, z);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerVirtualWorld(sourceid) == GetPlayerVirtualWorld(i))
{
if(IsPlayerInRangeOfPoint(i, range, x, y, z))
{
SendClientMessage(i, color, message);
}
}
}
}
return 1;
}