Raised This Month: $ Target: $400
 0% 

Kill Bonus


Post New Thread Reply   
 
Thread Tools Display Modes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-07-2008 , 03:43   Re: Kill Bonus
Reply With Quote #71

Try this :
Code:
#include <amxmodx> #include <fakemeta> #define MAX_PLAYER_HP   100.0 #define OFFSET_TEAM     114 #if !defined floatmin Float:floatmin(Float:ValueA, Float:ValueB) {     if (ValueA<=ValueB)     {         return ValueA;     }         return ValueB; } #endif new g_pcvarNormalBonus, g_pcvarHeadshotBonus public plugin_init() {     register_plugin("Kill Bonus", "1.0", "connorr")     g_pcvarNormalBonus = register_cvar("kb_normal_hp", "10")     g_pcvarHeadshotBonus = register_cvar("kb_headshot_hp", "20")     register_event("DeathMsg", "eDeathMsg", "a") } public eDeathMsg(id) {     new iKiller = read_data(1)     if(!is_user_alive(iKiller))         return     if(get_pdata_int(iKiller, OFFSET_TEAM) == get_pdata_int(read_data(2), OFFSET_TEAM))         return     new Float:fHealth     pev(iKiller, pev_health, fHealth)     fHealth += get_pcvar_float(read_data(3) ? g_pcvarHeadshotBonus : g_pcvarNormalBonus)     set_pev(iKiller, pev_health, floatmin(fHealth, MAX_PLAYER_HP))  }
Attached Files
File Type: sma Get Plugin or Get Source (kill_bonus.sma - 573 views - 958 Bytes)
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 01-08-2008 at 09:38.
ConnorMcLeod is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 01-07-2008 , 07:05   Re: Kill Bonus
Reply With Quote #72

How can I make bonus HP only for Ts, so if a Terrorist kills a CT, he will get bonus HP, but if CT kills Terrorist, nothing happens?..
hleV is offline
rAnDy OrToN
Junior Member
Join Date: Sep 2007
Old 01-07-2008 , 14:32   Re: Kill Bonus
Reply With Quote #73

man it crashes my server Connorr, please check the plugins...thanks really appreciate your trying..

EDIT: It crashes whenever i killed one person...

Last edited by rAnDy OrToN; 01-07-2008 at 17:00.
rAnDy OrToN is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-08-2008 , 09:38   Re: Kill Bonus
Reply With Quote #74

Fixed.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
rAnDy OrToN
Junior Member
Join Date: Sep 2007
Old 01-08-2008 , 16:15   Re: Kill Bonus
Reply With Quote #75

Man it still crashes...as the old one...thanks
rAnDy OrToN is offline
rAnDy OrToN
Junior Member
Join Date: Sep 2007
Old 01-10-2008 , 17:37   Re: Kill Bonus
Reply With Quote #76

Please, Can Anyone Fix This? please
rAnDy OrToN is offline
rAnDy OrToN
Junior Member
Join Date: Sep 2007
Old 01-12-2008 , 16:35   Re: Kill Bonus
Reply With Quote #77

No One Can Fix This?, or they don't have time?
rAnDy OrToN is offline
rAnDy OrToN
Junior Member
Join Date: Sep 2007
Old 01-17-2008 , 16:05   Re: Kill Bonus
Reply With Quote #78

Damn....
rAnDy OrToN is offline
TheNewt
Donor
Join Date: Jun 2006
Location: Where I live.
Old 01-17-2008 , 16:32   Re: Kill Bonus
Reply With Quote #79

Well... Its a simple plugin, a lot of people could fix it, they may or may not have time for it but the other question is if they want to fix it. You could have learned how to have made this script by yourself in the time you waited for someone else to fix it for you. =P

I'm not even kidding, this is the source code for this plugin.


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

public plugin_init() 
{
	register_plugin("Kill Bonus", "1.0", "Kensai")
	register_cvar("amx_kill_bonus", "20")
	register_cvar("amx_kb_limit", "100")
	register_event("DeathMsg", "hp_up", "be")
}

public hp_up(id)
{
	new attacker = read_data(1)
	new health = get_user_health(attacker)
	new nhealth = get_cvar_num("amx_kill_bonus")
	new limit = get_cvar_num("amx_kb_limit")

	if(health < limit)
	{
		set_user_health(attacker, health + nhealth)
	}
	if(health > limit)
	{
		set_user_health(attacker, limit)
	}
}
Anyone could figure out how to make that in their first day learning how to script.
__________________
Quote:
toe3_ left the chat room. (G-lined (AUTO Excessive connections from a single host.))
TheNewt is offline
Old 01-18-2008, 08:45
purple_pixie
This message has been deleted by purple_pixie. Reason: Fairly pointless post
rAnDy OrToN
Junior Member
Join Date: Sep 2007
Old 01-18-2008 , 15:59   Re: Kill Bonus
Reply With Quote #80

Can you post the plugin in here so i can download it? i'd appreciate it, yeah i know i thought they didn't have time too...
rAnDy OrToN 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 19:11.


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