diff --git a/AutismBotIngame/scripting/autism_bot_info.sp b/AutismBotIngame/scripting/autism_bot_info.sp index 8d740303..d3d0fb52 100644 --- a/AutismBotIngame/scripting/autism_bot_info.sp +++ b/AutismBotIngame/scripting/autism_bot_info.sp @@ -683,7 +683,7 @@ public int GetClosestClient_option1(int targeteam, int client) int nearest = -1; bool bot_alternative = false; for (int i = 1; i <= MaxClients; i++) - if (IsValidClient(i) && IsPlayerAlive(i) && !is_bot_player(i)) + if (IsValidClient(i) && IsPlayerAlive(i) && GetClientTeam(i) == targeteam && !is_bot_player(i)) { if (!IsAbleToSee(client, i)) continue;