PDA

View Full Version : Change ham function


IneedHelp
04-22-2008, 15:25
Hi ^^

It's possible to replace this:

RegisterHam(Ham_Killed, "player", "", 1)


And this..


RegisterHam(Ham_Spawn, "player", "", 1)


For an event?

bye~

ot_207
04-22-2008, 15:31
Here is the link for you jost for spawn ;):
http://forums.alliedmods.net/showthread.php?t=42159
And for the moment a player is killed:

public plugin_init() {
register_event("DeathMsg", "Death", "a")

}

public Death () {
new attacker = read_data(1)
new victim = read_data(2)
new headshot = read_data(3) //was a headshot?
new weapon = get_user_weapon(attacker);
}

soccdoodcss
04-22-2008, 23:58
I'm not sure what you are looking to doing, but yes as long as you provide a method that it will call on event, both of those would work.

The first is called when a player is killed, and the second is called when a player is spawned.

Sn!ff3r
04-23-2008, 07:43
First -> http://forums.alliedmods.net/showpost.php?p=555463&postcount=64