l4d2_autobotcrown: Check if bot has a shotgun

This commit is contained in:
Jackzie 2021-01-06 19:35:33 -06:00
parent 162748a055
commit c6bcdde8c1
No known key found for this signature in database
GPG key ID: 1E834FE36520537A
2 changed files with 3 additions and 1 deletions

Binary file not shown.

View file

@ -136,7 +136,9 @@ public Action Timer_BotControlTimer(Handle hdl) {
//Check if bot has a valid shotgun, with ammo (probably can skip: bot mostly will be full).
if(GetClientHealth(bot) > 40) {
char wpn[32];
if(GetClientWeapon(bot, wpn, sizeof(wpn)) && StrEqual(wpn, "weapon_autoshotgun") || StrEqual(wpn, "weapon_shotgun_spas")) {
if(GetClientWeapon(bot, wpn, sizeof(wpn)) &&
StrEqual(wpn, "weapon_autoshotgun") || StrEqual(wpn, "weapon_shotgun_spas")
) {
GetClientAbsOrigin(bot, botPosition);
for(int i = 0; i < WitchList.Length; i++) {