Revision Difference
GM:PlayerShouldTakeDamage#529082
<function name="PlayerShouldTakeDamage" parent="GM" type="hook">
	<ishook>yes</ishook>
	<description>Returns true if the player should take damage from the given attacker.</description>⤶
	<description>Returns true if the player should take damage from the given attacker.⤶
⤶
<warning>Applying damage from this hook to the player taking damage will lead to infinite loop/crash.</warning>⤶
</description>⤶
	<realm>Server</realm>
	<predicted>No</predicted>
	<args>
		<arg name="ply" type="Player">The player</arg>
		<arg name="attacker" type="Entity">The attacker</arg>
	</args>
	<rets>
		<ret name="" type="boolean">Allow damage</ret>
	</rets>
</function>
<example>
	<description>Block damages between two players on the same team.</description>
	<code>
hook.Add( "PlayerShouldTakeDamage", "AntiTeamkill", function( ply, attacker )
	return ply:Team() != attacker:Team() -- that will return false if attacker and ply is on the same team.
end )
	</code>
</example>
			Garry's Mod 
		
			Rust 
		
			Steamworks 
		
			Wiki Help