View Single Post
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 11-25-2017 , 23:59   Re: [L4D & L4D2] No Friendly Fire (v2.0, 11-25-2017)
Reply With Quote #10

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
Attached Files
File Type: sp Get Plugin or Get Source (removeFF.sp - 1731 views - 988 Bytes)
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D

Last edited by Lux; 11-26-2017 at 00:04.
Lux is offline