View Single Post
sursista
Senior Member
Join Date: Jul 2010
Location: Spain
Old 06-28-2021 , 07:12   Re: Get 'Owner' of other third entity
Reply With Quote #6

Quote:
Originally Posted by Celena Luna View Post
PHP Code:
if (userHealth damage <= 
{
    
dmgcount[attacker] += userHealth damage;
    
set_msg_block(gmsg_deathBLOCK_SET);
    
//ExecuteHamB(Ham_Killed, id, attacker, 2);
    
ExecuteHamB(Ham_TakeDamageid 2attackerfloat(damage), DMG_GENERIC); 
    
set_msg_block(gmsg_deathBLOCK_NOT);

isn't the condition of this part is "Do when victim gonna dead"?
Because of that, it only Execute Ham_TakeDamage when people is about to dead when taking that damage

=>



But it is OK to keep it like that though. I looked into the code of ZP Bazooka and found it is actually the part after that that you suppose to change:

(look at the highlight part and compare with your code)
Spoiler


The plugin "does damage" by setting player health though pev so it won't go through TakeDamage forward.

You should replace it with this:
PHP Code:
ExecuteHamB(Ham_TakeDamageid 2attackerfloat(damage), DMG_GENERIC); 
It seems silly but it makes sense, now I understand it, thank you very much for everything, now work!
sursista is offline
Send a message via MSN to sursista Send a message via Skype™ to sursista