Trigger Hurt Standard Value

Hello,

I run a flood server and ive been wondering is it possible to “standardise” values in which a player takes damage from the water.

Ive noticed that when a player dies it says “trigger hurt” then player name.

I found this code to make it so player takes 0 damage:

hook.Add(“PlayerShouldTakeDamage”, “No trigger_hurt”, function(ply, attacker)
if(attacker:GetClass() == “trigger_hurt”) then
return false;
end
end);

Would it be possible to make it so it returns a config value for example:

FLOOD.Configurations[ “WaterDamage” ] = 5 – amount of damage water does to a player per interval (specified by map)

Any Help would be much appreciated.

Kind Regards

Pkminer30


hook.Add("PlayerShouldTakeDamage", "No trigger_hurt", function(ply, attacker)
	if(attacker:GetClass() == "trigger_hurt") then
		return false
		ply:TakeDamage( FLOOD.Configurations[ "WaterDamage" ] )
	end
end)

Try this.

Though you’ll want to take damage before returning.

Hello,

Would this Override what the map sets as damage or apply it on top? (map specifys damage per interval)