IsElementInAir
Jump to navigation
Jump to search
Syntax
bool isElementInAir ( element theElement )
Returns
Returns true if the element is in air, false otherwise.
Code
function isElementInAir(element) local x, y, z = getElementPosition(element) if element and isElement(element) then if z >= 10 then return z end end end
Example
Click to collapse [-]
ClientThis script tells if the player is in air or not.
function checkAir() if isElementInAir(localPlayer) then outputChatBox("Indeed it is") else outputChatBox("Nope") end end addCommandHandler("air", checkAir)