Raised This Month: $ Target: $400
 0% 

how to make a class of human damage to x2 knife?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-27-2015 , 10:04   Re: how to make a class of human damage to x2 knife?
Reply With Quote #1

So, where's the code?
OciXCrom is offline
Send a message via Skype™ to OciXCrom
ADD47
Junior Member
Join Date: May 2014
Old 12-27-2015 , 10:14   Re: how to make a class of human damage to x2 knife?
Reply With Quote #2

Quote:
Originally Posted by OciXCrom View Post
So, where's the code?
PHP Code:
#include <amxmodx>
#include <zombieplague>
#include <fun>
#include <hamsandwich>

new boolg_knife[33]
new 
g_class_powerknife
new cvar_damage_multi

new const hclass4_name[] = ""
new const hclass4_info[] = ""
new const hclass4_model[] = ""
new const hclass4_clawmodel[] = ""
const hclass4_health 2600
const hclass4_speed 295
const Float:hclass4_gravity 0.7

public plugin_init()
{    
    
RegisterHamHam_TakeDamage"player""fw_TakeDamage" )
    
g_class_powerknife zp_register_human_class(hclass4_namehclass4_infohclass4_modelhclass4_clawmodelhclass4_healthhclass4_speedhclass4_gravity)
}

public 
fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    if (!
is_user_connected(attacker))
        return 
HAM_IGNORED

    
if (g_knife[attacker])    
    {
        if (
get_user_weapon(attacker) == CSW_KNIFE)
        {
            
SetHamParamFloat(4damage 2.0)
        }
    } 
    return 
HAM_IGNORED;

__________________
Editando Zombie Plague ;)

Last edited by ADD47; 12-27-2015 at 10:15.
ADD47 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:58.


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