DE/isObjectBreakable: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
LarSoWiTsH (talk | contribs) No edit summary  | 
				LarSoWiTsH (talk | contribs)   | 
				||
| Line 14: | Line 14: | ||
	local object = createObject ( 1337, 5540.6654, 1020.55122, 1240.545 )  | 	local object = createObject ( 1337, 5540.6654, 1020.55122, 1240.545 )  | ||
	if isObjectBreakable(object) then  | 	if isObjectBreakable(object) then  | ||
		outputChatBox("  | 		outputChatBox("Ja, das Objekt ist zerbrechlich.")  | ||
	else  | 	else  | ||
		outputChatBox("  | 		outputChatBox("Nein, das Objekt ist nicht zerbrechlich.")  | ||
	end  | 	end  | ||
end)  | end)  | ||
</syntaxhighlight>  | </syntaxhighlight>  | ||
</section>  | </section>  | ||
==Siehe auch==  | ==Siehe auch==  | ||
{{Object functions}}  | {{Object functions}}  | ||
Revision as of 19:18, 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("Ja, das Objekt ist zerbrechlich.")
	else
		outputChatBox("Nein, das Objekt ist nicht zerbrechlich.")
	end
end)
Siehe auch