View Single Post
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 01-15-2021 , 04:07   Re: [CS:GO] Increase Molotov Damage - Is it Possible?
Reply With Quote #3

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.
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 01-15-2021 at 04:08.
Franc1sco is offline
Send a message via MSN to Franc1sco