Forum
CS2D Scripts Need Knockback scriptNeed Knockback script
4 replies 1
This one is with tile-stuck problem though.
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook('hit','Knockback') function Knockback(p1,p2,Weapon) 	local Damage, pX, pY = itemtype(Weapon,'dmg') 	local Angle = math.rad(math.abs(player(p2,'rot') - 90)) 	pX = player(p1,'x') + math.cos(Angle) * Damage 	pY = player(p1,'y') + math.sin(Angle) * Damage 	parse('setpos '..p1..' '..pX..' '..pY) end
SQ: made the zm plague script.
1