Forum

> > CS2D > Scripts > sethealth command not working on hit hook
Forums overviewCS2D overview Scripts overviewLog in to reply

English sethealth command not working on hit hook

3 replies
To the start Previous 1 Next To the start

old sethealth command not working on hit hook

THE DARKNESS
User Off Offline

Quote
Hi all!
when i want to sethealth in hit hook , its not working!

1
2
3
4
5
addhook("hit","onhit")

function onhit(id)
parse("sethealth "..id.." 80")
end

but , when i want to sethealth in other hooks , its works!
example:
1
2
3
4
5
6
7
addhook("say","onsay")

function onsay(id,message)
if message == "hp" then
parse("sethealth "..id.." 80")
end
end

Why??
how can i do it?

Excuse me for my bad english
thanks.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview