Raised This Month: $ Target: $400
 0% 

Kill Bonus


Post New Thread Reply   
 
Thread Tools Display Modes
Maurice
Senior Member
Join Date: Nov 2006
Location: Netherlands
Old 09-22-2007 , 09:29   Re: Kill Bonus
Reply With Quote #61

Quote:
Originally Posted by imps View Post
I found the problem. It was the plugin, there's mistake. It does'n takes user health really because of this limit doesn't works

Code:
 
#include <amxmodx>
#include <fun>
public plugin_init()
{
 register_plugin("TheOne","1.2.1a","imps")
 register_cvar("amx_health_stolen","0")
 register_cvar("amx_kb_limit", "100")
 register_event("DeathMsg", "hp_up", "a")
}
public hp_up()
{
 new attacker = read_data(1)
        new victim = read_data(2)
 new limit = get_cvar_num("amx_kb_limit")
 new health = get_user_health(attacker)
 new nhealth = get_cvar_num("amx_health_stolen")
 new sumhealth = health + nhealth
 if(sumhealth < limit)
 {
  set_user_health(attacker, health + nhealth)
 }
 if(sumhealth > limit)
 {
  set_user_health(attacker, limit)
 }
}
It gotta be like this
Nope, neither this modification works, it even dont compile. This plugin should be disapproved although i hope it will be someday fixed.

Code:
Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/home/groups/amxmodx/tmp3/phpzszgno.sma(13) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phpzszgno.sma(14) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/phpzszgno.sma(26) : warning 204: symbol is assigned a value that is never used: "victim"
Header size:            296 bytes
Code size:              740 bytes
Data size:              420 bytes
Stack/heap size:      16384 bytes; estimated max. usage=39 cells (156 bytes)
Total requirements:   17840 bytes

3 Warnings.
Done.
__________________
Luck? Luck is only one feeling of amazement concerning a seemingly incidental circumstance which one himself must create.

Last edited by Maurice; 09-22-2007 at 09:31.
Maurice is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 09-22-2007 , 15:47   Re: Kill Bonus
Reply With Quote #62

imps works just fine.

Those 3 errors, are nothing, it works just fine. lol

"it dont even compile" Yes it does, it shows it compiled in your code. Use that one and then see if it doesnt work....

2 loose indentation errors = just tabs
varaible never used = need to delete that variable is all, wont really effect the plugin
__________________
bmann_420 is offline
Maurice
Senior Member
Join Date: Nov 2006
Location: Netherlands
Old 09-23-2007 , 16:03   Re: Kill Bonus
Reply With Quote #63

Thanks, i don't know why i didn't see the download link, maybe i was confused with the warning messages.
__________________
Luck? Luck is only one feeling of amazement concerning a seemingly incidental circumstance which one himself must create.
Maurice is offline
mythkina
New Member
Join Date: Mar 2006
Location: china
Old 11-17-2007 , 12:31   Re: Kill Bonus
Reply With Quote #64

--------------------------------
public hp_up(id)
{
new attacker = read_data(1)
new victim = read_data(2)

if(!attacker || !is_user_alive(attacker))
return PLUGIN_CONTINUE;

if(is_user_bot(attacker))
return PLUGIN_CONTINUE;

new health = get_user_health(attacker)
new nhealth = get_cvar_num("amx_kill_bonus")
new limit = get_cvar_num("amx_kb_limit")
new sumhealth = health + nhealth

if(sumhealth < limit)
{
set_user_health(attacker, health + nhealth)
}
else
{
set_user_health(attacker, limit)
}

new newhealth = get_user_health(attacker)
new addHp = newhealth - health
new nameVictim[33];

get_user_name(victim,nameVictim,32)
-------------------------------
i try to modify the code many times
but at last it still doesn't work for me.

with amxx 1.76d and metamod 1.9.0.0

Last edited by mythkina; 11-17-2007 at 12:34. Reason: modify
mythkina is offline
mythkina
New Member
Join Date: Mar 2006
Location: china
Old 11-17-2007 , 14:05   Re: Kill Bonus
Reply With Quote #65

it's work now
i find out the reason "DeathMsg", "hp_up", "a" )
"a" is necessary , other parameters like e doesn't work
mythkina is offline
Tramp
Senior Member
Join Date: Aug 2005
Old 11-17-2007 , 14:20   Re: Kill Bonus
Reply With Quote #66

Nice plugin, thanks bro
__________________
STER-Gaming.pl - The Best Multigaming Club, CS 1.6, CS:S, ET, COD 2 more and more ! Check forum forum.ster-gaming.pl

amxmodx - Polish support about amxx.
Tramp is offline
bigfrill
Junior Member
Join Date: Dec 2007
Old 12-08-2007 , 17:43   Re: Kill Bonus
Reply With Quote #67

can u make this in a .zip or .rar file?
bigfrill is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 12-23-2007 , 00:33   Re: Kill Bonus
Reply With Quote #68

Plugin contains logic errors. Unapproved.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
rAnDy OrToN
Junior Member
Join Date: Sep 2007
Old 01-04-2008 , 21:27   Re: Kill Bonus
Reply With Quote #69

can anyone fix this?i mean it's a really nice plugin...and i really need it for my server..thanks
rAnDy OrToN is offline
rAnDy OrToN
Junior Member
Join Date: Sep 2007
Old 01-06-2008 , 21:07   Re: Kill Bonus
Reply With Quote #70

anyone?
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 20:38.


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