Hello guys,
I try to reduce the fall damage of a player by a procent. (in this example 10%)
Here is my code:
PHP Code:
public fwTakeDamage(iVictim, iInflictor, iAttacker, Float:flDamage, iDamage_type)
{
if(iDamage_type & DMG_FALL && iVictim <= 32 && iVictim >= 1)
{
switch(dmglevel[iVictim])
{
case 1:
{
new float:procent = 10.0 // get the procent
new float:bDamage = flDamage / 100.0 // damage / 100
new float:aDamage = bDamage * procent // then multiply * procent to get the 10% of the damage
new dmg = flDamage - aDamage // remove the 10% from the real damage
SetHamParamFloat(4, dmg); // set the damage
}
}
}
but i get tag mismatches
__________________