asd

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
stock ProxDetector(Float:radius = 30.0, playerid, text[], col1 = 0xFFFFFFFF, col2 = 0xCCCCCCFF, col3 = 0x999999FF, col4 = 0x666666FF, col5 = 0x333333FF)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
for(new i = GetMaxPlayers() - 1, Float:dist, virtualworld = GetPlayerVirtualWorld(playerid), interior = GetPlayerInterior(playerid); i != -1; i--)
{
if(!IsPlayerConnected(i) || IsPlayerNPC(i) || virtualworld != GetPlayerVirtualWorld(i) || interior != GetPlayerInterior(i)) continue;
dist = GetPlayerDistanceFromPoint(i, x, y, z);
if(dist < radius / 16) SendClientMessage(i, col1, text);
else if(dist < radius / 8) SendClientMessage(i, col2, text);
else if(dist < radius / 4) SendClientMessage(i, col3, text);
else if(dist < radius / 2) SendClientMessage(i, col4, text);
else if(dist < radius) SendClientMessage(i, col5, text);
}
return 1;
}