Raised This Month: $32 Target: $400
 8% 

[HELP] I can't detect a player killed by falling


Post New Thread Reply   
 
Thread Tools Display Modes
CrAzY MaN
Senior Member
Join Date: Mar 2017
Location: India
Old 04-09-2018 , 01:20   Re: [HELP] I can't detect a player killed by falling
Reply With Quote #21

Quote:
Originally Posted by Bugsy View Post
Again, I don't think client_death() works for fall or possibly suicide death either. I don't understand why you won't just use DeathMsg since it's confirmed working.

DeathMsg have problem with Grenade Kill.
__________________
CrAzY MaN is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 04-09-2018 , 01:26   Re: [HELP] I can't detect a player killed by falling
Reply With Quote #22

Quote:
Originally Posted by CrAzY MaN View Post
DeathMsg have problem with Grenade Kill.
Did you try?
PHP Code:
public deatmsgyouchoosed( )
{
     new 
szWeapon10 ];
     
read_data4szWeaponcharsmaxszWeapon ) );

     if( 
equalszWeapon"grenade" ) )
     {
          
// iKiller killed iVictim with a hegrenade.
     
}

iceeedr is offline
Send a message via Skype™ to iceeedr
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-09-2018 , 07:01   Re: [HELP] I can't detect a player killed by falling
Reply With Quote #23

Quote:
Originally Posted by CrAzY MaN View Post
DeathMsg have problem with Grenade Kill.
Explain this problem
__________________
Bugsy is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-09-2018 , 08:31   Re: [HELP] I can't detect a player killed by falling
Reply With Quote #24

Try with this:
PHP Code:
// In plugin_init:
RegisterHam(Ham_Killed"player""@Player_Killed_Post"true);

// elsewhere:
@Player_Killed_Post(thisattacker)
{
    const 
m_bitsDamageType 76;
    
    if(
get_pdata_int(thism_bitsDamageType5) & DMG_FALL)
    {
        
client_print(0print_chat"Died by falling.");
    }
    
    return 
HAM_IGNORED;

__________________
klippy is offline
Reply



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 19:53.


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