Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP 5.0][1.5.0] Sprinting


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 10-29-2011 , 00:34   [ZP 5.0][1.5.0] Sprinting
Reply With Quote #1

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.
    Code:
    bind v sprint

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.
Attached Files
File Type: zip sound.zip (138.7 KB, 901 views)
File Type: sma Get Plugin or Get Source (zp50_sprint.sma - 1635 views - 7.9 KB)

Last edited by Excalibur.007; 12-09-2011 at 22:09.
Excalibur.007 is offline
 


Thread Tools
Display Modes

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 15:31.


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