mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-08 07:53:20 +00:00
Fix logic for FindExistingTank()
- Only create timer when > 0 tanks, after loop - Reset any non-bots
This commit is contained in:
parent
cd326fc079
commit
f31219a4f6
1 changed files with 7 additions and 4 deletions
|
@ -154,13 +154,16 @@ public void FindExistingTank() {
|
||||||
if(StrContains(name, "Tank", true) > -1) {
|
if(StrContains(name, "Tank", true) > -1) {
|
||||||
bIsTank[i] = true;
|
bIsTank[i] = true;
|
||||||
PrintToChatAll("Found existing tank: %N (%i)", i, i);
|
PrintToChatAll("Found existing tank: %N (%i)", i, i);
|
||||||
if(iAliveTanks == 0) {
|
|
||||||
CreateTimer(0.1, BotControlTimerV2, _, TIMER_REPEAT);
|
|
||||||
}
|
|
||||||
iAliveTanks++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
iAliveTanks++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bIsTank[i] = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
if(iAliveTanks > 0) {
|
||||||
|
CreateTimer(0.1, BotControlTimerV2, _, TIMER_REPEAT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue