Raised This Month: $51 Target: $400
 12% 

Subplugin Submission [ZP 5.0][1.5.0] Sprinting


Post New Thread Reply   
 
Thread Tools Display Modes
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, 891 views)
File Type: sma Get Plugin or Get Source (zp50_sprint.sma - 1623 views - 7.9 KB)

Last edited by Excalibur.007; 12-09-2011 at 22:09.
Excalibur.007 is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 10-30-2011 , 00:56   Re: [ZP 5.0] Addon: Basic Sprinting 1.0
Reply With Quote #2

YES!!!! Now I can make a damn NAZI ZOMBIES Game.

Good Job. Thx for plugin! very cool!
__________________

Last edited by jc980; 10-30-2011 at 00:56.
jc980 is offline
Nick Haldem
Senior Member
Join Date: Jun 2011
Location: Moldova
Old 10-30-2011 , 04:42   Re: [ZP 5.0] Addon: Basic Sprinting 1.0
Reply With Quote #3

Its like second run?
__________________
Your server is empty? Visit our webpage http://boost.dyc.lv/ and make it full!!!
Nick Haldem is offline
Send a message via Skype™ to Nick Haldem
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 10-30-2011 , 06:31   Re: [ZP 5.0] Addon: Basic Sprinting 1.0
Reply With Quote #4

Is this an extra item ? sound's cools .
JoKeR LauGh is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 10-30-2011 , 06:35   Re: [ZP 5.0] Addon: Basic Sprinting 1.0
Reply With Quote #5

Excalibur, you know that you're using slowhack right? Remove it so.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Nick Haldem
Senior Member
Join Date: Jun 2011
Location: Moldova
Old 10-30-2011 , 06:36   Re: [ZP 5.0] Addon: Basic Sprinting 1.0
Reply With Quote #6

No.Its addon.All playes can use it free
__________________
Your server is empty? Visit our webpage http://boost.dyc.lv/ and make it full!!!
Nick Haldem is offline
Send a message via Skype™ to Nick Haldem
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 10-30-2011 , 06:54   Re: [ZP 5.0] Addon: Basic Sprinting 1.0
Reply With Quote #7

PHP Code:
client_cmd(id"cl_bob 0.01"
this is slow-hacking ?
JoKeR LauGh is offline
Excalibur.007
Veteran Member
Join Date: Sep 2009
Location: Singapore
Old 10-30-2011 , 09:02   Re: [ZP 5.0] Addon: Basic Sprinting 1.0
Reply With Quote #8

Yeah, but it doesn't edit the cvar as long the client didn't press yes on the menu. If it still considered as slowhacking even after client permission through the menu then I'll remove it, will wait for post before updating plugin.

EDIT: Bug fix on 1.0.1. If anybody knows how to block sideway/backwards movement please post here. I need the codes for more realism as the current one allows sideway/backwards movement. Thanks in advance.

Last edited by Excalibur.007; 10-30-2011 at 09:08.
Excalibur.007 is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 11-02-2011 , 08:58   Re: [ZP 5.0] Addon: Basic Sprinting 1.0
Reply With Quote #9

Quote:
Originally Posted by Excalibur.007 View Post
Yeah, but it doesn't edit the cvar as long the client didn't press yes on the menu. If it still considered as slowhacking even after client permission through the menu then I'll remove it, will wait for post before updating plugin.

EDIT: Bug fix on 1.0.1. If anybody knows how to block sideway/backwards movement please post here. I need the codes for more realism as the current one allows sideway/backwards movement. Thanks in advance.
shake the screen left then right with punch angle while sprinting?
__________________

Last edited by jc980; 11-02-2011 at 08:58.
jc980 is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 11-02-2011 , 09:05   Re: [ZP 5.0] Addon: Basic Sprinting 1.0.1
Reply With Quote #10

I just can't really understand this plugin . It just like make you sprint or it just like the other zombie games that give sprint and the sprint will expired when the energy is run out . Is it like that ?

Last edited by JoKeR LauGh; 11-04-2011 at 02:38.
JoKeR LauGh 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 09:26.


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