Raised This Month: $ Target: $400
 0% 

Solved Get 'Owner' of other third entity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 06-28-2021 , 06:29   Re: Get 'Owner' of other third entity
Reply With Quote #5

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

=>

Quote:
Originally Posted by sursista View Post
it registers it when dying, but not when taking 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); 
__________________
My plugin:

Last edited by Celena Luna; 06-28-2021 at 06:34.
Celena Luna is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode