[L4D & L4D2] No Friendly-fire (v10.0, 6-1-2022)
13 Attachment(s)
https://img.shields.io/github/stars/...le=flat-square https://img.shields.io/github/forks/...le=flat-square https://img.shields.io/github/watche...le=flat-square
Rate this plugin Donate to Motivate No Friendly-Fire Table of contents
About Disables friendly fire. Credits cravenge - For the original source code; fixing all the errors and converting the original source code into the new syntax in this post. Lux/LuxLuma - For the previous source code; showed me a better and simpler way of handling friendly fire. Silvers (Silvershot) - For the code that allows users to enable/disable the plugin in certain game modes and for blocking damage after idle/spectator team change and player disconnects. Kr3m, WhatsAnName - For reporting an issue. SourceMod Team - For continually updating/improving SourceMod. Requirements 1. SourceMod 1.9 or higher 2. Recommended: Left 4 DHooks Direct Notes 1. I do not provide support for listen/local servers but the plugin should still work properly on them. 2. I will not help you with installing or troubleshooting problems on your part. 3. If you get errors from SourceMod itself, that is your problem, not mine. 4. MAKE SURE YOU MEET ALL THE REQUIREMENTS AND FOLLOW THE INSTALLATION GUIDE PROPERLY. Features 1. Block friendly-fire for survivors. 2. Block friendly-fire for special infected. 3. Filter which damage types to allow/block. ConVars
Spoiler
Changelog
Spoiler
Installation 1. Delete files from old versions of the plugin. 3. Place "no_friendly-fire.smx" in the "addons/sourcemod/plugins" folder. 4. Place "no_friendly-fire.sp" in the "addons/sourcemod/scripting" folder. Uninstalling/Upgrading to Newer Versions 1. Delete "no_friendly-fire.sp" from the "addons/sourcemod/scripting" folder. 2. Delete "no_friendly-fire.smx" from the "addons/sourcemod/plugins" folder. 4. Follow the Installation guide above. (Only for upgrading to newer versions.) Disabling 1. Move "no_friendly-fire.smx" to the "plugins/disabled" folder. 2. Unload "No Friendly-Fire" by typing "sm plugins unload no_friendly-fire" in the server console. Third-party Revisions Notice If you would like to share your own revisions of this plugin, please rename the files so that there is no confusion for users. Download Source | Latest Version | All Official Releases |
Re: [L4D & L4D2] No Friendly Fire
I see an issue from reading the code.
Mastermind did the same thing as you forget about people throwing a molotov and changing team or leaving the server will cause damage to people. You should consider saving an entity reference of the fire and check it to stop that from happening |
Re: [L4D & L4D2] No Friendly Fire
Quote:
Also thanks for the information! |
Re: [L4D & L4D2] No Friendly Fire
1 Attachment(s)
Quote:
The errors have to do with line 40: PHP Code:
EDIT: I was able to figure out how I was getting those errors as well as how to fix them. I changed line 40 to: PHP Code:
PHP Code:
PHP Code:
To solve this issue, I simply hooked all 3 checks to just 1 cvar since it seems that all 3 need each other to function properly. This now gives the whole "disable firendly fire completely" feeling. TL;DR: Your version: 1. SI are invincible. 2. Errors in the logs. 3. Explosive barrels do not recognize bots and the check does not work properly. Your version with my revisions: 1. SI are killable. 2. No errors in the logs. 3. Explosive barrels now detect bots and the check works properly. You can see exactly what I did once I update the source code in the main post. |
Re: [L4D & L4D2] No Friendly Fire (v2.0, 11-25-2017)
Version 2.0 is out!
Changes 1. Implemented cravenge's entity reference check and explosive barrel check. 2. Removed cvar l4d_friendlyfire_fire. 3. Hid cvar l4d_friendlyfire_version and renamed it to l4d_nff_version. 4. Renamed cvar l4d_friendlyfire to l4d_nff. 5. Fire from explosive barrels no longer damage players (but the explosion still does). 6. Molotovs thrown by players that then switch teams or disconnect no longer do damage. Please redownload the plugin from the first post and delete your l4d_nofriendlyfire.cfg file! |
Re: [L4D & L4D2] No Friendly Fire (v2.0, 11-25-2017)
Quote:
|
Re: [L4D & L4D2] No Friendly Fire (v2.0, 11-25-2017)
1 Attachment(s)
Whoops, my bad! Here you go, I forgot including SDKTools before posting.
|
Re: [L4D & L4D2] No Friendly Fire (v2.0, 11-25-2017)
Quote:
|
Re: [L4D & L4D2] No Friendly Fire (v2.0, 11-25-2017)
Quote:
1. When the difficulty is set to Normal and l4d_nff is set to 0. - Bots still take damage. - My character doesn't take damage. - Logs are filled with errors about invalid client indices. 2. When the difficulty is set to Advanced or Expert and l4d_nff is set to 0. - Bots still take damage. - My character takes damage. - Logs are filled with errors about invalid client indices. 3. When the difficulty is set to Normal and l4d_nff is set to 1. - Bots take damage. - My character doesn't take damage. - No log errors. 4. When the difficulty is set to Advanced or Expert and l4d_nff is set to 1. - Bots take damage. - My character takes damage. - No log errors. |
Re: [L4D & L4D2] No Friendly Fire (v2.0, 11-25-2017)
1 Attachment(s)
I use these cvars on my server to disable friendly fire, it's a simple way for all survivors not to kill each other.
Thought i would share PHP Code:
|
All times are GMT -4. The time now is 04:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.