Would it work if I return a modified damage value? or there is no way at all?
If not..
Can I inflict damage to a defined player with a defined value somehow? (not slap command)
Thanks
Scripts
Modify damage inflicted
Modify damage inflicted
1

Suprise has written
Suprise has writtenaddhook("hit","_hit")
function _hit(id,sources,weapon,hpdmg,apdmg,rawdmg)
	local alive_plyer_list=player(0,"tableliving")
	local new_health = hpdmg
	local new_kev = apdmg
	for _,id in pairs(alive_plyer_list) do
		if player(id,"team") == 1 then
			new_health = player(id,health) - 10
			--[[ here whatever the weapon, terrorist lose 10hp every hit ]]--
			parse("sethealth(id, new_health)")
		else
			new_health = player(id,health) - 20
			--[[ here whatever the weapon, terrorist lose 20hp every hit ]]--
			parse("sethealth(id, new_health)")
		end
	end
end
return 1 --no domage by the hit.
end
addhook("hit","_hit")
function _hit(victim,source,weapon,hpdmg,apdmg,raw)
	parse("sethealth "..victim.." "..player(id,"health") - (hpdmg + 10)) -- Adds 10 to the damage.
	return 1 -- Ignore the hit
end
_Yank: WATTAAA--[[ Here the function with all the IDs of player who are in Critical mode return table_id_criticals_ninja --]]
function _hit(id,sources,weapon,hpdmg,apdmg,rawdmg) local boolen_id = value_is_in_table(table_id_criticals_ninja, #table_id_criticals_ninja, sources) --[[function which check if sources id is in the list of the criticals player, return a boolean]]-- 	if boolen_id == true then 		--[[setheath method]]-- 		return 1 	else 		return 0 -- hit like normal 	end 	 end
if (player(id,"health")<=(rawdmg*2)) then
	parse("customkill "..source.." "..itemtype(weapon,"name").." "..id)
else
	parse ("sethealth "..id.." "..player(id,"health")-(rawdmg*2))
	return 1
end
admins={xxxxx} -- your usgn here
function admincheck(usgn)
for num, val in iparis(admins) do
if val==usgn then
return true
else
return false
end
end
end
weaponid = weaponid(ex: 30)
weapondamage = custom weapon damage(ex: 125)
addhook("hit","customdamage")
function customdamage(id,pl,weapon)
if admincheck(player(pl,"usgn"))~=false then
if weapon==weaponid then
if (player(id,"health")-weapondamage)>0 then
parse("sethealth "..id.." "..(player(id,"health")-weapondamage)) --sethealth SETS the health, doesn't subtract it.
else
parse("customkill "..pl.." \""..itemtype(weapon,"name").."\" "..id)
end
return 1
end
end
end
1
