Raised This Month: $62 Target: $400
 15% 

Dmgmult only on right click (knife)


Post New Thread Reply   
 
Thread Tools Display Modes
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 10-30-2010 , 15:10   Re: Dmgmult only on right click (knife)
Reply With Quote #21

PHP Code:
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 )
            
sh_extra_damage(victimattacker5"knife"0SH_DMG_KILL
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
[email protected]
Veteran Member
Join Date: May 2008
Location: France Marne
Old 10-30-2010 , 15:53   Re: Dmgmult only on right click (knife)
Reply With Quote #22

he said that he didn't want to use sh_extradamage...
Fr33m@n is offline
Exploited
Veteran Member
Join Date: Jul 2010
Location: Sweden
Old 10-30-2010 , 15:58   Re: Dmgmult only on right click (knife)
Reply With Quote #23

Would Jelles method count on rankings?
__________________
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
[email protected]
Veteran Member
Join Date: May 2008
Location: France Marne
Old 10-30-2010 , 16:38   Re: Dmgmult only on right click (knife)
Reply With Quote #24

seems not. it's just the hooking method who change.

wtf with these method ? it's really strange i will do a debug message for show it.
Fr33m@n is offline
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 10-30-2010 , 16:48   Re: Dmgmult only on right click (knife)
Reply With Quote #25

I guess

Code:
float(get_user_health(victim))
is the damage done, meaning it kills the client regardless of his health as it is taking as much HP as he got.
__________________
The Art of War is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 10-30-2010 , 17:25   Re: Dmgmult only on right click (knife)
Reply With Quote #26

Quote:
Originally Posted by Exploited View Post
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.
Quote:
Originally Posted by DarkGod View Post
Yes, it does damage by simply altering the damage done to the victims health instead (thus making it always be lethal damage).
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 10-30-2010 , 17:30   Re: Dmgmult only on right click (knife)
Reply With Quote #27

Lol sorry I didnt update the site for about 2 hours..
__________________
The Art of War is offline
Exploited
Veteran Member
Join Date: Jul 2010
Location: Sweden
Old 10-30-2010 , 17:37   Re: Dmgmult only on right click (knife)
Reply With Quote #28

So uhm, could anyone please create a working Grim Reaper with only knifedamage using Ham_TakeDamage please? You guys are all confusing me and Jelles version didn't work either, not just the ranks, but it didn't do damage either. If anyones gonna do it, don't bother adding gravity or nosound or invisibility, I'll do that myself.
__________________
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
[email protected]
Veteran Member
Join Date: May 2008
Location: France Marne
Old 10-30-2010 , 17:45   Re: Dmgmult only on right click (knife)
Reply With Quote #29

The victim never die of an ATTACK2...

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"); 
 
    
gHeroID sh_create_hero("Grim Reaper"pLevel); 
    
sh_set_hero_info(gHeroID"Rawr!""Knife = 1 Hit KO"); 
 
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage"); 

//----------------------------------------------------------------------------- 
public sh_hero_init(idheroIDmode
    if ( 
gHeroID == heroID 
        
gHasGrim[id] = mode true false;     
//----------------------------------------------------------------------------- 
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type
    if (
victim != attacker && is_user_connected(attacker) ) 
        if ( 
gHasGrim[attacker] && pev(attackerpev_button) & IN_ATTACK2 ) {
            new 
Float:newDamage float(get_user_health(victim));
            
console_print(0"%f"newDamage);
            
SetHamParamFloat(4newDamage);
        } 

Here are the value returned in my console by for 6 ATTACK2 on a ennemy with the knife : (the victim don't die)
100.000000
15.000000
3.000000
1.000000
1.000000
1.000000

Should we add +15.0 ? i tried pev_health and it returned a tag mismatch

also you really need to check if user have knife. or people will be able to instant kill with glock by holding ATTACK2

Last edited by [email protected]; 10-30-2010 at 17:50.
Fr33m@n is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 10-30-2010 , 17:53   Re: Dmgmult only on right click (knife)
Reply With Quote #30

Quote:
Originally Posted by [email protected] View Post
also you really need to check if user have knife. or people will be able to instant kill with glock by holding ATTACK2
Forgot to check the latest page? Only G-Dog didn't check for knife in his initial code. All others have.

It's odd that the victim does not die. :/
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
Reply


Thread Tools
Display Modes

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 01:07.


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