Garry's Mod Wiki


  GM:PropBreak( Player attacker, Entity prop )


Called when a prop has been destroyed.


1 Player attacker
The person who broke the prop. This can be a NULL entity for cases where the prop was not broken by a player.
2 Entity prop
The entity that has been broken by the attacker.


This kills a player when a person breaks a prop (i.e. a wooden crate).

hook.Add( "PropBreak", "PropVengeance", function( client, prop ) if ( IsValid( client ) ) then client:Kill() end end )