Get cz bots to stop when shooting
I'm trying to get cz bots to stop when shooting to increase their accuracy, then continue to move as normal. I have got it to where they will stop when shooting but can't move again. Here is what I have so far.
PHP Code:
|
Re: Get cz bots to stop when shooting
You could try hooking Ham_Weapon_PrimaryAttack in both Pre (and set maxspeed to 0.1) and in Post (reset the maxspeed).
|
Re: Get cz bots to stop when shooting
Thanks. How would I go about doing this for all weapons?
|
Re: Get cz bots to stop when shooting
Code:
|
Re: Get cz bots to stop when shooting
Thanks for your help, but I get a lot of errors when trying to compile this.
|
Re: Get cz bots to stop when shooting
#include < fun >
|
Re: Get cz bots to stop when shooting
Quote:
|
Re: Get cz bots to stop when shooting
I appreciate your help with this. Unfortunately the speed does not reset until weapon is changed, which is a problem for the bots. I would like for this not to affect players, only bots and when I add is_user_alive(id) && is_user_bot(id) && to the script, i get error 017: undefined symbol "id".
PHP Code:
|
Re: Get cz bots to stop when shooting
You can't use id in plugin_init( )
Code:
If it doesn't work, try to use pev_velocity. |
Re: Get cz bots to stop when shooting
Gotcha. I am learning slowly, but surely.
This does stop the bot when shooting, but the bot speed in not reset after shooting so they get stuck in place. Was reading about pev_velocity and am confused on how to add this instead of set_user_maxspeed. Thanks again for all of your help. |
| All times are GMT -4. The time now is 12:05. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.