Garry's Mod Wiki

Garry's Mod Wiki

Description

Called when a func_break is broken by a player.

Members

number entindex
The EntIndex of the broken prop.
number userid
The UserID of the connected player.
number material
Material index of the broken entity.

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_breakable" ) hook.Add( "break_breakable", "break_breakable_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. local material = data.material // The Material index of the broken entity. // Called when a func_break is broken by a player. end )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...