diff --git a/AutismBotIngame/scripting/autism_bot_info.sp b/AutismBotIngame/scripting/autism_bot_info.sp index 9a6c61e2..80faa7b1 100644 --- a/AutismBotIngame/scripting/autism_bot_info.sp +++ b/AutismBotIngame/scripting/autism_bot_info.sp @@ -242,7 +242,7 @@ public void send_socket_msg(char[] query_msg, int len) public void send_socket_msg1(char[] query_msg, int len) { if (global_socket != INVALID_HANDLE && SocketIsConnected(global_socket)) - SocketSendTo(global_socket, query_msg, len, "127.0.0.1", 48480); //udp + SocketSendTo(global_socket, query_msg, len, "127.0.0.1", 48482); //udp } public void send_socket_msg2(char[] query_msg, int len) @@ -477,7 +477,7 @@ public Action recursive_pressing(Handle timer, any data) GetEntPropVector(target_enemy[client], Prop_Send, "m_vecOrigin", pos); enemy_distance = get_power_distance(client, pos); } - if ((250 > enemy_distance > 0 && targeteam == 2) || dist_target < 0 < enemy_distance) + if ((750 > enemy_distance > 0 && enemy_distance > dist_target && targeteam == 2) || dist_target < 0 < enemy_distance) { /* float feet_origin[3], enemy_feet_origin[3]; @@ -814,7 +814,7 @@ public int GetClosestClient_option1(int targeteam, int client) if (GetEntityMoveType(client) == MOVETYPE_LADDER) return nearest; for (int i = 1; i <= MaxClients; i++) - if (IsValidClient(i) && IsPlayerAlive(i) && i != client && GetClientTeam(i) == targeteam) + if (IsValidClient(i) && IsPlayerAlive(i) && i != client) { if (!IsAbleToSee(client, i)) continue; @@ -833,12 +833,12 @@ public int GetClosestClient_option1(int targeteam, int client) float pos[3]; GetEntPropVector(i, Prop_Send, "m_vecOrigin", pos); float dist_target = get_power_distance(client, pos); - if (is_bot_player(i)) - dist_target += 7500; - else if (admins[i] || vips[i] || i == target_enemy[client]) + if (GetClientTeam(client) == 2 && i != targeteam && (admins[i] || vips[i])) + { + continue; + } + if ((admins[i] || vips[i] || i == targethuman[client]) && client == targeteam) dist_target /= 5; - if (i == targethuman[client] && dist_target < 500 && !is_bot_player(i)) - return targethuman[client]; if (nearestdistance < 0 || dist_target < nearestdistance) { nearest = i;