Raised This Month: $32 Target: $400
 8% 

Solved [CS:GO] Force a BOT to shoot for a certain amount of time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
manicogaming
AlliedModders Donor
Join Date: Aug 2014
Old 10-31-2019 , 23:45   [CS:GO] Force a BOT to shoot for a certain amount of time
Reply With Quote #1

I would like to know how you can force a BOT in CS:GO to shoot for a certain amount of time or just force him to keep shooting at the enemy he is looking at until the enemy dies. I've tried to do that but all I'm able to do is force them to just shoot until they have no bullets left and can't even reload.

Last edited by manicogaming; 11-04-2020 at 14:41.
manicogaming is offline
kratoss1812
Senior Member
Join Date: May 2018
Location: Romānia
Old 11-01-2019 , 16:51   Re: [CS:GO] Force a BOT to shoot for a certain amount of time
Reply With Quote #2

Quote:
Originally Posted by manicogmaing View Post
I would like to know how you can force a BOT in CS:GO to shoot for a certain amount of time or just force him to keep shooting at the enemy he is looking at until the enemy dies. I've tried to do that but all I'm able to do is force them to just shoot until they have no bullets left and can't even reload.
PHP Code:

OnPlayerRunCmd  
--> if(IsFakeClient() && HasAmmo) --> buttons == IN_ATTACK 
__________________
kratoss1812 is offline
manicogaming
AlliedModders Donor
Join Date: Aug 2014
Old 11-01-2019 , 17:44   Re: [CS:GO] Force a BOT to shoot for a certain amount of time
Reply With Quote #3

Quote:
Originally Posted by kratoss1812 View Post
PHP Code:

OnPlayerRunCmd  
--> if(IsFakeClient() && HasAmmo) --> buttons == IN_ATTACK 
How exactly should I get the ammo of the clip of the weapon the bot currently has, I'm trying to find something in other threads but I can't seem to find anything.

EDIT: I managed to get it somewhat working when checking the ammo, but the bots will just keep shooting until they have no ammo left and I only want them to force them to shoot when they are attacking an enemy.

Last edited by manicogaming; 11-01-2019 at 22:01.
manicogaming is offline
kratoss1812
Senior Member
Join Date: May 2018
Location: Romānia
Old 11-02-2019 , 13:16   Re: [CS:GO] Force a BOT to shoot for a certain amount of time
Reply With Quote #4

Quote:
Originally Posted by manicogmaing View Post
How exactly should I get the ammo of the clip of the weapon the bot currently has, I'm trying to find something in other threads but I can't seem to find anything.

EDIT: I managed to get it somewhat working when checking the ammo, but the bots will just keep shooting until they have no ammo left and I only want them to force them to shoot when they are attacking an enemy.
maybe check first if the target is valid and alive?

you should hook when the bot does damage to the 'target' and then force him to shoot to be sure that they have a targetm idk
__________________
kratoss1812 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:38.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode