View Single Post
iFusion
Junior Member
Join Date: Oct 2018
Old 03-20-2021 , 11:48   Re: AWP -X hp on every shot
Reply With Quote #2

not tested, but it should work.

you can set the damage on line 8
PHP Code:
#define DamagePlayer 10.0 
PHP Code:
#include <sourcemod>
#include <sdkhooks>
#include <cstrike>

#pragma semicolon 1
#pragma newdecls required

#define DamagePlayer 10.0

public void OnPluginStart()
{
    
HookEvent("weapon_fire"weapon_fire);
}

public 
Action weapon_fire(Handle event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(GetEventInt(event"userid"));
    
char weapon[32];
    
GetEventString(event"weapon"weaponsizeof(weapon));
    
    if(
StrEqual(weapon"weapon_awp"))
    {
        
SDKHooks_TakeDamage(clientclientclientDamagePlayer);
    }


Last edited by iFusion; 03-21-2021 at 11:34.
iFusion is offline