Thread: [Solved] my hook wont work
View Single Post
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 08-10-2018 , 10:43   Re: my hook wont work
Reply With Quote #2

Use return Plugin_Handled for the OnTakeDamage hook.

PHP Code:
if (victim && victim <= MaxClients && IsClientInGame(victim) && IsPlayerAlive(victim)) // you don't have to check for all these. I just personally like doing this.
{
     
damage 0.0;
     return 
Plugin_Handled// returning Plugin_Handled basically zeroes out all damage.
}

return 
Plugin_Continue// you can return Plugin_Changed as well. 
I'm unable to provide a better example at the moment.
__________________
Psyk0tik is offline