Raised This Month: $ Target: $400
 0% 

kill_bonus


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
krystann
Junior Member
Join Date: Mar 2012
Location: Romania - Cluj
Old 03-31-2012 , 09:41   kill_bonus
Reply With Quote #1

I apologize for spelling mistakes is, but we need to modify the plugin kill_bonus.amxx, namely:
  • At each murder to get 1 hp (set by cvar) - with any weapon except the knife
  • At each head to get 3 hp (set by cvar) - with any weapon except the knife
  • At each murder with knife to get 4 hp (set by cvar)
  • Every head with knife to get 5 hp (set by cvar)

Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

new pcvar

public plugin_init() 
{
	register_plugin("Kill Bonus", "1.0", "Kensai")
	pcvar = register_cvar("amx_kill_bonus", "20")
	register_event("DeathMsg", "hp_up", "a")
}

public hp_up()
{
	static attacker
	attacker = read_data(1)

	if(attacker && is_user_alive(attacker))
	{
		set_user_health(attacker, get_user_health(attacker) + get_pcvar_num(pcvar))
	}
}
Thank you very much

Last edited by krystann; 03-31-2012 at 09:42.
krystann is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 03-31-2012 , 10:02   Re: kill_bonus
Reply With Quote #2

Put this in suggests
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 03-31-2012 , 11:00   Re: kill_bonus
Reply With Quote #3

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

new bonusbonushsbonusknifebonusknifehs

public plugin_init() 
{
    
register_plugin("Kill Bonus""1.0""Kensai")
    
bonus register_cvar("amx_kill_bonus""1")
    
bonushs register_cvar("amx_hs_bonus""3")
    
bonusknife register_cvar("amx_knife_bonus""4")
    
bonusknifehs register_cvar("amx_knifehs_bonus""5")
    
register_event("DeathMsg""hp_up""a")
}

public 
hp_up()
{
    new 
iAttackeriHsszWeapon[15]
    
iAttacker read_data(1)
    
iHs read_data(3)
    
read_data(4szWeaponsizeof(szWeapon) -1)

    if(
iAttacker && is_user_alive(iAttacker))
    {
        switch (
iHs)
        {
            case 
0set_user_health(iAttackerget_user_health(iAttacker) + get_pcvar_num((equal(szWeapon"knife")) ? bonusknife bonus))
            case 
1set_user_health(iAttackerget_user_health(iAttacker) + get_pcvar_num((equal(szWeapon"knife")) ? bonusknifehs bonushs))
        }
    }

not sure if will work

Last edited by jimaway; 03-31-2012 at 11:01.
jimaway is offline
krystann
Junior Member
Join Date: Mar 2012
Location: Romania - Cluj
Old 03-31-2012 , 11:44   Re: kill_bonus
Reply With Quote #4

Thank you jimaway , this plugin is very good !
krystann is offline
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 21:07.


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