DE/isObjectBreakable: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
LarSoWiTsH (talk | contribs)  | 
				LarSoWiTsH (talk | contribs)  No edit summary  | 
				||
| Line 1: | Line 1: | ||
==Syntax==   | |||
<syntaxhighlight lang="lua">bool isObjectBreakable ( object theObject )</syntaxhighlight>   | |||
===Erforderliche Argumente===   | |||
*'''theObject''' Das Objekt, welches du überprüfen willst.  | |||
===Wiedergabe===  | |||
Wiedergibt ein (''true''), wenn das Objekt zerbrechlich ist , andernfalls (''false''), wenn das Objekt nicht zerbrechlich ist.  | |||
==Beispiel==   | |||
<section name="Client" class="client" show="true">  | |||
Dieses Beispiel erstellt ein Objekt, wenn die Resource startet und überprüft, ob es zerbrechlich ist. (GETESTET!)  | |||
<syntaxhighlight lang="lua">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)  | |||
</syntaxhighlight>  | |||
</section>  | |||
==Siehe auch==  | |||
{{Object functions}}  | |||
Revision as of 19:15, 5 May 2012
Syntax
bool isObjectBreakable ( object theObject )
Erforderliche Argumente
- theObject Das Objekt, welches du überprüfen willst.
 
Wiedergabe
Wiedergibt ein (true), wenn das Objekt zerbrechlich ist , andernfalls (false), wenn das Objekt nicht zerbrechlich ist.
Beispiel
Click to collapse [-]
ClientDieses Beispiel erstellt ein Objekt, wenn die Resource startet und überprüft, ob es zerbrechlich ist. (GETESTET!)
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)
Siehe auch