View Single Post
Exploited
Veteran Member
Join Date: Jul 2010
Location: Sweden
Old 10-30-2010 , 13:24   Re: Dmgmult only on right click (knife)
Reply With Quote #20

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(gHeroIDpcvarGrav);
    
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage");
}
//-----------------------------------------------------------------------------
public sh_hero_init(idheroIDmode)
    if ( 
gHeroID == heroID )
        
gHasGrim[id] = mode true false;    
//-----------------------------------------------------------------------------
public fw_TakeDamage(idvictiminflictorattackerFloat:damagedamage_type)
    if (
victim != attacker && is_user_connected(attacker) && (get_user_weapon(id) == CSW_KNIFE) )
        if ( 
gHasGrim[attacker] && pev(attackerpev_button) & IN_ATTACK2 )
            
SetHamParamFloat(4float(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
Exploited is offline