Raised This Month: $209 Target: $400
 52% 

AMXX Buy Health


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Admin Commands       
rrduna
Member
Join Date: Nov 2010
Location: Brazil
Old 02-10-2011 , 17:22   AMXX Buy Health
Reply With Quote #1

AMXX Buy Health


AMXX Buy Health v2.0
Copyright 2011, Duna. All rights reserved.

Description:
With this plugin, customers can buy health (hp) through a menu.
There are two options for health: 100 HP for standard costing, actual 5000
and 150 HP that also by default, it costs 8000 dollars.
A good plugin and where it is recommended to be used in servers 4fun.

Cvars:
amx_buyhp_100cost (cash price for 100 hp)
amx_buyhp_150cost (cash price for 150 hp)

Command to the client:
say /buyhp


Enjoy!
Attached Files
File Type: sma Get Plugin or Get Source (amxx_buy_health.sma - 1601 views - 4.2 KB)

Last edited by rrduna; 02-10-2011 at 17:30.
rrduna is offline
Destro-
Veteran Member
Join Date: Jun 2010
Location: $me->location();
Old 02-10-2011 , 17:45   Re: AMXX Buy Health
Reply With Quote #2

if (key == 0)
//...
if (key == 1)
//...

for

if (!key)
//...
else if (key == 1
//...

pd:This is practically a sample plugin.

pd2:Sorry for mi English.
__________________
Destro- is offline
rrduna
Member
Join Date: Nov 2010
Location: Brazil
Old 02-10-2011 , 17:48   Re: AMXX Buy Health
Reply With Quote #3

to yes, I'll do it!

Last edited by rrduna; 02-10-2011 at 17:50.
rrduna is offline
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 02-10-2011 , 19:27   Re: AMXX Buy Health
Reply With Quote #4

You should put 1 by 1 HP to buy.
Like -- buy 10 HP, buy 25HP, not just 100 and 150 and buy of as much money as I have.
NucL3ra is offline
Send a message via Yahoo to NucL3ra
rrduna
Member
Join Date: Nov 2010
Location: Brazil
Old 02-10-2011 , 19:32   Re: AMXX Buy Health
Reply With Quote #5

No! I wrote so by reason of being a common plugin which will be used on standard servers, and having only two options, does not alter much the games.
Imagine a player with 1000 hp, while the other will not have the same amount of money or health, would be incompatible with others.
rrduna is offline
jarmenz
Member
Join Date: Feb 2011
Location: Riga, Latvia
Old 02-11-2011 , 04:28   Re: AMXX Buy Health
Reply With Quote #6

What are you talking about, rrduna? You can just check if the player has exceeded the maximum hp he can buy, for example :
if ( <player hp >= 200)
_printmsgtoclient("You reached the limit...") // etc.

NucL3ra, is right... more options equals more interesting gameplay !
__________________
"We view the distant peaks which are our destination with enthusiasm but actually that destination is achieved by the drudgery of single footsteps."
Geoff Burch
jarmenz is offline
rrduna
Member
Join Date: Nov 2010
Location: Brazil
Old 02-13-2011 , 15:55   Re: AMXX Buy Health
Reply With Quote #7

Good! What I meant was that, my only containing only two options is easier because it is nothing too advanced for standard servers.
rrduna is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 02-16-2011 , 22:37   Re: AMXX Buy Health
Reply With Quote #8

Think about this. You just spawned and start out with the default 100 hp. You have 8000$ and you buy the 150 hp from your plugin. Then that person has 250 hp and has the advantage over everyone. Making it that much harder to kill him, especially if he is a good/decent player. If you make more options for it, the opposite team might not be at as much of a disadvantage and have a chance to win the round.
__________________
Hi.
Kreation is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-17-2011 , 03:51   Re: AMXX Buy Health
Reply With Quote #9

Don't use fakemeta_util to set health, use fun module.
Use switch statement for menu key check.
Use pcvars.
Cache pcvar values.
Don't use a colorchat function when the function is only used once, the loop is also not needed.

About features, plugin is too static, you could for example put a config file with settings (1 line for HP amount and price ) so users could put as many menu option as they would like).

About public cvar, don't you think it is a bit much for such a plugin ?
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 02-17-2011 at 03:57.
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-05-2011 , 13:33   Re: AMXX Buy Health
Reply With Quote #10

More than 15 days have passed and no changes have been made as suggested by ConnorMcLeod.

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 08:21.


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