Hello,
My current problem is the following:
I got a damage multiplier on every gun depending on the amount of points you have on a certain skill (Power).
PHP Code:
public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
{
new powers = (player_power[inflictor]/50)
new extradmg = 1 + powers
SetHamParamFloat(4, damage * extradmg)
}
As you can see it should basicly come out to this: normale damage × (1 + (player_power[inflictor]/50). So it should do 200% at max level (it's 50 points per skill).
When it's maxed out it actually works. But below level 50 it's all the same damage (100%). Is there a reason that it won't work correctly?
P.S. I got an error index out of bounds on the "new powers = (player_power[inflictor]/50)" line. I've tried attacker instead of inflictor aswell.