View Single Post
Junior Member
Join Date: Jan 2022
Old 01-15-2022 , 08:00   Re: help, plugin furien
Reply With Quote #5

Originally Posted by OciXCrom View Post
The point of putting it in tags was to make the code readable. You broke the indentation by posting it without the tags first.

This piece of the code prevents HE grenade damage for VIP players for whatever reason:

if(get_user_flags(Victim) & VIP_GOLD_LEVEL) {     if(DamageType & DMG_HEGRENADE)     return HAM_SUPERCEDE }

Furthermore, the entire code for modifying knife damage is wrong. It checks whether the player is holding a knife and changing the damage then. Of course when you throw the grenade you no longer have it in your hands and you're holding a knife, so the damage buff is applied to the grenade instead.

The entire SuperKnife_TakeDamage() function needs to look like this:

public SuperKnife_TakeDamage(Victim, Inflictor, Attacker, Floatamage, DamageType) {     if(is_user_connected(Attacker) && HaveSuperKnife[Attacker] && get_user_weapon(Attacker) == CSW_KNIFE && Attacker == Inflictor)     {         SetHamParamFloat(4, Damage * get_pcvar_float(superknife_damage_multiplier))     } }
after add your code
9680cc46cb53f8c6dd9dcb3ef31933c9.sma(223) : error 017: undefined symbol "Damage"
9680cc46cb53f8c6dd9dcb3ef31933c9.sma(223) : error 001: expected token: ";", but found ")"
9680cc46cb53f8c6dd9dcb3ef31933c9.sma(223) : error 029: invalid expression, assumed zero
9680cc46cb53f8c6dd9dcb3ef31933c9.sma(223) : fatal error 107: too many error messages on one line

Last edited by sssss1; 01-15-2022 at 08:03.
sssss1 is offline