From d476d8c8bd217f8beb35ce2c439a406c846e2c86 Mon Sep 17 00:00:00 2001 From: jenz Date: Fri, 19 Jun 2026 15:12:34 +0200 Subject: [PATCH] was checking for the wrong team and also made autism bots use joinclass and zspawn --- .../scripting/autism_bot_simulate_movement.sp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/AutismBotIngame/scripting/autism_bot_simulate_movement.sp b/AutismBotIngame/scripting/autism_bot_simulate_movement.sp index 2887067..a0aa7a7 100755 --- a/AutismBotIngame/scripting/autism_bot_simulate_movement.sp +++ b/AutismBotIngame/scripting/autism_bot_simulate_movement.sp @@ -372,6 +372,7 @@ public Action check_team(Handle timer, any data) if (specific_bot_player[client] != -1 && GetClientTeam(client) <= CS_TEAM_SPECTATOR) { ChangeClientTeam(client, CS_TEAM_T); + CreateTimer(1.0, zspawn, GetClientSerial(client)); continue; } if (specific_bot_player[client] != -1) @@ -386,7 +387,7 @@ public Action check_team(Handle timer, any data) for (int client = 1; client <= MaxClients; client++) { if (!IsValidClient(client)) continue; - if (specific_bot_player[client] == -1 && GetClientTeam(client) > CS_TEAM_SPECTATOR && IsPlayerAlive(client)) + if (specific_bot_player[client] == -1 && GetClientTeam(client) > CS_TEAM_T && IsPlayerAlive(client)) { found_valid_ct = true; break; @@ -406,6 +407,21 @@ public Action check_team(Handle timer, any data) return Plugin_Continue; } +public Action zspawn(Handle hTimer, int Serial) +{ + int client; + if ((client = GetClientFromSerial(Serial)) == 0) + { + return Plugin_Handled; + } + if (IsValidClient(client)) + { + FakeClientCommandEx(client, "joinclass"); + FakeClientCommandEx(client, "say /zspawn"); + } + return Plugin_Handled; +} + stock bool IsValidClient(int client) { if (client > 0 && client <= MaxClients && IsClientConnected(client) && IsClientInGame(client))