Raised This Month: $32 Target: $400
 8% 

Dmgmult only on right click (knife)


Post New Thread Reply   
 
Thread Tools Display Modes
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 10-30-2010 , 17:12   Re: Dmgmult only on right click (knife)
Reply With Quote #31

ah sorry, in fact i didn't read the code part of the last page.

Exploited, do you have the same problem as me ?

ah, also i forget.

he should also check this :
inflictor == attacker

otherwise i will launch my he and directly switch to my knife and hold ATTACK2 for getting an instant kill.

OK it's hard to find but players are friend with bugs
Fr33m@n is offline
Exploited
Veteran Member
Join Date: Jul 2010
Location: Sweden
Old 10-30-2010 , 17:19   Re: Dmgmult only on right click (knife)
Reply With Quote #32

I didn't try the version you posted in #29 as you said it wasn't working. What happens for me is just that the target doesn't die, but I haven't checked my console directly after the knifehit.

Edit: What does this inflictor == attacker check look like?
__________________
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

Last edited by Exploited; 10-30-2010 at 17:21.
Exploited is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 10-30-2010 , 17:47   Re: Dmgmult only on right click (knife)
Reply With Quote #33

if ( inflictor == attacker )

Now your just playing stupid, exploited.

How about just making the damage 10000? It will still only happen when it is a knife hit and is done by attack2. It actually saves a native call, and I know freeman loves saving native calls.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
Exploited
Veteran Member
Join Date: Jul 2010
Location: Sweden
Old 10-31-2010 , 13:12   Re: Dmgmult only on right click (knife)
Reply With Quote #34

Oh yeah..

So umm, any ideas on this one?
__________________
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
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 10-31-2010 , 14:47   Re: Dmgmult only on right click (knife)
Reply With Quote #35

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 && get_user_weapon(attacker) == CSW_KNIFE && inflictor == attacker )
            
SetHamParamFloat(410000.0); 
Fr33m@n is offline
Exploited
Veteran Member
Join Date: Jul 2010
Location: Sweden
Old 10-31-2010 , 14:55   Re: Dmgmult only on right click (knife)
Reply With Quote #36

Thanks a lot Fr33, I'll try that right now.

Edit: Apparently it worked, thanks a lot! Does the damage have to be 10000 or would it work to set it to 1000?
__________________
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

Last edited by Exploited; 10-31-2010 at 17:51.
Exploited is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 10-31-2010 , 17:57   Re: Dmgmult only on right click (knife)
Reply With Quote #37

it can work with 1000.0
it need to be float
Fr33m@n is offline
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 11-01-2010 , 12:35   Re: Dmgmult only on right click (knife)
Reply With Quote #38

Quote:
Originally Posted by ConnorMcLeod View Post
Damage passed in TakeDamage is no t the real damage done, you have to fix it.
I wonder how to get the real damage then...
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 11-01-2010 , 13:56   Re: Dmgmult only on right click (knife)
Reply With Quote #39

I don't get why we have that forward if it doesn't return the correct damage.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
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 21:28.


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