Also, you're creating unneeded variables... this is much easier:
PHP Code:
#define DAMAGE_REDUCTION 0.9 /* 90% of total damage is applied, meaning 10% reduction */
new g_iMaxPlayers
// in plugin_init()
g_iMaxPlayers = get_maxplayers()
//...
public fwTakeDamage(iVictim, iInflictor, iAttacker, Float:flDamage, iDamage_type)
{
if(iDamage_type & DMG_FALL && 1 <= iVictim <= g_iMaxPlayers)
{
switch(dmglevel[iVictim])
{
case 1: SetHamParamFloat(4, flDamage * DAMAGE_REDUCTION); // set the damage
case 2: /* If you have other cases use switch... if not, just add the dmglevel[iVictim] to the if() above, at the end */
}
}
Or if you want to actually specify the reduction amount, just make the calculations in a single line, don't create variables for each one.
__________________