Forum

> > CS2D > Scripts > Hit hook doesn't work
Forums overviewCS2D overview Scripts overviewLog in to reply

English Hit hook doesn't work

22 replies
Page
To the start Previous 1 2 Next To the start

old Re: Hit hook doesn't work

DC
Admin Off Offline

Quote
the hook should work fine but you always have to use return 1 if you want to change the health/armor yourself. otherwise the game will just change the health+armor normally, ignoring all your scripted health/armor changes!

this behavior is comparable to the behavior of the say hook and many other hooks.

old Re: Hit hook doesn't work

Flacko
User Off Offline

Quote
user Obviously Exactly Myself has written
The error is, when a player gets hit by another player, an npc, explosions and evn_hurt, the player doesn't get the "sethealth".


Hmmm? Because you deleted this line when you shouldn't have done so... maybe?

1
addhook("hit","zj_godmode")
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview