My code:
PHP Code:
public FwdPlayerTakeDMG(iPlayer, inflictor, attacker, Float:damage, damagebits)
{
//If player is alive and the damage is done by falling
if(is_user_alive(iPlayer) && (damagebits & DMG_FALL) )
{
//If player is either ct or T
new CsTeams:team = cs_get_user_team(iPlayer);
if( team == CS_TEAM_CT || team == CS_TEAM_T )
{
new percent = ItemMaxValue [ FALLDMG ] * iLevel_Item [ iPlayer ] [ FALLDMG ] / ItemMaxLevel [ FALLDMG ]
new Float:reduction = float ( floatround ( ( damage * float ( percent ) / 100.0 ), floatround_floor ) )
SetHamParamFloat ( 4, damage - reduction )
set_hudmessage(0, 127, 255, -1.0, -1.0)
show_hudmessage ( iPlayer, "Fall Damage Reducer - Level %i^nInitial Damage: %.1f^nTaken Damage: %.1f^nDamage Reduced: %.1f", iLevel_Item [ iPlayer ] [ FALLDMG ], damage, damage - reduction, reduction )
}
}
}
- Its showing the Hudmessage with all correct stats, but it doesnt remove any damage s:
__________________