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

Need help with damage plugin :)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Balck
Senior Member
Join Date: Apr 2013
Location: Kosova-Mitrovica
Old 07-08-2013 , 18:02   Need help with damage plugin :)
Reply With Quote #1

When i kill someone with left mouse click thits plugin does not set frags to me.
Can some one help me here

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

public plugin_init()
{
    
register_plugin("PLUGIN""VERSION""AUTHOR")
    
register_cvar"amx_knife_dmg""10.0" )
    
register_event"Damage""Event_Damage""b""2!0" )
}

public 
Event_Damageid )
{
    new 
weaponbodypart
    
new attacker get_user_attackeridweaponbodypart )
    
    if ( !
is_user_aliveid ) || !is_user_aliveattacker ) )
        return 
PLUGIN_CONTINUE
    
    
if ( weapon != CSW_KNIFE )
        return 
PLUGIN_CONTINUE
    
    
new iHealth get_user_healthid )
    new 
iDamage floatroundfloatread_data(2) ) * get_cvar_float"amx_knife_damage" ) )
    if ( 
iHealth iDamage 
        
fakedamageid"weapon_knife"floatiDamage ), read_data) )
    else
    {
        
user_silentkillid )
        
make_deathmsgattackerid0"knife" )
    }
    return 
PLUGIN_CONTINUE

__________________

Last edited by Balck; 07-08-2013 at 18:02.
Balck 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 08:15.


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