11.03.2019, 22:59
Eu utilizo essa, pois com essa pode configurar vбrias cores, dependendo da distвncia do jogador.
PHP Code:
ProxDetector(Float:radi, playerid, string[], col1, col2, col3, col4, col5)
{
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid) && GetPlayerInterior(i) == GetPlayerInterior(playerid))
{
if(IsPlayerInRangeOfPoint(i, radi/16,oldposx, oldposy, oldposz)) SendClientMessage(i, col1, string);
else if(IsPlayerInRangeOfPoint(i, radi/8,oldposx, oldposy, oldposz)) SendClientMessage(i, col2, string);
else if(IsPlayerInRangeOfPoint(i, radi/4,oldposx, oldposy, oldposz)) SendClientMessage(i, col3, string);
else if(IsPlayerInRangeOfPoint(i, radi/2,oldposx, oldposy, oldposz)) SendClientMessage(i, col4, string);
else if(IsPlayerInRangeOfPoint(i, radi,oldposx, oldposy, oldposz)) SendClientMessage(i, col5, string);
}
}
return 1;
}