further updates
This commit is contained in:
parent
286402d3af
commit
d0e2956e84
@ -239,13 +239,13 @@ public Action bot_check_connect(Handle timer, any data)
|
||||
if (client_count > 61)
|
||||
{
|
||||
char msg[generic_length];
|
||||
if (StrContains(ip_addr, "127.0.0.1"))
|
||||
if (StrEqual(ip_addr, "127.0.0.1"))
|
||||
{
|
||||
KickClient(i, "server full you need to leave");
|
||||
Format(msg, sizeof(msg), "bot kicked server full");
|
||||
send_socket_msg(msg, strlen(msg));
|
||||
}
|
||||
else if (StrContains(ip_addr, "164.132.201.173"))
|
||||
else if (StrEqual(ip_addr, "164.132.201.173"))
|
||||
{
|
||||
KickClient(i, "server full you need to leave");
|
||||
Format(msg, sizeof(msg), "bot kicked server full");
|
||||
@ -280,7 +280,8 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
|
||||
int cmdnum, int tickcount, int seed, const int mouse[2])
|
||||
{
|
||||
if (!IsClientInGame(client)) return;
|
||||
if (client != present[0] && client != present[1]) return;
|
||||
if (client == present[0] || client == present[1])
|
||||
{
|
||||
int flags = GetEntityFlags(client);
|
||||
if (!(flags & FL_ONGROUND) && (flags_old[client] & FL_ONGROUND) && !(buttons_old[client] & IN_JUMP) && !(buttons & IN_JUMP) && (GetEntityMoveType(client) != MOVETYPE_LADDER))
|
||||
{
|
||||
@ -342,13 +343,15 @@ public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float
|
||||
buttons_old[client] = buttons;
|
||||
flags_old[client] = flags;
|
||||
}
|
||||
}
|
||||
|
||||
public Action recursive_pressing(Handle timer, any data)
|
||||
{
|
||||
for (int client = 1; client <= MaxClients; client++)
|
||||
{
|
||||
if (!IsValidClient(client)) return Plugin_Continue;
|
||||
if (client != present[0] && client != present[1]) return Plugin_Continue;
|
||||
if (!IsValidClient(client)) continue;
|
||||
if (client == present[0] || client == present[1])
|
||||
{
|
||||
if (GetClientTeam(client) == 1 || GetClientTeam(client) == 0)
|
||||
{
|
||||
ChangeClientTeam(client, 2);
|
||||
@ -411,13 +414,13 @@ public Action recursive_pressing(Handle timer, any data)
|
||||
trace_hulling_bot(client);
|
||||
char message[generic_length * 7];
|
||||
if (IsValidClient(targethuman[client]))
|
||||
Format(message, sizeof(message), "dist_target: %f targethuman[client]: %N enemy_distance: %f targeteam: %i", dist_target, targethuman[client], enemy_distance, targeteam);
|
||||
Format(message, sizeof(message), "dist_target: %f targethuman: %N enemy_distance: %f targeteam: %i", dist_target, targethuman[client], enemy_distance, targeteam);
|
||||
else
|
||||
Format(message, sizeof(message), "dist_target: %f targethuman[client]: none enemy_distance: %f targeteam: %i", dist_target, enemy_distance, targeteam);
|
||||
Format(message, sizeof(message), "dist_target: %f targethuman: none enemy_distance: %f targeteam: %i", dist_target, enemy_distance, targeteam);
|
||||
if (IsValidClient(target_enemy[client]))
|
||||
Format(message, sizeof(message), "%s target_enemy[client]: %N", message, target_enemy[client]);
|
||||
Format(message, sizeof(message), "%s target_enemy: %N", message, target_enemy[client]);
|
||||
else
|
||||
Format(message, sizeof(message), "%s target_enemy[client]: none", message);
|
||||
Format(message, sizeof(message), "%s target_enemy: none", message);
|
||||
|
||||
char auth[50];
|
||||
GetClientAuthId(client, AuthId_Engine, auth, sizeof(auth));
|
||||
@ -431,6 +434,7 @@ public Action recursive_pressing(Handle timer, any data)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user