IsObjectBreakable: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Fernando187 (talk | contribs) (Remove obsolete Requirements section) |
||
Line 27: | Line 27: | ||
end) | end) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Client_object_functions}} | {{Client_object_functions}} |
Latest revision as of 17:03, 7 November 2024
This function checks if an object / model ID is breakable.
Syntax
bool isObjectBreakable ( object theObject / int modelId )
OOP Syntax Help! I don't understand this!
- Method: object:isBreakable(...)
- Variable: .breakable
- Counterpart: setObjectBreakable
Required Arguments
- theObject / modelId: The object / model ID that's being checked.
Returns
- true if the object is breakable.
- false if the object is not breakable.
Example
This example creates an object when the resource starts and checks if the object is breakable.
addEventHandler("onClientResourceStart", resourceRoot, function() local object = createObject(1337, 5540.6654, 1020.55122, 1240.545) if isObjectBreakable(object) then outputChatBox("Yes, the object is breakable.") else outputChatBox("No, the object is not breakable") end end)
See Also
- createObject
- getObjectScale
- moveObject
- setObjectScale
- stopObject
- getObjectMass
- getObjectProperty
- setObjectMass
- setObjectProperty