That didn't compile, so I worked a bit on it to make it compile but it still wont work (the damage).
Heres the results, that compiles:
PHP Code:
// Grim Reaper
#include <superheromod>
new gHeroID;
new bool:gHasGrim[SH_MAXSLOTS+1];
//-----------------------------------------------------------------------------
public plugin_init()
{
register_plugin("SUPERHERO Grim Reaper", "0.1", "Random1");
new pLevel = register_cvar("grimreaper_level", "8");
new pcvarGrav = register_cvar("grimreaper_grav", "0.25");
gHeroID = sh_create_hero("Grim Reaper", pLevel);
sh_set_hero_info(gHeroID, "Rawr!", "Knife = 1 Hit KO");
sh_set_hero_grav(gHeroID, pcvarGrav);
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage");
}
//-----------------------------------------------------------------------------
public sh_hero_init(id, heroID, mode)
if ( gHeroID == heroID )
gHasGrim[id] = mode ? true : false;
//-----------------------------------------------------------------------------
public fw_TakeDamage(id, victim, inflictor, attacker, Float:damage, damage_type)
if (victim != attacker && is_user_connected(attacker) && (get_user_weapon(id) == CSW_KNIFE) )
if ( gHasGrim[attacker] && pev(attacker, pev_button) & IN_ATTACK2 )
SetHamParamFloat(4, float(get_user_health(victim)));
A question about that HAM thing, is it a instantkill or does it add damage? Maybe the damage isn't high enough? The maxhp on my server is 400.
__________________
Jelle (1): I LOVE YOU
Jelle (1): Yeah. omg you are so awesome!
--------------
Jelle (1): You know when a poo is about to exit but it is too big?
Jelle (1): God my ass still hurts