View Single Post
Whai
Senior Member
Join Date: Jul 2018
Old 11-03-2018 , 12:50   Re: [TF2] OnTakeDamage : Is it possible to hook an entity ?
Reply With Quote #3

Quote:
Originally Posted by 8guawong View Post
b/c you are hooking client so the client will never be tank_boss

try
PHP Code:
    new ent = -1;    
    while ((
ent FindEntityByClassname(ent"tank_boss")) != -1)
    {
        
SDKHook(entSDKHook_OnTakeDamageOnPropTakeDamage);
    } 

Thanks ! it worked, but is there another method to hook this thing without using OnEntityCreated ?

Here is what I did :


And here is what happens with this code (look the dmg I've done)



I noticed something about that :


with this code, for some reason it print 10 times the "Square attacked the tank" so maybe it has something with the damage I did

Oh and if you do that :

You lose you ears
__________________

Last edited by Whai; 11-03-2018 at 16:26.
Whai is offline