Thread: [Solved] my hook wont work
View Single Post
Author Message
ayyyyyyylmao
Junior Member
Join Date: Apr 2018
Old 08-10-2018 , 09:44   my hook wont work
Reply With Quote #1

PHP Code:
public OnPluginStart()
{
    
HookEvent("player_hurt"hurtEvent);
}

public 
Action:hurtEvent(Handle:event,const String:name[],bool:dontBroadcast)
{
    
SetEventInt(event"dmg_health"0);
    
SetEventInt(event"dmg_armor"0);

But i still receive damage, whats wrong? I allso tried
PHP Code:
public Action:hurtEvent(Handle:event,const String:name[],bool:dontBroadcast)
{
return 
Plugin_Handled;

but no effect
im allso tried use sdkhooks
PHP Code:
public Action:OnTakeDamage(client, &attacker, &inflictor, &Float:damage, &damagetype)
{
damage 0.0;
return 
Plugin_Changed;

still no effect

Last edited by ayyyyyyylmao; 08-10-2018 at 15:22.
ayyyyyyylmao is offline