Raised This Month: $ Target: $400
 0% 

Double Damage don't work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-07-2014 , 11:59   Re: Double Damage don't work
Reply With Quote #1

Quote:
Originally Posted by aron9forever View Post
woops, sorry, I was high as fuck , that's when I start shitposting
he still needs return HAM_OVERRIDE instead of supercede
HAM_HANDLED is what he needs to return.
__________________
HamletEagle is offline
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 10-07-2014 , 13:13   Re: Double Damage don't work
Reply With Quote #2

PHP Code:
public Damage(victiminflictorattackerFloat:damagedamagebits

    if(
is_user_connected(victim) || is_user_alive(victim))  
    { 
        if( 
get_user_weapon(attacker) == CSW_AK47 )
        {
            if (
AreGoldenAk[attacker])
            {
                
SetHamParamFloat4damage )
                return 
HAM_HANDLED
            
}
            if (
AreSuperAk[attacker])
            {
                
SetHamParamFloat4damage 3)
                return 
HAM_HANDLED
            
}
        }
    }
    return 
HAM_IGNORED



PHP Code:
public Damage(victiminflictorattackerFloat:damagedamagebits

    if(
is_user_connected(attacker) && is_user_alive(victim))  
    { 
        if( 
get_user_weapon(attacker) == CSW_AK47 )
        {
            if (
AreGoldenAk[attacker])
            {
                
SetHamParamFloat4damage 2.0 )
                return 
HAM_HANDLED
            
}
            if (
AreSuperAk[attacker])
            {
                
SetHamParamFloat4damage 3.0 )
                return 
HAM_HANDLED
            
}
        }
    }
    return 
HAM_IGNORED

__________________
Hey ^_^
NikKOo31 is offline
Decak
Senior Member
Join Date: Sep 2012
Old 10-06-2014 , 17:46   Re: Double Damage don't work
Reply With Quote #3

Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

new bool:AreGoldenAk[33], bool:AreSuperAk[33];

public plugin_init() {
    register_plugin("Register Name", "1.0", "Author")
    RegisterHam(Ham_TakeDamage, "player", "Damage")
}

public Damage(victim, inflictor, attacker, Float:damage, damagebits) 
{ 
    if(is_user_connected(victim) || is_user_alive(victim))  
    { 
        if( get_user_weapon(attacker) == CSW_AK47 )
        {
            if (AreGoldenAk[attacker])
            {
                SetHamParamFloat( 4, damage * 2 )
                return HAM_HANDLED
            }
            if (AreSuperAk[attacker])
            {
                SetHamParamFloat( 4, damage * 3)
                return HAM_HANDLED
            }
        }
    }
    return HAM_IGNORED
}
... add code with bool AreGoldenAk and AreSuperAk.
Decak is offline
pentakill
Member
Join Date: Oct 2014
Old 10-06-2014 , 18:22   Re: Double Damage don't work
Reply With Quote #4

Quote:
Originally Posted by Decak View Post
Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

new bool:AreGoldenAk[33], bool:AreSuperAk[33];

public plugin_init() {
    register_plugin("Register Name", "1.0", "Author")
    RegisterHam(Ham_TakeDamage, "player", "Damage")
}

public Damage(victim, inflictor, attacker, Float:damage, damagebits) 
{ 
    if(is_user_connected(victim) || is_user_alive(victim))  
    { 
        if( get_user_weapon(attacker) == CSW_AK47 )
        {
            if (AreGoldenAk[attacker])
            {
                SetHamParamFloat( 4, damage * 2 )
                return HAM_HANDLED
            }
            if (AreSuperAk[attacker])
            {
                SetHamParamFloat( 4, damage * 3)
                return HAM_HANDLED
            }
        }
    }
    return HAM_IGNORED
}
... add code with bool AreGoldenAk and AreSuperAk.
My plugin already works but thanks anyway
pentakill is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-07-2014 , 14:00   Re: Double Damage don't work
Reply With Quote #5

No,
Code:
public Damage(victim, inflictor, attacker, Float:damage, damagebits)   {       if( is_user_connected( attacker ) )       {           if( get_user_weapon(attacker) == CSW_AK47 )         {             if (AreGoldenAk[attacker])             {                 SetHamParamFloat( 4, damage * 2.0 )                 return HAM_HANDLED             }             if (AreSuperAk[attacker])             {                 SetHamParamFloat( 4, damage * 3.0 )                 return HAM_HANDLED             }         }     }     return HAM_IGNORED }
__________________
HamletEagle is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 10-07-2014 , 15:49   Re: Double Damage don't work
Reply With Quote #6

He already said that he has fixed the issue and his code works. You can stop now.
__________________
In Flames we trust!
Nextra 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 17:42.


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