Garry's Mod Wiki

break_prop

Description

Called when a prop_dynamic or prop_physics is broken by a player.

Members

number entindex
The EntIndex of the broken prop.
number userid
The UserID of the connected player. Seems to be 0 every time.

Examples

Example

This is a basic template with the purpose of including all arguments / table variables to make it easily known which values can be accessed.

gameevent.Listen( "break_prop" ) hook.Add( "break_prop", "break_prop_example", function( data ) local entindex = data.entindex // The Entity:EntIndex() of the broken Prop. local userid = data.userid // The UserID of the connected Player. Seems to be 0 every time. // Called when a prop_dynamic or prop_physics is broken by a player. end )