AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ham_killed + attacker + victim. (https://forums.alliedmods.net/showthread.php?t=172379)

gamer99 11-19-2011 16:15

ham_killed + attacker + victim.
 
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?

Dark Style 11-19-2011 16:36

Re: ham_killed + attacker + victim.
 
Code:

#include <hamsandwich>

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

public ham_killed(idvictim, idattacker, shouldgib)
{
}


gamer99 11-19-2011 16:44

Re: ham_killed + attacker + victim.
 
thank you ..., I will check :D

gamer99 11-19-2011 16:52

Re: ham_killed + attacker + victim.
 
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) ?

Dark Style 11-19-2011 16:54

Re: ham_killed + attacker + victim.
 
Tell me, why don't u use normal register_event ?

gamer99 11-19-2011 16:55

Re: ham_killed + attacker + victim.
 
I know use of normal register_event. Just trying to explore ham module :oops:.

Dark Style 11-19-2011 16:56

Re: ham_killed + attacker + victim.
 
Even I know, it's impossible know if is a headshot just in Ham_Killed!

gamer99 11-19-2011 16:57

Re: ham_killed + attacker + victim.
 
oohhk . Thank you for your help. I am just learning. Sorry for bothering.

Dark Style 11-19-2011 16:58

Re: ham_killed + attacker + victim.
 
Nothing, you can see Ham events in: ham_const.inc

drekes 11-19-2011 20:59

Re: ham_killed + attacker + victim.
 
Quote:

Originally Posted by Dark Style (Post 1599341)
Even I know, it's impossible know if is a headshot just in Ham_Killed!

Wrong.

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


All times are GMT -4. The time now is 08:29.

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