DE/isObjectBreakable: Difference between revisions
Jump to navigation
Jump to search
LarSoWiTsH (talk | contribs) (→Syntax) |
mNo edit summary |
||
| (7 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | |||
{{DE/Client function}} | |||
Diese Funktion überprüft, ob ein Objekt zerstörbar ist. | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool isObjectBreakable ( object theObject )</syntaxhighlight> | <syntaxhighlight lang="lua">bool isObjectBreakable ( object theObject )</syntaxhighlight> | ||
| Line 4: | Line 9: | ||
===Erforderliche Argumente=== | ===Erforderliche Argumente=== | ||
*'''theObject''' Das Objekt, welches du überprüfen willst. | *'''theObject''' Das Objekt, welches du überprüfen willst. | ||
=== | ===Rückgabe=== | ||
Gibt ''true'', wenn das Objekt zerbrechlich ist, andernfalls ''false''. | |||
==Beispiel== | ==Beispiel== | ||
| Line 13: | Line 19: | ||
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) | ||
Latest revision as of 19:55, 5 May 2012
Diese Funktion überprüft, ob ein Objekt zerstörbar ist.
Syntax
bool isObjectBreakable ( object theObject )
Erforderliche Argumente
- theObject Das Objekt, welches du überprüfen willst.
Rückgabe
Gibt true, wenn das Objekt zerbrechlich ist, andernfalls false.
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