Quote:
Originally Posted by alcybery
Thank you very much, works perfectly.
|
Change tags to "Solved" and post the working code in the main post please, after mentioning it's the working one.
Edit: Let me do it, here's the working code:
Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <smlib>
public OnEntityCreated(entity, const String:Classname[])
{
if(StrEqual(Classname, "witch"))
{
SDKHook(entity, SDKHook_TraceAttack, Event_TraceAttack);
}
}
public Action:Event_TraceAttack(victim, &attacker, &inflictor, &Float:damage, &damagetype, &ammotype, hitbox, hitgroup)
{
if(hitgroup == 1)
{
damage += 300.0;
return Plugin_Changed;
}
return Plugin_Continue;
}
stock bool:IsWitch(iEntity)
{
if(iEntity > 0 && IsValidEntity(iEntity) && IsValidEdict(iEntity))
{
decl String:strClassName[64];
GetEdictClassname(iEntity, strClassName, sizeof(strClassName));
return StrEqual(strClassName, "witch");
}
return false;
}
__________________
I am available to make plugins for pay.
Discord: Eyal282#1334