Raised This Month: $ Target: $400
 0% 

Health Kill - v1.1 [9/17/09]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Event Related       
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 09-17-2009 , 17:28   Health Kill - v1.1 [9/17/09]
Reply With Quote #1

Health Kill v1.1


description
With each kill a player makes he is awarded a controllable amount of HP.

cvars
amx_hk_health <#> - Amount of HP received for one kill.
Default: 5

amx_hk_sound <#> - Whether or not to play the sound when a kill is made.
Default: 1

amx_hk_hud <#> - Whether or not to display the hud message for a kill.
Default: 1

changelog

  • Version 1.0
    • Initial Release
  • Version 1.1
    • Added cvar for hud message display
    • Changed return PLUGIN_HANDLED; with return PLUGIN_CONTINUE;
    • Changed SyncHudMsg() to show_hudmessage()

credits
  • My Shower - Thought of the idea while in it.
Attached Files
File Type: sma Get Plugin or Get Source (health_kill.sma - 1198 views - 992 Bytes)

Last edited by BOYSplayCS; 09-17-2009 at 17:55. Reason: Added version 1.1
BOYSplayCS is offline
Raddish
BANNED
Join Date: Jul 2008
Location: Argentina
Old 09-17-2009 , 17:32   Re: Health Kill - v1.0 [9/17/09]
Reply With Quote #2

First!, GJ Nice plugin ;) +K
Raddish is offline
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 09-17-2009 , 17:38   Re: Health Kill - v1.0 [9/17/09]
Reply With Quote #3

Another simple plugin by BOYSplayCS -.-
__________________
alan_el_more is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-17-2009 , 17:39   Re: Health Kill - v1.0 [9/17/09]
Reply With Quote #4

You never learn.

- Retrieve data after the checks
- if ((iKiller = iVictim)) <= it's not a check if victim is the same as killer. It should be == and without ().
- PLUGIN_HANDLED for what ? It does nothing. Return nothing or CONTINUE.
- Sync hud for what ?!
__________________
Arkshine is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 09-17-2009 , 17:48   Re: Health Kill - v1.1 [9/17/09]
Reply With Quote #5

Wrong, I do learn.

- I already added this before your post
- It was never '=', it was always '=='
- Simple mistake, I meant CONTINUE
- I was just testing to see what the difference was, don't have a heart attack

Updated.
BOYSplayCS is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-17-2009 , 17:51   Re: Health Kill - v1.1 [9/17/09]
Reply With Quote #6

Try to compile your plugin before posting.

"if (iKiller = iVictim)" Again, it should be == not =.
__________________
Arkshine is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 09-17-2009 , 17:53   Re: Health Kill - v1.1 [9/17/09]
Reply With Quote #7

Oh, lol.

I uploaded the wrong version, let me fix that real quick.
BOYSplayCS is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-17-2009 , 18:10   Re: Health Kill - v1.1 [9/17/09]
Reply With Quote #8

- You still return HANDLED at the end..
- Make sure that the killer is a player 1 <= killer <= max_clients or is_user_alive()
__________________
Arkshine is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-18-2009 , 00:30   Re: Health Kill - v1.1 [9/17/09]
Reply With Quote #9

amx_hk_health -50, awesome.
__________________
xPaw is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 09-18-2009 , 05:06   Re: Health Kill - v1.1 [9/17/09]
Reply With Quote #10

I wonder this plugin will be unapproved :/
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
Reply



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 18:41.


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