Raised This Month: $ Target: $400
 0% 

how to check if player died after being damaged by another player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zacky
Senior Member
Join Date: Mar 2008
Location: Sweden
Old 06-02-2009 , 14:11   how to check if player died after being damaged by another player
Reply With Quote #1

How to check if a player died after being damaged by another player?

And how to check if the attacker killed him with headshot?

Thanks
-zacky
zacky is offline
Send a message via Skype™ to zacky
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-02-2009 , 14:14   Re: how to check if player died after being damaged by another player
Reply With Quote #2

Check if attacker is a player. ( whatever using client_death() forward, Ham_Killed, or DeathMsg event )
__________________
Arkshine is offline
zacky
Senior Member
Join Date: Mar 2008
Location: Sweden
Old 06-02-2009 , 14:15   Re: how to check if player died after being damaged by another player
Reply With Quote #3

But i don't know how to use those stuff, so may you show a code of it and how to check if attacked made a headshot on him?

EDIT: I almost never use client_death and those deathmsgs stuff.
zacky is offline
Send a message via Skype™ to zacky
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-02-2009 , 14:29   Re: how to check if player died after being damaged by another player
Reply With Quote #4

Using deathmsg event :

Something like :

Code:
new gMaxClients; // [...] register_event( "DeathMsg", "Event_PlayerDeath", "a", "1>0", "3=1" ); // param 3 = headshot gMaxClients = get_maxplayers(); // [...] public Event_PlayerDeath () {     new Killer = read_data( 1 );         if ( 1 <= Killer <= gMaxClients )     {         //     } }
__________________
Arkshine is offline
zacky
Senior Member
Join Date: Mar 2008
Location: Sweden
Old 06-02-2009 , 14:39   Re: how to check if player died after being damaged by another player
Reply With Quote #5

Ok, is Killer attacker or victim?
zacky is offline
Send a message via Skype™ to zacky
LaineN
Veteran Member
Join Date: Mar 2008
Location: Sweden
Old 06-02-2009 , 14:42   Re: how to check if player died after being damaged by another player
Reply With Quote #6

Attacker
__________________
Bollnas Team - HideNSeek

See all of Bollnas Team's HideNSeek
servers at
http://bollnasteam.se/!

LaineN is offline
zacky
Senior Member
Join Date: Mar 2008
Location: Sweden
Old 06-03-2009 , 13:10   Re: how to check if player died after being damaged by another player
Reply With Quote #7

Ok thanks
zacky is offline
Send a message via Skype™ to zacky
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 13:52.


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