Raised This Month: $51 Target: $400
 12% 

[CS:GO] Friendly Fire Damage


Post New Thread Reply   
 
Thread Tools Display Modes
kito0t
Member
Join Date: Apr 2019
Old 08-27-2020 , 13:09   Re: [CS:GO] Molotov Friendly Fire
Reply With Quote #21

Quote:
Originally Posted by ROFI View Post
Damage to molotov teammates does not work after the update.
need to update sourcemod to 1.11
kito0t is offline
Ejziponken
AlliedModders Donor
Join Date: Apr 2008
Old 09-04-2020 , 13:54   Re: [CS:GO] Molotov Friendly Fire
Reply With Quote #22

L 09/03/2020 - 193:17: [SM] Call stack trace:
L 09/03/2020 - 193:17: [SM] [0] GetClientTeam
L 09/03/2020 - 193:17: [SM] [1] Line 28, molotov_td.sp::SDK_OnTakeDamage
Ejziponken is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 02-25-2021 , 15:06   Re: [CS:GO] Molotov Friendly Fire
Reply With Quote #23

I would like a version that would damage the friends of all grenades, I tested this one:
Quote:
Originally Posted by Ilusion9 View Post
Try this:
PHP Code:

#include <sourcemod>
#include <sdkhooks>
#pragma newdecls required

public Plugin myinfo =
{
    
name "Molotov Friendly Fire",
    
author "Ilusion9",
    
description "Enable only molotov damage for teammates and block everything else.",
    
version "1.0",
    
url "https://github.com/Ilusion9/"
};

bool g_IsPluginLoadedLate;

public 
APLRes AskPluginLoad2(Handle myselfbool latechar[] errorint err_max)
{
    
g_IsPluginLoadedLate late;
}

public 
void OnPluginStart()
{
    if (
g_IsPluginLoadedLate)
    {
        for (
int i 1<= MaxClientsi++)
        {
            if (
IsClientInGame(i))
            {
                
OnClientPutInServer(i);
            }
        }
    }
}

public 
void OnClientPutInServer(int client)
{
    
SDKHook(clientSDKHook_OnTakeDamageSDK_OnTakeDamage);
    
SDKHook(clientSDKHook_TraceAttackSDK_OnTraceAttack);
}

public 
Action SDK_OnTakeDamage(int victimint &attackerint &inflictorfloat &damageint &damagetypeint &weaponfloat damageForce[3], float damagePosition[3])
{
    
// inflictor is not a grenade, world damage or enemy team
    
if (inflictor <= MaxClients || !IsValidClient(attacker) || GetClientTeam(attacker) != GetClientTeam(victim))
    {
        return 
Plugin_Continue;
    }
    
    
damage 0.0;
    
damagetype |= DMG_PREVENT_PHYSICS_FORCE;
    
    return 
Plugin_Changed;
}

public 
Action SDK_OnTraceAttack(int victimint &attackerint &inflictorfloat &damageint &damagetypeint &ammotypeint hitboxint hitgroup)
{
    
// world damage or enemy team
    
if (!IsValidClient(attacker) || GetClientTeam(attacker) != GetClientTeam(victim))
    {
        return 
Plugin_Continue;
    }
    
    return 
Plugin_Handled;
}

bool IsValidClient(int client)
{
    if (
client || client MaxClients || !IsClientInGame(client))
    {
        return 
false;
    }
    
    return 
true;

However, a player from the same team did not work, he can pass over the molotovs, grenades do not damage, neither to friends nor if I attack myself, on my foot.

CVARS of fire friends I have are these:
Code:
mp_friendlyfire 1
ff_damage_reduction_grenade 0.85
ff_damage_reduction_bullets 0.33
ff_damage_reduction_other 0.4
ff_damage_reduction_grenade_self 1
Would anyone have a version that works friendly damage with all grenades?

I use SourceMod Version: 1.10.0.6501

Last edited by paulo_crash; 02-25-2021 at 15:09.
paulo_crash is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 02-26-2021 , 04:49   Re: [CS:GO] Molotov Friendly Fire
Reply With Quote #24

Does friendlyfire works without this plugin?

PHP Code:

mp_friendlyfire 1
ff_damage_reduction_grenade 0.85
ff_damage_reduction_bullets 0
ff_damage_reduction_other 0
ff_damage_reduction_grenade_self 1 
You can use only these cvars to enable ff damage from all grenades.
__________________
Ilusion9 is offline
c2qute
Junior Member
Join Date: Dec 2008
Old 04-02-2021 , 19:48   Re: [CS:GO] Molotov Friendly Fire
Reply With Quote #25

Plugin seems to be broken with the cvars required? I can't get the molotov to damage teammates. I can team attack teammates with guns.
c2qute is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 04-03-2021 , 04:19   Re: [CS:GO] Molotov Friendly Fire
Reply With Quote #26

Quote:
Originally Posted by c2qute View Post
Plugin seems to be broken with the cvars required? I can't get the molotov to damage teammates. I can team attack teammates with guns.
Do you have the latest stable sourcemod and metamod versions?
Do you have any errors in logs?
__________________
Ilusion9 is offline
c2qute
Junior Member
Join Date: Dec 2008
Old 04-03-2021 , 12:23   Re: [CS:GO] Molotov Friendly Fire
Reply With Quote #27

Quote:
Originally Posted by Ilusion9 View Post
Do you have the latest stable sourcemod and metamod versions?
Do you have any errors in logs?
Code:
] sm version
 SourceMod Version Information:
    SourceMod Version: 1.11.0.6673
    SourcePawn Engine: 1.11.0.6673, jit-x86 (build 1.11.0.6673)
    SourcePawn API: v1 = 5, v2 = 13
    Compiled on: Mar 24 2021 20:05:54
    Built from: https://github.com/alliedmodders/sourcemod/commit/ca1dcc9b
    Build ID: 6673:ca1dcc9b
    http://www.sourcemod.net/
] meta version
 Metamod:Source Version Information
    Metamod:Source version 1.11.0-dev+1144
    Plugin interface version: 16:14
    SourceHook version: 5:5
    Loaded As: Valve Server Plugin
    Compiled on: Aug 25 2020 06:49:23
    Built from: https://github.com/alliedmodders/metamod-source/commit/7341116
    Build ID: 1144:7341116
    http://www.metamodsource.net/
No error logs
c2qute is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 05-05-2021 , 06:48   Re: [CS:GO] Friendly Fire Damage
Reply With Quote #28

Updated.
__________________
Ilusion9 is offline
paulo_crash
AlliedModders Donor
Join Date: May 2016
Location: Brazil
Old 07-27-2021 , 07:29   Re: [CS:GO] Friendly Fire Damage
Reply With Quote #29

Have you ever thought about putting a punishment system for players who kill their friends, for example:
  • Player does 170 damage with friendly fire takes kick;
  • Player back does 170 damage with friendly fire takes temporary ban;
  • Player back does 170 damage with friendly fire takes permanent ban;

Before hitting 170 damage with friendly fire the player is notified, if he continues with friendly fire he will be punished.

Would something like this be possible?

Note: It would be interesting if it is compatible with SourceBans++.
paulo_crash is offline
flashing
Senior Member
Join Date: Jul 2019
Location: India
Old 11-12-2021 , 00:06   Re: [CS:GO] Friendly Fire Damage
Reply With Quote #30

It's working fine but teammates knifing each other slow them down, is there a way to disable that.
__________________

        Discord: FLASHING#8548
              Steam
flashing is offline
Reply



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 12:12.


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