Description
This adds a basic sprinting to human that allows them to run faster for a certain amount of duration.
Plugin was tested on
Zombie Plague 5.0.7
Version history:- 1.0 - Initial release
- 1.0.1 - Bug fix - Doesn't set cl_bob back to default if client set realism to disabled when sprinting.
- 1.5.0 - Almost whole code rewritten
- Removed fun
- A lot of optimization
- Fixed cl_bob not resetting if server changes map.
- SPEED BUG IS NO MORE!
- Change speed setting to multiplier
- Sprint help chat loops every 55.0 seconds by default
- Uses ZP 5.0 color chat
- Added more realism(sideways, backwards, ducking & jumping will disable sprinting)
CVars:
Code:
zp_sprint_speed_multiplier "1.5"
zp_sprint_max_duration "7.0"
zp_sprint_min_time_for_sound "5.0"
CVars description:- zp_sprint_speed_multiplier - Multiply the current speed you have.
- zp_sprint_max_duration - Max duration for sprinting
- zp_sprint_min_time_for_sound - Minimum time in sprinting needed for sound effect
Client commands:- Chat: /sprint
Allow/Disallow sprint realism (editing client CVars /w client's permission through a basic menu)
- Console: sprint
Bind this key to sprint e.g.
Notes:- Sprinting can be stopped any time by pressing the binded key again while sprinting.
- Before sprinting, there's no need to hold the binded key as it doesn't use the + and - commands. One press will allow you to sprint/disable sprint
- Version 1.5.0 is FULLY tested. So if you have problems with it, disable any plugins that doesn't come with AMXX and Zombie Plague.
F.A.Q:
Code:
Q. Where's the cooldown CVar?
A. I did thought of adding it but if they sprinted for just 1 sec, the cooldown would be non-realistic. Cooldown is based on the time they sprinted. E.g. If Player 1 sprinted for 5.0 seconds, his cooldown would be 5.0 seconds.
Q. Will the sound automatically stop when cooldown is over?
A. Yes. The sound will play until the cooldown is over.
Q. Why use the menu for editing client CVar? Why not just edit it?
A. Slowhacking is not allowed. The menu will allow player to choose whether the plugin is allowed to change their CVar.