 |
|
Senior Member
|

09-23-2020
, 02:59
Re: [Req] Knife Damage Always 45
|
#6
|
Quote:
Originally Posted by Bugsy
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()
{
RegisterHam( Ham_TakeDamage , "player" , "playerTakeDamagePre" );
}
public playerTakeDamagePre( victim , inflictor , attacker , Float:damage , damagebits )
{
if ( is_user_connected( attacker ) && ( get_user_weapon( attacker ) == CSW_KNIFE ) )
{
set_user_health( victim , get_user_health( victim ) - 45 );
return HAM_SUPERCEDE;
}
return HAM_IGNORED;
}
|
Thanks, works!
|
|
|
|