Code:
L 08/05/2008 - 00:38:37: Invalid player id 0
L 08/05/2008 - 00:38:37: [AMXX] Run time error 10 (plugin "hpforknife.amxx") (native "get_user_weapon") - debug not enabled!
L 08/05/2008 - 00:38:37: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#define PLUGIN "grimvh2"
#define VERSION "1.0"
#define AUTHOR "Knife Kill Bonus"
new maxhealth
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
maxhealth = 100
register_event("DeathMsg", "eDeath", "a");
}
public eDeath( )
{
new killer = read_data(1)
new clip, ammo, weapon = get_user_weapon(killer,clip,ammo)
if(weapon == CSW_KNIFE)
{
new killerhealth
killerhealth = get_user_health(killer)
if(killerhealth > maxhealth)
{
set_user_health(killer, maxhealth)
}
else
{
set_user_health(killer, maxhealth)
}
}
}