Raised This Month: $23 Target: $400
 5% 

[CS:GO] Molotov Friendly Fire


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Plugin ID:
6923
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Enable only molotov damage for teammates and block everything else.
    Old 01-28-2020 , 08:29   [CS:GO] Molotov Friendly Fire
    Reply With Quote #1

    Description: Enable only molotov damage for teammates and block everything else.
    Players will not be slowed down by teammates attacks.

    ConVars:
    Code:
    mp_friendlyfire 1
    ff_damage_reduction_bullets 0.33
    ff_damage_reduction_grenade 0.85
    ff_damage_reduction_grenade_self 1
    ff_damage_reduction_other 0.4
    The ff_ convars can be changed as you want, but be sure the friendly fire still works. On default casual gamemode, mp_friendlyfire is enabled and all ff_ convars on 0. Even with mp_friendlyfire enabled, friendly fire doesn't work.

    GitHub: https://github.com/Ilusion9/molotov-friendlyfire-sm
    __________________

    Last edited by Ilusion9; 02-18-2020 at 11:47.
    Ilusion9 is offline
    Ejziponken
    AlliedModders Donor
    Join Date: Apr 2008
    Old 01-28-2020 , 09:39   Re: [CS:GO] Molotov Damage
    Reply With Quote #2

    How is this different from: https://forums.alliedmods.net/showthread.php?t=320656 ?
    Ejziponken is offline
    Ilusion9
    Veteran Member
    Join Date: Jun 2018
    Location: Romania
    Old 01-28-2020 , 09:40   Re: [CS:GO] Molotov Damage
    Reply With Quote #3

    Quote:
    Originally Posted by Ejziponken View Post
    It's still made, changed and tested by me, but I will give support here.
    __________________

    Last edited by Ilusion9; 01-28-2020 at 09:41.
    Ilusion9 is offline
    kkkfs
    New Member
    Join Date: May 2020
    Old 06-08-2020 , 09:22   Re: [CS:GO] Molotov Friendly Fire
    Reply With Quote #4

    i cant use the ff_ convars after i use the plungins,is it normal?
    kkkfs is offline
    kkkfs
    New Member
    Join Date: May 2020
    Old 06-08-2020 , 09:24   Re: [CS:GO] Molotov Friendly Fire
    Reply With Quote #5

    Quote:
    Originally Posted by kkkfs View Post
    i cant use the ff_ convars after i use the plungins,is it normal?
    molotov can damage,but else cant damage teammate
    ff convars is useless
    kkkfs is offline
    paulo_crash
    AlliedModders Donor
    Join Date: May 2016
    Location: Brazil
    Old 07-16-2020 , 20:38   Re: [CS:GO] Molotov Friendly Fire
    Reply With Quote #6

    Does this include damage from all grenades? HE and Molotovs?

    In this case I would like to block all weapon fire damage, except for grenades, be it HE or Molotovs.
    __________________
    paulo_crash is offline
    flashing
    Member
    Join Date: Jul 2019
    Location: Delhi, India
    Old 07-24-2020 , 05:12   Re: [CS:GO] Molotov Friendly Fire
    Reply With Quote #7

    after today's update knife damage is now enabled
    __________________

            Discord: FLASHING#8548
                  Steam
    flashing is offline
    borzaka
    AlliedModders Donor
    Join Date: May 2020
    Location: Hungary
    Old 07-24-2020 , 10:42   Re: [CS:GO] Molotov Friendly Fire
    Reply With Quote #8

    Quote:
    Originally Posted by flashing View Post
    after today's update knife damage is now enabled
    Update your SourceMod to the latest stable:
    https://www.sourcemod.net/downloads.php?branch=stable
    borzaka is offline
    flashing
    Member
    Join Date: Jul 2019
    Location: Delhi, India
    Old 07-24-2020 , 11:16   Re: [CS:GO] Molotov Friendly Fire
    Reply With Quote #9

    Quote:
    Originally Posted by borzaka View Post
    Update your SourceMod to the latest stable:
    https://www.sourcemod.net/downloads.php?branch=stable
    yup just figured it out thanks
    __________________

            Discord: FLASHING#8548
                  Steam
    flashing is offline
    penalte
    Member
    Join Date: Jan 2016
    Old 07-24-2020 , 14:18   Re: [CS:GO] Molotov Friendly Fire
    Reply With Quote #10

    Quote:
    Originally Posted by paulo_crash View Post
    Does this include damage from all grenades? HE and Molotovs?

    In this case I would like to block all weapon fire damage, except for grenades, be it HE or Molotovs.
    Here it is with HE GRENADE added

    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);
    }

    public 
    Action SDK_OnTakeDamage(int victimint &attackerint &inflictorfloat &damageint &damagetypeint &weaponfloat damageForce[3], float damagePosition[3])
    {
        if (
    attacker || attacker MaxClients || attacker == victim || inflictor 1)
        {
            return 
    Plugin_Continue;
        }
        
        if (
    GetClientTeam(attacker) != GetClientTeam(victim))
        {
            return 
    Plugin_Continue;
        }
        
        if (
    inflictor MaxClients)
        {
            
    char inflictorClass[64];
            
    GetEdictClassname(inflictorinflictorClasssizeof(inflictorClass));
            
            if (
    StrEqual(inflictorClass"planted_c4") || StrEqual(inflictorClass"inferno") || StrEqual(inflictorClass"hegrenade_projectile"))
            {
                return 
    Plugin_Continue;
            }
        }
        
        
    damage 0.0;
        
    damagetype |= DMG_PREVENT_PHYSICS_FORCE;
        return 
    Plugin_Changed;

    penalte 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 04:14.


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