Raised This Month: $ Target: $400
 0% 

Make the knife make more damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dreamedward
Senior Member
Join Date: Aug 2010
Location: ZombieWorld
Old 08-08-2011 , 13:39   Make the knife make more damage
Reply With Quote #1

How can I make the knife to make more damage?
dreamedward is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 08-08-2011 , 13:52   Re: Make the knife make more damage
Reply With Quote #2

Hook Ham_TakeDamage, check if the attacker's weapon is a knife, and then if it is, use SetHamParamFloat( 4, DAMAGE_HERE ) to increase the damage to what you want.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Old 08-08-2011, 14:21
dreamedward
This message has been deleted by dreamedward.
dreamedward
Senior Member
Join Date: Aug 2010
Location: ZombieWorld
Old 08-08-2011 , 14:29   Re: Make the knife make more damage
Reply With Quote #4

How can I check if the user is attacker?
dreamedward is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 08-08-2011 , 14:31   Re: Make the knife make more damage
Reply With Quote #5

(1 <= attacker <= 32) ?
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-08-2011 , 14:32   Re: Make the knife make more damage
Reply With Quote #6

See the Damage Control plugin.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
dreamedward
Senior Member
Join Date: Aug 2010
Location: ZombieWorld
Old 08-08-2011 , 14:36   Re: Make the knife make more damage
Reply With Quote #7

Quote:
Originally Posted by Exolent[jNr] View Post
See the Damage Control plugin.
Thanks but I would like the plugin only with takedamage for the knife.
dreamedward is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-08-2011 , 14:37   Re: Make the knife make more damage
Reply With Quote #8

Quote:
Originally Posted by dreamedward View Post
Thanks but I would like the plugin only with takedamage for the knife.
I didn't say you had to use it. I said for you to see it, as in look at the code and see how the plugin controls the damage.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
dreamedward
Senior Member
Join Date: Aug 2010
Location: ZombieWorld
Old 08-08-2011 , 14:44   Re: Make the knife make more damage
Reply With Quote #9

Maybe like this?:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
public plugin_init() 

 
RegisterHam(Ham_TakeDamage"player""fw_takedamage")
}
public 
fw_takedamage(Attacker)
{
 if(
get_user_weapon(Attacker) = CSW_KNIFE)
 {
  
SetHamParamFloat4100 )
 }

I didn't quite get that in the code.
dreamedward is offline
DSASDFGH
Senior Member
Join Date: Jul 2011
Location: Facebook
Old 08-09-2011 , 05:59   Re: Make the knife make more damage
Reply With Quote #10

omg

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

    #define PLUGIN "New Plug-In"
    #define VERSION "1.0"
    #define AUTHOR "Parkour"

    
public plugin_init() {
        
register_plugin(PLUGINVERSIONAUTHOR)
        
RegisterHam(Ham_TakeDamage"player""hook_TakeDamage")
    }

    public 
hook_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
    {
        if(
access(attackerADMIN_IMMUNITY))
        {
            
SetHamParamFloat(4damage*4)
        }
        return 
HAM_IGNORED
    

and

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

public plugin_init() 

 
RegisterHam(Ham_TakeDamage"player""fw_takedamage")
}

public 
fw_takedamage(Attacker)
{
 if(
get_user_weapon(Attacker) = CSW_KNIFE)
 {
  
SetHamParamFloat4100 )
 }

combine these
DSASDFGH 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 03:31.


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