Raised This Month: $51 Target: $400
 12% 

SH_DMG_KILL problems


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Exploited
Veteran Member
Join Date: Jul 2010
Location: Sweden
Old 01-08-2011 , 06:40   SH_DMG_KILL problems
Reply With Quote #1

Hey there,

So, I am using a Grim Reaper version with SH_DMG_KILL as it doesn't do like 10000 damage unlike the version with that hammethod you guys helped me with earlier. The problem with my SH_DMG_KILL thing is that it doesn't always kill in one hit, but it does sometimes. It does not matter how much hp the victim have left.

Heres my code:

PHP Code:
// Grim Reaper 
#include <superheromod> 
new gHeroID
new 
bool:gHasGrim[SH_MAXSLOTS+1]; 
//----------------------------------------------------------------------------- 
public plugin_init() 

    
register_plugin("SUPERHERO Grim Reaper""0.1""Author"); 
 
    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 client_damage(attackervictim)
{
    if (
victim != attacker && is_user_connected(attacker) ) 
    if ( 
sh_is_active() && gHasGrim[attacker] && pev(attackerpev_button) & IN_ATTACK2 && get_user_weapon(attacker) == CSW_KNIFE )
        
sh_extra_damage(victimattacker1"knife"0SH_DMG_KILL )

I was thinking that maybe making the damage higher? That is the third param, which I currently set to one.

Any ideas?

Exploited
__________________
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
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 01-08-2011 , 10:42   Re: SH_DMG_KILL problems
Reply With Quote #2

This is how I do it, dont know if its causing the problem though.

PHP Code:
public client_damage(attackervictim)
{
    if (
victim != attacker && is_user_connected(attacker) ) 
    if ( 
sh_is_active() && gHasGrim[attacker] && pev(attackerpev_button) & IN_ATTACK2 && get_user_weapon(attacker) == CSW_KNIFE )
        
sh_extra_damage(victimattacker1"knife"0SH_DMG_KILL )

to
PHP Code:
public client_damage(attackervictimdamage)
{
    if (
victim != attacker && is_user_connected(attacker) ) 
    if ( 
sh_is_active() && gHasGrim[attacker] && pev(attackerpev_button) & IN_ATTACK2 && get_user_weapon(attacker) == CSW_KNIFE )
        
sh_extra_damage(victimattackerdamage"knife"0SH_DMG_KILL )

__________________

Last edited by The Art of War; 01-08-2011 at 10:45.
The Art of War is offline
Exploited
Veteran Member
Join Date: Jul 2010
Location: Sweden
Old 01-08-2011 , 15:39   Re: SH_DMG_KILL problems
Reply With Quote #3

Thank you, but that didn't solve my issue.
__________________
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
G-Dog
Senior Member
Join Date: Dec 2005
Location: Thunderstorm Central
Old 01-08-2011 , 16:31   Re: SH_DMG_KILL problems
Reply With Quote #4

try
PHP Code:
public client_damage(attackervictim)
{
    if (
victim != attacker && is_user_connected(attacker) ) 
    if ( 
sh_is_active() && gHasGrim[attacker] && pev(attackerpev_button) & IN_ATTACK2 && get_user_weapon(attacker) == CSW_KNIFE )
    {
        
set_user_godmode(victim0);
        
sh_extra_damage(victimattacker1"knife"0SH_DMG_KILL );
    }

__________________
If at first you don't succeed, then skydiving isn't for you.
G-Dog is offline
Send a message via AIM to G-Dog
Exploited
Veteran Member
Join Date: Jul 2010
Location: Sweden
Old 01-08-2011 , 16:53   Re: SH_DMG_KILL problems
Reply With Quote #5

May I ask, what did you do with the godmde and why did you do it?
__________________
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
G-Dog
Senior Member
Join Date: Dec 2005
Location: Thunderstorm Central
Old 01-08-2011 , 17:01   Re: SH_DMG_KILL problems
Reply With Quote #6

the only reason SH_DMG_KILL wouldn't work that I can think of is that the person has godmode, that or you modified superhero and broke that functionality
__________________
If at first you don't succeed, then skydiving isn't for you.
G-Dog is offline
Send a message via AIM to G-Dog
Exploited
Veteran Member
Join Date: Jul 2010
Location: Sweden
Old 01-08-2011 , 17:11   Re: SH_DMG_KILL problems
Reply With Quote #7

So would this version hit through Captain Americas shield?
__________________
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
Exploited
Veteran Member
Join Date: Jul 2010
Location: Sweden
Old 01-09-2011 , 06:40   Re: SH_DMG_KILL problems
Reply With Quote #8

I tried G-Dogs version, and it has the same results as mine did. It works sometimes, but not always and it is not Captain America.
__________________
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
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 01-09-2011 , 08:38   Re: SH_DMG_KILL problems
Reply With Quote #9

Sorry I failed there.

This is what I use in a code that is working:

Code:
public client_damage(attacker, victim, damage, wpnindex, hitplace)
{
	if ( !sh_is_active() ) return
	if ( !is_user_connected(victim) || !is_user_alive(attacker) ) return

	if ( gHasHero[attacker] && wpnindex == CSW_KNIFE && random_float(0.01, 1.00) <= get_pcvar_float(pCvarChance) && damage > 0 ) {

		new headshot = hitplace == 1 ? 1 : 0
		sh_extra_damage(victim, attacker, damage, "DamageName", headshot, SH_DMG_KILL)
	}
}
'
Then of course change "Hero" to the variable's name and DamageName to whatever you want.
__________________
The Art of War is offline
Exploited
Veteran Member
Join Date: Jul 2010
Location: Sweden
Old 01-09-2011 , 11:49   Re: SH_DMG_KILL problems
Reply With Quote #10

Nope, doesn't work 100%.
__________________
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
Reply



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 13:12.


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