Raised This Month: $32 Target: $400
 8% 

amx_heal v1.1


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Fun Stuff        Approver:   EKS (166)
Smokey485
Senior Member
Join Date: Dec 2004
Location: Newt 'Ellin
Old 05-02-2006 , 23:46   amx_heal v1.1
Reply With Quote #1

Alright, because I could not find a amx_heal plugin on the forum before, or atleast one that is not packed into a huge super-admin plugin or whatever, I took a few minutes and coded this, its tested with everything.

Can't believe you guys made me edit it so you can read it easier, oh well.
also, new cvar.

Code:
// CVARS // amx_heal_timeout "0" by default. // amx_heal_negative "1" by default. // amx_heal_maxhealth "100" by default. Timeout is to make sure a person can't spam for more then 1 heal per 2 seconds, negative is to make it so they can heal them negative health. // COMMANDS // amx_heal <part of nick> <amount>

Attached below, should compile fine with the web compiler.[/small]
Attached Files
File Type: sma Get Plugin or Get Source (amx_heal.sma - 15931 views - 3.7 KB)
__________________
+karma if I am helpful to you.
I am one in a few million.
Smokey485 is offline
Send a message via AIM to Smokey485 Send a message via MSN to Smokey485
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 05-02-2006 , 23:54  
Reply With Quote #2

Well I ported a amx_heal plugin. It's not as good as this one I will admit, the one I ported is very old. You did a nice job including creative commands.
Peli is offline
Send a message via MSN to Peli
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 05-03-2006 , 00:50  
Reply With Quote #3

What I recommend is using the pcvar system (Thats your opinion if you want to have a faster plugin).
In your functions you use if statments and other things where you call the same function over and over to get the same value. You should instead make a variable and call the function once. (ie. new health = get_user_healt(....) and then just use health instead of calling get_user_health again, same with get_cvar_num() and str_to_num())

This should take you about 5-10 minutes of coding and it will get this approved.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Smokey485
Senior Member
Join Date: Dec 2004
Location: Newt 'Ellin
Old 05-03-2006 , 17:05  
Reply With Quote #4

Does it really matter if I shorten it, I felt like typing more, but fine, its a learning experience for everyone! (lol )
__________________
+karma if I am helpful to you.
I am one in a few million.
Smokey485 is offline
Send a message via AIM to Smokey485 Send a message via MSN to Smokey485
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 05-03-2006 , 17:17  
Reply With Quote #5

This has nothing to do with shortening code it has to do with effeciency.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Charming
BANNED
Join Date: Nov 2005
Location: Canada
Old 05-03-2006 , 18:16  
Reply With Quote #6

woah, alot of errors ;/
Charming is offline
Send a message via ICQ to Charming Send a message via AIM to Charming Send a message via MSN to Charming Send a message via Yahoo to Charming
Smokey485
Senior Member
Join Date: Dec 2004
Location: Newt 'Ellin
Old 05-03-2006 , 21:06  
Reply With Quote #7

It works, I've tested it, it compiles fine too.
__________________
+karma if I am helpful to you.
I am one in a few million.
Smokey485 is offline
Send a message via AIM to Smokey485 Send a message via MSN to Smokey485
Charming
BANNED
Join Date: Nov 2005
Location: Canada
Old 05-04-2006 , 09:10  
Reply With Quote #8

just because it compiles fine and works fine doesnt mean its FINE.
Charming is offline
Send a message via ICQ to Charming Send a message via AIM to Charming Send a message via MSN to Charming Send a message via Yahoo to Charming
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 05-04-2006 , 18:20  
Reply With Quote #9

Dam, no real amx_heal in all of these forums? I could swear I have come across them.
__________________
bmann_420 is offline
coldkillerlips
Junior Member
Join Date: May 2006
Old 05-04-2006 , 23:24   Nice
Reply With Quote #10

This plugin is very nice, I use it on my server, GJ.
__________________
coldkillerlips 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 23:13.


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