Forum

> > CS2D > Scripts > Hook Hit
Forums overviewCS2D overview Scripts overviewLog in to reply

English Hook Hit

2 replies
To the start Previous 1 Next To the start

old Hook Hit

kalis
User Off Offline

Quote
this code work
But dont have dame with RPG,grega.. launche,some heavy weapons
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
addhook("hit","hhit")
function hhit(id,source,wpn,hpdmg)

		local hp = player(id,"health")
		hehe = hp - itemtype(wpn,"dmg")

		if hp > hehe then
			parse ("sethealth "..id.." "..hehe)
		else
			parse("customkill "..player(source,"name").." killed "..player(id,"name"))
		end
		if hp > hehe then
			parse ("sethealth "..id.." "..hehe)
		else
			parse("customkill "..player(source,"name").." killed "..player(id,"name"))
		end
end
i sethealth of player :
1
2
3
local hp = player(id,"health")
	hehe = hp - itemtype(wpn,"dmg")
	parse ("sethealth "..id.." "..hehe)

Lua Dont have dame with RPG,heavy weapons...

old Re: Hook Hit

kalis
User Off Offline

Quote
i must add a hook "projectile" ?
ok thank
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview