Forum

> > CS2D > General > Die hook bug
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Die hook bug

8 replies
To the start Previous 1 Next To the start

old Die hook bug

RoDioN1322
BANNED Off Offline

Quote
Die hook does not work properly.
When die it always show id 0

1
2
3
4
addhook("die","die_hook")
function die_hook(victim,killer,weapon,x,y)
	msg(victim)
end

EDIT:
victim and killer changed swapped

old Re: Die hook bug

Talented Doge
User Off Offline

Quote
Quote
killer is the player ID of the player who performed the kill (can also be 0 if the death was not caused by another player).


Edit: Ah, I see, there is a wrong description on die hook page. JAF's method works.

old Re: Die hook bug

DC
Admin Off Offline

Quote
It's possible that I mixed them up because I touched ALL hooks for the latest update. Sorry. I'll check it and possibly fix it.
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview