mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-05 21:03: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,14 +154,17 @@ public void FindExistingTank() {
|
|||
if(StrContains(name, "Tank", true) > -1) {
|
||||
bIsTank[i] = true;
|
||||
PrintToChatAll("Found existing tank: %N (%i)", i, i);
|
||||
if(iAliveTanks == 0) {
|
||||
CreateTimer(0.1, BotControlTimerV2, _, TIMER_REPEAT);
|
||||
}
|
||||
|
||||
iAliveTanks++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
bIsTank[i] = false;
|
||||
|
||||
}
|
||||
if(iAliveTanks > 0) {
|
||||
CreateTimer(0.1, BotControlTimerV2, _, TIMER_REPEAT);
|
||||
}
|
||||
}
|
||||
|
||||
//Credits to Timocop for the stock :D
|
||||
|
@ -215,4 +218,4 @@ stock bool GetItemSlotClassName(int client, int slot, char[] buffer, int bufferS
|
|||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue