Raised This Month: $ Target: $400
 0% 

Solved [Req] Knife Damage Always 45


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-22-2020 , 20:57   Re: [Req] Knife Damage Always 45
Reply With Quote #5

Do you want 45 damage or 45 loss in hp, they are not the same thing

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

public plugin_init() 
{
    
RegisterHamHam_TakeDamage "player" "playerTakeDamagePre" );
}

public 
playerTakeDamagePrevictim inflictor attacker Float:damage damagebits 
{
    if ( 
is_user_connectedattacker ) && ( get_user_weaponattacker ) == CSW_KNIFE ) ) 
    {
        
set_user_healthvictim get_user_healthvictim ) - 45 );
        return 
HAM_SUPERCEDE;
    }
    
    return 
HAM_IGNORED;

__________________
Bugsy is offline
 



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 23:56.


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