Variable Friendly Fire
Description:This plugin allows you to use Friendly Fire and not have to worry about accidental Team Kills. It multiplies the amount of damage done to a teammate using a variable such as 1.0 which is 100% or 0.25 which is 25% damage. This should work with any team kill punish plugin you want to run on your server. I have tested this with both humans and CZ bots.
Tested in CZ.
NOTE: In your plugins ini file add variable-friendlyfire.amxx at the top for the file. Other wise it wont overwrite the original client command ff in nextmap.sma
- mp_friendlyfire - The percentage you want the damage to be brought down to. 0.50 is 50% and 1.0 is 100%. 1.0 deals the same amount to a teammate as it would an enemy. 0 turns off the plugin and friendly fire all together.
- mp_mirrordamage - The percentage you want the mirror damage to be brought down to. 0.50 is 50% and 1.0 is 100%. 1.0 deals the same amount of mirror damage as if attacking an enemy. 0 turns off mirror damage.
- vf_mirrordamage - Decides if you hurt the original victim when mirror damage is turned on. 1 = hurt victim 0 = dont hurt victim. <Default: 0>
- vf_nades - This is to ignore grenades when multipling damage for TK. <Default: 0>
- For a list of servers running this plugin Click here
- amx_friendlyfire - Sets the value of "mp_friendlyfire" (Requires ADMIN_RCON)
- amx_mirrordamage - Sets the value of "mp_mirrordamage" (Requires ADMIN_RCON)
- Snow - For registering bots in ham.
- Schmurgel1983 - For figuring out the correct multiplier.
- Bibu - For fixing the bomb Explosion
- DumNut101 - For alerting me to an issue with the options vs outcome
- Apollyon - For alerting me of an issue within my release thread. KING TYPO STRIKES AGAIN
Removed Global Toggle
Checks if Friendly fire is active(if not plugin dosent run)
Checks if valid player
Fixed to what Connor said.. Thanks Again mang
Restricted the use of this to 0.0 - 1.0 which means 0.0 is no damage and 1.0 is full damage as if on the other team.
Changed damage deduction so that it takes it from full damage not the already lower damage.
SetHamParamFloat(4, (damage * 3 ) * flFFRatio);
Removed Cstrike specific code.
Using floatclam() instead of the ration
Removed my cvar and use mp_friendlyfire
Make sure you set mp_friendlyfire to the decimal you would like damage reduced buy
And place that value in your amx modx config...
mp_friendlyfire 0.25 = 75% damage reduction
Changed the Damage multiplier from 3 to 2.86
Created a new cvar to include nades or ignore them. (set to 1 allows the engine to normally handle grenades according to its own math)
Added 2 new cvars
Added 2 new console commands
Added custom say commands to display the status of friendlyfire and mirrordamage.
Works for both Say and Say_Team
For Friendly fire use: /ff or ff
For Mirror Damage use: /md or md
Small bug fix. When mp_mirrordamage was set to anything between 0-1 it wouldnt take damage unless it was 1.
Fixed the Cvars
Recoded the Player Hurt Section to be more readable.
Made the plugin ignore C4 explosions.
Fixed say message
Small Bug Fixes
Changed to use czbot supoort with rage module
Fixed C4 Explosions using classnames instead of dmg bits due to grenade conflict.
Removed Rage Model Requirement
Rewrote fwdPlayerHurt to make it easier to read and follow.
Added comments for better debugging.
Fixed issues with mirror and friendly fire damages not working correctly.