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

without knife damage / but with molotov damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thekings4fun
Member
Join Date: Apr 2020
Old 08-06-2020 , 09:56   without knife damage / but with molotov damage
Reply With Quote #1

sorry to be asking this again, I need a configuration or plugin to do this


Plugin that blocks the friendlyfire through shots and knives but the damage with explosive grenades, flashes, molotovs must still give dmg to friendlyfire .. note: "ff_damage_reduction_other 0" blocks the damage from the molotov and knife, so if I disable it, I can't cause damage with the molotov, so i actually have to choose, or I enable and do damage with the knife and molotov, or I disable it and do not give damage on knife and molotov.. I just wanted my server to be like Most Pug servers, that actually implement a plugin that blocks friendlyfire on shots and knife attacks, but the rest continues doing damage on friendlyfire.
thekings4fun is offline
Kxnrl
AlliedModders Donor
Join Date: May 2015
Old 08-14-2020 , 20:11   Re: without knife damage / but with molotov damage
Reply With Quote #2

PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <sdkhooks>

public Plugin myinfo =
{
    
name        "CS:GO Retakes: no inferno/HE friendlyfire",
    
author      "Kyle",
    
description "",
    
version     "1.0",
    
url         "https://www.kxnrl.com"
};

ConVar mp_friendlyfire;

public 
void OnPluginStart()
{
    
mp_friendlyfire FindConVar("mp_friendlyfire");
    
mp_friendlyfire.SetInt(1truetrue);
    
mp_friendlyfire.AddChangeHook(OnChanged);

    for(
int client 1client <= MaxClientsclient++)
    if (
IsClientInGame(client))
    
OnClientPutInServer(client);
}

public 
void OnChanged(ConVar cvar, const char[] ov, const char[] nv)
{
    
mp_friendlyfire.SetInt(1truetrue);
}

public 
void OnClientPutInServer(int client)
{
    if (
IsFakeClient(client))
    {
        return;
    }

    
SDKHook(clientSDKHook_OnTakeDamageOnTakeDamage);
}

public 
Action OnTakeDamage(int victimint &attackerint &inflictorfloat &damageint &damagetypeint &weaponfloat damageForce[3], float damagePosition[3])
{
    if (
attacker || attacker MaxClients)
    {
        return 
Plugin_Continue;
    }

    if (
IsValidEdict(inflictor))
    {
        
char classname[32];
        
GetEdictClassname(inflictorclassname32);

        if (
strcmp(classname"inferno") == 0)
        {
            return 
Plugin_Continue;
        }
    }
    else if (
damagetype DMG_BLAST)
    {
        return 
Plugin_Continue;
    }

    return (
GetClientTeam(victim) == GetClientTeam(attacker)) ? Plugin_Handled Plugin_Continue;

__________________
Kxnrl is offline
thekings4fun
Member
Join Date: Apr 2020
Old 08-15-2020 , 16:29   Re: without knife damage / but with molotov damage
Reply With Quote #3

good afternoon, I tested aki on my servers and it didn't work. Is there any configuration I have to do?
do I need to leave the friendly fire on or off?
thekings4fun 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 17:10.


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