OnClientObjectBreak
Jump to navigation
Jump to search
This event is fired before an object breaks.
Note: This event is only triggered for objects that are streamed in |
Parameters
element attacker
- attacker: the vehicle/ped/player who is breaking the object
Source
The source of this event is the object which will break.
Cancel effect
If this event is canceled, the object will not break.
Example
Click to collapse [-]
ClientThis example prevents objects from beeing broken in interiors.
addEventHandler("onClientObjectBreak", root, function() if getElementInterior(source) ~= 0 then cancelEvent() end end )
Requirements
Minimum server version | n/a |
---|---|
Minimum client version | 1.3-9.05086 |
Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.3-9.05086" />
See Also
Client object events
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled