AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   [ZP] Extra Item : Speed Boost || Updated v1.2 [28/06/2009] (https://forums.alliedmods.net/showthread.php?t=80516)

Fry! 11-14-2008 16:52

[ZP] Extra Item : Speed Boost || Updated v1.2 [28/06/2009]
 
[ZP] Extra Item : Speed Boost
( ability for Humans and Zombie )

by Fry!



Description :

This is Speed Boost ability for both teams, that if you want to run away from enemy. When you will run you will have fire or smoke trail ( depends on cvar ). Ability is only for 1 round or until it ends, so in new round you must buy it again.

Note
:


Want to use it for admins only? Then uncommnet this.
Code:

//#define FOR_ADMINS_A_FLAG


Cvars
:

Quote:

  • zp_sb_cost "8" - How much Speed Boost will cost
  • zp_sb_maxspeed "325.0" - This will be maxspeed, but you can change it what ever number you want.
  • zp_sb_time "25.0" - How long you can run before boost are over.
  • zp_sb_red_color "150" - Amount of red color.
  • zp_sb_green_color "0" - Amount of green color.
  • zp_sb_blue_color "100" - Amount of blue color.
  • zp_sb_bar <1|0> - Enable|Disable speed boost bar (show's current speed)
  • zp_current_speed_bar <1|0> - Enable|Disable current speed bar
  • zp_sb_trail <1|0> - Enable|Disable trail.
  • zp_sb_sprite_type <1|0> - Chose between fire trail or smoke trail



Commands
:


say /sboost or say_team /sboost - to buy Speed Boost

Changelog :

Code:

14/11/2008 - v1.0 - First release
15/11/2008 - v1.1 - fixed some mistakes, added cvar how long you can use maxspeed.
18/11/2008 - v1.1.2 - added glow effect when you buy speed booster with cvars, added reset after infection or kill.
04/01/2009 - v1.1.5 - fixed speed boost if you already had due to you could waste ammo packs, removed wrong admin function, added new possibility to change for admins only.
28/06/2009 - v1.2 - added new feature for speed boost, added to show current speed and if you are using speed boost it will be showed as well, removed toggle cvar, corrected chat messages, optimized code.


Plugin is available to download here!

BloodMan 11-14-2008 17:14

Re: [ZP] Extra Item : Speed Boost
 
I think you should add, that you can use it for x seconds.

Fry! 11-14-2008 17:28

Re: [ZP] Extra Item : Speed Boost
 
yea ok, good suggestion.

rzlqwerty 11-14-2008 22:19

Re: [ZP] Extra Item : Speed Boost
 
bad english/////////

I get that it costs 7707060 AMMO packs could lower the price, I can not. and that lasts for at least 30 seconds

Fry! 11-15-2008 02:35

Re: [ZP] Extra Item : Speed Boost
 
Quote:

Originally Posted by rzlqwerty (Post 713975)
bad english/////////

I get that it costs 7707060 AMMO packs could lower the price, I can not. and that lasts for at least 30 seconds

I don't know why it's cost to you so much ammo packs cuz I made it only for 8 ammo packs...

pro_on_0 11-15-2008 04:53

Re: [ZP] Extra Item : Speed Boost
 
Problem!
I set the cost is 8 ammo packs but when i play ,it is 674233 ammo packs- -''

Fry! 11-15-2008 05:03

Re: [ZP] Extra Item : Speed Boost
 
Quote:

Originally Posted by pro_on_0 (Post 714027)
Problem!
I set the cost is 8 ammo packs but when i play ,it is 674233 ammo packs- -''

Why did you ever set default cvars? It's a default if you want to be it 8 then you don't need to set it again.

G-Dog 11-15-2008 05:13

Re: [ZP] Extra Item : Speed Boost
 
Code:

g_itemid_speed = zp_register_extra_item(g_item_name, g_sb_cost, 0)
to
Code:

g_itemid_speed = zp_register_extra_item(g_item_name, get_pcvar_num(g_sb_cost), 0)
to fix your problem. Also whats the point of this
Code:

#define SPEED_BOOST ADMIN_LEVEL_B
you never use SPEED_BOOST in the plugin. And why did you include fm_set_user_maxspeed when you never use that function?

Fry! 11-15-2008 05:18

Re: [ZP] Extra Item : Speed Boost
 
Quote:

Originally Posted by G-Dog (Post 714038)
Code:

g_itemid_speed = zp_register_extra_item(g_item_name, g_sb_cost, 0)
to
Code:

g_itemid_speed = zp_register_extra_item(g_item_name, get_pcvar_num(g_sb_cost), 0)
to fix your problem. Also whats the point of this
Code:

#define SPEED_BOOST ADMIN_LEVEL_B
you never use SPEED_BOOST in the plugin. And why did you include fm_set_user_maxspeed when you never use that function?

Code:

g_itemid_speed = zp_register_extra_item(g_item_name, g_sb_cost, 0)
to
Code:

g_itemid_speed = zp_register_extra_item(g_item_name, get_pcvar_num(g_sb_cost), 0)
1)Yea, I forgat to use get_pcvar_num(g_sb_cost), damn.
2) oh that was when I created with that function, then I forgat to change it..

Fry! 11-15-2008 08:39

Re: [ZP] Extra Item : Speed Boost || Updated v1.1
 
Updated to v1.1, see first post.
I still haven't tested this sub plugin...


All times are GMT -4. The time now is 09:20.

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