AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Upgrade (https://forums.alliedmods.net/showthread.php?t=185297)

Kristaps08 05-15-2012 10:47

Upgrade
 
2 Attachment(s)
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.


Napoleon_be 05-15-2012 11:07

Re: Upgrade 1.0
 
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.

kramesa 05-15-2012 12:34

Re: Upgrade 1.0
 
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().

<VeCo> 05-15-2012 12:36

Re: Upgrade 1.0
 
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.

Arkshine 05-30-2012 11:28

Re: Upgrade 1.0
 
Really redundant. Unapproved.


All times are GMT -4. The time now is 11:01.

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