[Any] Mirror Damage [12.01.2013]
2 Attachment(s)
~ Mirror Damage UPDATED 12.01.13
Prevent friendlyfire damage, and returns it back to attacker. Installation: put MirrorDamage.smx into addons/sourcemod/plugins/ Cvars: sm_mirrordamage_version - Version of plugin sm_mirrordamage_multiplier - Amount of damage to inflict to attacker (Def: 0.7) sm_mirrordamage_slap - Slap attacker?! or just subtraction health (Def: 0) sm_mirrordamage_annonce - Type in chat about friendlyfire?! (Def: 0) Example: "NEATEK attacked a teammate" Requiments: SDKHooks Counter-Strike: Source (works fine) Counter-Strike: Global offensive (must works) Team Fortrees 2 (must works) Changelog: 1.1rc: // not tested
|
Re: [Any] Mirror Damage (sdkhooks)
There is another mirror damage plugin. Though that one has issues where the victim could get killed as well as the attacker.
Is that corrected in this one? What are the differences? |
Re: [Any] Mirror Damage (sdkhooks)
Quote:
Quote:
|
Re: [Any] Mirror Damage (sdkhooks)
Great. Would you mind adding an sm_mirrordamage <client> command then? :3
|
Re: [Any] Mirror Damage (sdkhooks)
Quote:
|
Re: [Any] Mirror Damage (sdkhooks)
Quote:
Nice plugin nonetheless! |
Re: [Any] Mirror Damage (sdkhooks)
Could be good for anti tk. Anyway you could fix this bit.
PHP Code:
PHP Code:
|
Re: [Any] Mirror Damage (sdkhooks)
Quote:
PHP Code:
|
Re: [Any] Mirror Damage (sdkhooks)
1. SDKHooks is better, since the victim won't die as well. I like ecca's conditional statement format better, but since it's the same logic it doesn't really make a difference.
2. However, the attacker might not necessarily be a player, so before you check IsClientInGame(attacker), make sure attacker <= MaxClients. 3. Aside from using SDKHooks to avoid killing the victim, this plugin isn't significantly different from MadHamster's Reflect Team Damage plugin. I would recommend adding some extra features, such as convars that can slap or give verbal warnings to team attackers. 4. Also, a player can damage themself, such as with a nade. As it stands, the plugin will double the damage a player inflicts on themself, so make sure that attacker != victim. 5. For compatibility with CS:GO, you cannot use ForcePlayerSuicide directly in the OnTakeDamage function, or else it will cause srcds.exe to crash. Instead, you need to create a timer, such as: Code:
if(mirrordamage < 0) |
Re: [Any] Mirror Damage (sdkhooks)
Sheepdude, oh, thank you, it very helpful! :)
I will take your advice note. |
All times are GMT -4. The time now is 07:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.