View Single Post
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 10-24-2021 , 14:35   Re: [CS:GO] Increase Molotov Damage - Is it Possible?
Reply With Quote #5

Quote:
Originally Posted by Franc1sco View Post
Try this

PHP Code:
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>

#define DMG_MULTIPLE 2.0 // inferno damage * this

public void OnPluginStart()
{
    for(
int i 1MaxClientsi++)
    {
        if(
IsClientInGame(i))
        {
            
OnClientPutInServer(i); // late load
        
}
    }
}
public 
OnClientPutInServer(int client)
{
    
SDKHook(clientSDKHook_OnTakeDamageOnTakeDamage);
}
public 
Action OnTakeDamage(int victimint &attackerint &inflictorfloat &damageint &damagetypeint &weaponfloat damageForce[3], float damagePosition[3])
{
    
char classname[64];
    if(!
IsValidEntity(inflictor) || !GetEdictClassname(inflictorclassnamesizeof(classname)))
        return 
Plugin_Continue;

    if (
StrEqual(classname"inferno"false))
    {
        
damage = (damage DMG_MULTIPLE);
        return 
Plugin_Changed// change damage
    
}
    return 
Plugin_Continue;

Compile here.
Any chance to add a convar for the damage?
Ark_Procession is offline