View Single Post
kratoss1812
Senior Member
Join Date: May 2018
Location: Romānia
Old 07-07-2019 , 07:08   Re: [CS:GO] Damage being done to weapon_shield
Reply With Quote #4

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


public void OnClientPutInServer(int Client)
{
    
SDKHookEx(ClientSDKHook_OnTakeDamageOnTakeDamage);
}

public 
Action OnTakeDamage(int victimint &attackerint &inflictorfloat &damageint &damagetype)
{
    
/*
    *
    * Check if the victim has shield equiped
    *
    */
    
    
int weapon GetEntPropEnt(victimProp_Data"m_hActiveWeapon");
    
char classname[64];
    
GetEdictClassname(weaponclassnamesizeof(classname));
    
    if (
strcmp(classname"weapon_shield") == 0)
    {
        
PrintToChatAll("Damage with shield: %f"damage);
    }

    return 
Plugin_Continue;

Not the best option but you can test with it.
__________________
kratoss1812 is offline