and use that with any of these codes above:
pawn Код:
ProxDetector(Float: f_Radius, playerid, string[],col1,col2,col3,col4,col5)
{
new
Float: f_playerPos[3];
GetPlayerPos(playerid, f_playerPos[0], f_playerPos[1], f_playerPos[2]);
foreach(Player, i) {
if((InsideShamal[playerid] == GetPlayerVehicleID(i) && GetPlayerState(i) == 2) || (InsideShamal[i] == GetPlayerVehicleID(playerid) && GetPlayerState(playerid) == 2) || (InsideShamal[playerid] != INVALID_VEHICLE_ID && InsideShamal[playerid] == InsideShamal[i])) {
SendClientMessage(i, col1, string);
}
else if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid)) {
if(IsPlayerInRangeOfPoint(i, f_Radius / 16, f_playerPos[0], f_playerPos[1], f_playerPos[2])) {
SendClientMessage(i, col1, string);
}
else if(IsPlayerInRangeOfPoint(i, f_Radius / 8, f_playerPos[0], f_playerPos[1], f_playerPos[2])) {
SendClientMessage(i, col2, string);
}
else if(IsPlayerInRangeOfPoint(i, f_Radius / 4, f_playerPos[0], f_playerPos[1], f_playerPos[2])) {
SendClientMessage(i, col3, string);
}
else if(IsPlayerInRangeOfPoint(i, f_Radius / 2, f_playerPos[0], f_playerPos[1], f_playerPos[2])) {
SendClientMessage(i, col4, string);
}
else if(IsPlayerInRangeOfPoint(i, f_Radius, f_playerPos[0], f_playerPos[1], f_playerPos[2])) {
SendClientMessage(i, col5, string);
}
}
}
return 1;
}