1
2
3
4
5
6
2
3
4
5
6
addhook("hit","bonusdmg") function bonusdmg(id,victim) if bdmg[id]==1 then parse("sethealth '..victim..' '..player(victim,'health')-10'") end end
In console there isn't problems, so please try to do something guys
addhook("hit","bonusdmg") function bonusdmg(id,victim) if bdmg[id]==1 then parse("sethealth '..victim..' '..player(victim,'health')-10'") end end
addhook("hit","bonusdmg") function bonusdmg(victim,id) 	if bdmg[id]==1 then 		parse("sethealth "..victim.." "..(player(victim,"health")-10)) 	end end
addhook("hit","bonusdmg") function bonusdmg(victim,id,weapon) if bdmg[id]==1 and player(victim,"health")>10 then parse("sethealth "..victim.." "..player(victim,"health")-10) else parse("customkill "..id.." "..itemtype(weapon,"name").." "..victim) end end
addhook("hit","bonusdmg") function bonusdmg(id, source, weapon, hpdmg, apdmg, rawdmg) 	if bdmg[source] == 1 then 		local health = player(id, "health") 		if health > 10 then 			parse("sethealth " .. id .. " " .. health-10) 		else 			parse("sethealth " .. id .. " " .. hpdmg) 		end 	end end
addhook("hit","bonusdmg") function bonusdmg(victim,id,weapon) 	if bdmg[id]==1 then 		local hp = player(victim,"health") 		if hp>10 then 			parse("sethealth "..victim.." "..hp-10) 		else 			parse("customkill "..id.." \""..itemtype(weapon,"name").."\" "..victim) 		end 	end end
addhook("hit","bonus_dmg") function bonus_dmg(victim,id,weapon,hpdmg) 	if player(victim,"health")-hpdmg<=0 then 		return 0 	else 		if player(victim,"health")-hpdmg-10<=0 then	 			return 0 		else 			local health=player(victim,"health")-10 			parse("sethealth "..victim.." "..health) 		end 	end end
addhook("hit","bonus_dmg") function bonus_dmg(victim,id,weapon,hpdmg) 	if player(victim,"health")-hpdmg<=0 then 		return 0 	else 		if player(victim,"health")-hpdmg-10<=0 then	 			return 0 		else 			local health=player(victim,"health")-10 			parse("sethealth "..victim.." "..health) 		end 	end end
addhook("hit","bonusdmg") function bonusdmg(id, source, weapon, hpdmg, apdmg, rawdmg) 	msg(id .. " got hit by " .. source) 	if bdmg[source] == 1 then 		local health = player(id, "health") 		if health > 10 then 			parse("sethealth " .. id .. " " .. health-10) 			msg(id .. " health decreased by 10") 		else 			parse("sethealth " .. id .. " " .. hpdmg) 			msg(id .. " health set to " .. hpdmg) 		end 	end end
function array(m,v) 	local t = {} 	for i = 1, m do 		t[i]=v 	end 	return t end bdmg=array(32,true) addhook("hit","bonus_dmg") function bonus_dmg(victim,id,weapon,hpdmg) 	if bdmg[id] then 		if player(victim,"health")-hpdmg>0 and player(victim,"health")-hpdmg-10>0 then 			local health=player(victim,"health")-10-hpdmg 			parse("sethealth "..victim.." "..health) 			return 1 		else 			return 0 		end 	end end