Raised This Month: $ Target: $400
 0% 

ham_killed + attacker + victim.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gamer99
Senior Member
Join Date: Jul 2011
Old 11-19-2011 , 16:15   ham_killed + attacker + victim.
Reply With Quote #1

Hi,

I am trying when a player is killed it will run a function on that victim and another on the killer.

How can I do it through ham_killed?
__________________
Thanks and regards,
Gamer99

Last edited by gamer99; 11-19-2011 at 16:16.
gamer99 is offline
Dark Style
BANNED
Join Date: Feb 2011
Location: Brazil
Old 11-19-2011 , 16:36   Re: ham_killed + attacker + victim.
Reply With Quote #2

Code:
#include <hamsandwich>

public plugin_init()
{
	RegisterHam(Ham_Killed, "player", "ham_killed", 1);
}

public ham_killed(idvictim, idattacker, shouldgib)
{
}
Dark Style is offline
gamer99
Senior Member
Join Date: Jul 2011
Old 11-19-2011 , 16:44   Re: ham_killed + attacker + victim.
Reply With Quote #3

thank you ..., I will check
__________________
Thanks and regards,
Gamer99
gamer99 is offline
gamer99
Senior Member
Join Date: Jul 2011
Old 11-19-2011 , 16:52   Re: ham_killed + attacker + victim.
Reply With Quote #4

Thanks a lot. Can I also check whether the victim is dead by headshot or not in that?

Like in event death we read_data(3) ?
__________________
Thanks and regards,
Gamer99
gamer99 is offline
Dark Style
BANNED
Join Date: Feb 2011
Location: Brazil
Old 11-19-2011 , 16:54   Re: ham_killed + attacker + victim.
Reply With Quote #5

Tell me, why don't u use normal register_event ?
Dark Style is offline
gamer99
Senior Member
Join Date: Jul 2011
Old 11-19-2011 , 16:55   Re: ham_killed + attacker + victim.
Reply With Quote #6

I know use of normal register_event. Just trying to explore ham module .
__________________
Thanks and regards,
Gamer99
gamer99 is offline
Dark Style
BANNED
Join Date: Feb 2011
Location: Brazil
Old 11-19-2011 , 16:56   Re: ham_killed + attacker + victim.
Reply With Quote #7

Even I know, it's impossible know if is a headshot just in Ham_Killed!
Dark Style is offline
gamer99
Senior Member
Join Date: Jul 2011
Old 11-19-2011 , 16:57   Re: ham_killed + attacker + victim.
Reply With Quote #8

oohhk . Thank you for your help. I am just learning. Sorry for bothering.
__________________
Thanks and regards,
Gamer99
gamer99 is offline
Dark Style
BANNED
Join Date: Feb 2011
Location: Brazil
Old 11-19-2011 , 16:58   Re: ham_killed + attacker + victim.
Reply With Quote #9

Nothing, you can see Ham events in: ham_const.inc
Dark Style is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 11-19-2011 , 20:59   Re: ham_killed + attacker + victim.
Reply With Quote #10

Quote:
Originally Posted by Dark Style View Post
Even I know, it's impossible know if is a headshot just in Ham_Killed!
Wrong.

http://forums.alliedmods.net/showpos...20&postcount=8
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
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 14:00.


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