View Single Post
Author Message
WhiteAngel4
Junior Member
Join Date: Jan 2014
Old 08-04-2022 , 06:34   [CSGO] Change dmg with cvar
Reply With Quote #1

Hi!

I would like to ask some help about this.
How could I equal the static damage value to cvar variable?

PHP Code:
public Action Event_OnTakeDamage(int victimint &attackerint &inflictorfloat &damageint &damagetype

    if (!
attacker || attacker MaxClients || !IsClientInGame(attacker)) 
    { 
        return 
Plugin_Continue
    } 
    
char sWeapon[32]; 
    
GetClientWeapon(attackersWeaponsizeof(sWeapon)); 
    if(
StrContains(sWeapon"fists"false) != -1
     {
        if (
g_iClientFistPhase[attacker] % == 0)     damage 40.0;
        else                                         
damage 40.0;
        
        return 
Plugin_Changed
    } 
    return 
Plugin_Continue

Thank you for advices!

Script from https://forums.alliedmods.net/showth...25#post2730825

Actually what I'd like to do is merge these plugins and add a cvar for change fistsdmg:
Change fists dmg
csgo_meleeweapons

Last edited by WhiteAngel4; 08-04-2022 at 10:37.
WhiteAngel4 is offline