IsObjectBreakable: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (→Example) |
||
Line 11: | Line 11: | ||
Returns true if the object is breakable, else false if the object is not breakable. | Returns true if the object is breakable, else false if the object is not breakable. | ||
==Example== | ==Example== | ||
This example creates an object when the resource starts and checks if the object is breakable. | This example creates an object when the resource starts and checks if the object is breakable. | ||
<syntaxhighlight lang="lua">addEventHandler("onClientResourceStart",resourceRoot,function() | <syntaxhighlight lang="lua">addEventHandler("onClientResourceStart",resourceRoot,function() | ||
Line 23: | Line 22: | ||
end) | end) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Requirements== | ==Requirements== |
Revision as of 18:48, 26 May 2013
This function checks if an object is breakable.
Syntax
bool isObjectBreakable ( object theObject )
Required Arguments
- object The Object that's being checked.
Returns
Returns true if the object is breakable, else 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)
Requirements
This template will be deleted.
See Also
- createObject
- getObjectScale
- moveObject
- setObjectScale
- stopObject
- getObjectMass
- getObjectProperty
- setObjectMass
- setObjectProperty