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

Upgrade


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
Kristaps08
Junior Member
Join Date: Jun 2010
Old 05-15-2012 , 10:47   Upgrade
Reply With Quote #1

Upgrade


Description:

If you buy the upgrade then it gives you 150hp + 150ap + lower gravity + faster speed. (cost for upgrade and hp/ap/gravity/speed can be changed with cvars)

This is my first public plugin.



Cvars:

upgrade_speed - Sets the speed of upgrade. (default 300.0)
upgrade_hp - Sets the health for upgrade. (default 150)
upgrade_ap - Sets the armor for upgrade. (default 150)
upgrade_gravity - Sets the gravity for upgrade. (default 0.75)
upgrade_cost - Sets the cost of upgrade. (default 4000)



Admin Commands:

amx_upgrade <target> [0|1] - 0=TAKE 1=GIVE


Planning to add:

Nothing yet.


Known Bugs:

None yet.


Changelog:

Code:
- v1.0
* First public release.

- v1.1
* Removed client_connect()
* Changed from CurWeapon event to Ham_Item_PreFrame
* Code changes and cleanup.

- v1.2
* Removed cmd_upgradehelp() because wasnt needed.
* Added automatic message that will display after some time.
* Combined amx_give_upgrade and amx_take_upgrade commands together into amx_upgrade.
* Added support for amx_show_activity.

- v1.3
* Changed and cleaned up some code.
* Added fakemeta.

- v1.4
* Optimized code.

- v1.5
* Fixed freezetime bug.
* Optimized a little bit of the code.
* Added description.

- v1.6 - FINAL
* Optimized the code a little bit again.
Attached Files
File Type: txt upgrade.txt (636 Bytes, 128 views)
File Type: sma Get Plugin or Get Source (upgrade.sma - 617 views - 4.6 KB)

Last edited by Kristaps08; 08-29-2012 at 06:18. Reason: Updates
Kristaps08 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-15-2012 , 11:07   Re: Upgrade 1.0
Reply With Quote #2

First of all, don't release your very first plugins you've made.

Second, to fix this bug, set all the new settings to the player after freezetime is over so it won't bug.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Old 05-15-2012, 11:13
Kristaps08
This message has been deleted by Kristaps08. Reason: No one answered
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 05-15-2012 , 12:34   Re: Upgrade 1.0
Reply With Quote #3

Code:
public client_connect(id) {     g_has_upgrade[id] = false } public client_disconnect(id) {     g_has_upgrade[id] = false }

You can remove the client_connect().
__________________

Last edited by kramesa; 05-15-2012 at 19:22.
kramesa is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 05-15-2012 , 12:36   Re: Upgrade 1.0
Reply With Quote #4

I think there are lots of plugins like this.
It's better to use Ham_Item_PreFrame instead of CurWeapon to set player's speed.
__________________

Last edited by <VeCo>; 05-15-2012 at 13:51.
<VeCo> is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-30-2012 , 11:28   Re: Upgrade 1.0
Reply With Quote #5

Really redundant. Unapproved.
__________________
Arkshine is offline
Reply


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 04:58.


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