isElementOnFire | Multi Theft Auto: Wiki Skip to content

isElementOnFire

Client-side
Server-side
Shared

Pair: setElementOnFire

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function checks if the specified element is on fire or not.

OOP Syntax Help! I don't understand this!

  • Method:element:isOnFire(...)
  • Variable: .onFire

Syntax

bool isElementOnFire ( element theElement )
Required Arguments
  • theElement: The element to check.

Returns

  • bool: value

Returns true if the element is on fire, false otherwise.

Code Examples

shared
function checkPlayerFire(thePlayer)
if isElementOnFire(thePlayer) then
outputChatBox("So hot!", thePlayer, 255, 50, 0)
else
outputChatBox("You're cool. No flames detected.", thePlayer, 0, 255, 0)
end
end
addCommandHandler("checkfire", checkPlayerFire)

See Also

Element Functions