View Single Post
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-15-2022 , 07:42   Re: help, plugin furien
Reply With Quote #4

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))     } }
OciXCrom is offline
Send a message via Skype™ to OciXCrom