Raised This Month: $81 Target: $400
 20% 

[L4D & L4D2] No Friendly-fire (v10.0, 6-1-2022)


Post New Thread Reply   
 
Thread Tools Display Modes
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 11-26-2017 , 01:12   Re: [L4D & L4D2] No Friendly Fire (v2.0, 11-25-2017)
Reply With Quote #11

Quote:
Originally Posted by Lux View Post
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:
#include <sourcemod>
#include <sdktools>

public Plugin:myinfo =
{
    
name "RemoveFF",
    
author "Lux",
    
description "",
    
version "",
    
url ""
};

public 
OnPluginStart()
{
    
HookEvent("round_start"RoundStart);
    
HookEvent("round_end"RoundStart);
}

public 
Action:RoundStart(Handle:event, const String:name[], bool:dontBroadcast
{
    
SetConVarString(FindConVar("survivor_friendly_fire_factor_easy"), "0");
    
SetConVarString(FindConVar("survivor_friendly_fire_factor_expert"), "0");
    
SetConVarString(FindConVar("survivor_friendly_fire_factor_hard"), "0");
    
SetConVarString(FindConVar("survivor_friendly_fire_factor_normal"), "0");
    
SetConVarString(FindConVar("grenadelauncher_ff_scale"), "0");
    
SetConVarString(FindConVar("survivor_burn_factor_easy"), "0");
    
SetConVarString(FindConVar("survivor_burn_factor_normal"), "0");
    
SetConVarString(FindConVar("survivor_burn_factor_hard"), "0");
    
SetConVarString(FindConVar("survivor_burn_factor_expert"), "0");

Note the cvars stop self damage from explosive ammo too
Thank you for sharing.
__________________
Psyk0tik is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 11-26-2017 , 03:46   Re: [L4D & L4D2] No Friendly Fire (v2.0, 11-25-2017)
Reply With Quote #12

Quote:
Originally Posted by Lux View Post
[...]
SetConVarString? Why not SetConVarInt?
cravenge is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Brexit
Old 11-26-2017 , 17:39   Re: [L4D & L4D2] No Friendly Fire (v2.0, 11-25-2017)
Reply With Quote #13

Quote:
Originally Posted by Crasher_3637 View Post
Thank you for sharing.
NP ;D

Quote:
Originally Posted by cravenge View Post
SetConVarString? Why not SetConVarInt?
Was just a copy and paste from my plugin, All cvars are strings, just saves me from SetConVarFloat and SetConVarInt and checking.

Having all SetConVarString is much more simple
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 12-08-2017 , 20:31   Re: [L4D & L4D2] No Friendly Fire (v3.0, 12-08-2017)
Reply With Quote #14

Version 3.0 is out!

Changes

1. Used a completely different code.
2. Added a check for game mode.

Please redownload the plugin from the first post and delete your l4d_nofriendlyfire.cfg file!
__________________
Psyk0tik is offline
eziosid
Senior Member
Join Date: Sep 2017
Old 12-19-2017 , 07:08   Re: [L4D & L4D2] No Friendly Fire (v3.0, 12-08-2017)
Reply With Quote #15

its competable work for l4d2 versus mode ?
eziosid is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 12-19-2017 , 10:43   Re: [L4D & L4D2] No Friendly Fire (v3.0, 12-08-2017)
Reply With Quote #16

Quote:
Originally Posted by eziosid View Post
its competable work for l4d2 versus mode ?
Nope.
__________________
Psyk0tik is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 01-12-2018 , 22:11   Re: [L4D & L4D2] No Friendly-fire (v4.0, 01-12-2018)
Reply With Quote #17

Version 4.0 is out!

Changes

1. Added support for other game modes.
2. Code optimization.
3. Renamed the source code and .cfg files.

Please redownload the plugin from the first post and delete any files related to the previous version!
__________________
Psyk0tik is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 01-12-2018 , 22:12   Re: [L4D & L4D2] No Friendly Fire (v3.0, 12-08-2017)
Reply With Quote #18

Quote:
Originally Posted by eziosid View Post
its competable work for l4d2 versus mode ?
It now supports all game modes.
__________________
Psyk0tik is offline
WhatsAnName
Member
Join Date: Jun 2018
Old 06-10-2018 , 14:59   Re: [L4D & L4D2] No Friendly-fire (v4.0, 01-12-2018)
Reply With Quote #19

doesnt work as its meant to cause upon starting game or rather called round start it doesnt auto load correctly have to enter sm plugins reload (your plugin) just for it to work but just the other day n weeks before it was working just fine even deleted the plugin and re downloaded twice as well remove other plugins to try to see the problem still doesnt work right
WhatsAnName is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 06-10-2018 , 15:05   Re: [L4D & L4D2] No Friendly-fire (v4.0, 01-12-2018)
Reply With Quote #20

I'm not sure exactly what the problem is since it always loads fine for me. If a plugin isn't loading properly on your server, then the issue must be caused by something else.
__________________
Psyk0tik is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode