i need to lower the hp when attacking, he hud stays at 100, greetings
1
2
3
4
2
3
4
addhook("spawn" , "HP") function HP(id) parse('hudtxt 3 "©255255000HP: '..player(id,"health")..'" 100 10') end
addhook("spawn" , "HP") function HP(id) parse('hudtxt 3 "©255255000HP: '..player(id,"health")..'" 100 10') end
hp = {} addhook("spawn" , "HP") function HP(id) 	hp[id] = 100 	parse('hudtxt 3 "©255255000HP: '..hp[id]..'" 100 10') end addhook("hit","HarryPotter") function HarryPotter(id,s,w,h,a,r) 	if player(id,"team")~=player(s,"team") then--note that you need additional checks if the game contains vip 		hp[id] = hp[id] - h 		parse('hudtxt 3 "©255255000HP: '..hp[id]..'" 100 10') 	end end
addhook("spawn" , "HP") function HP(id) 	parse('hudtxt 3 "©255255000HP: '..player(id,"health")..'" 100 10') end addhook("hit","HarryPotter") function HarryPotter(id,s,w,h,a,r) 	parse('hudtxt 3 "©255255000HP: '..player(id,"health")..'" 100 10') end
addhook("hit","_hit") function _hit(id,source,w) parse('hudtxt2 '..source..' 1 "HP ('..player(id,"name")..'): '..player(id,"health")..'" 100 10 0') parse('hudtxtalphafade '..source..' 1 2000 0') end