ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. isPedOnFire

Function

isPedOnFire

Server and clientPedsIdentical to MTA:SA

Checks whether a ped is on fire. On the server it returns true when a script set it with setPedOnFire or when the player's game reports they are really burning (e.g. they walked into fire or got hit by a flamethrower). On the client it reads the state straight from the game.

Syntax

bool isPedOnFire(ped ped)

Arguments

pedped
A player or an NPC.

Returns

true when burning.

Example

setTimer(function()
    for _, p in ipairs(getElementsByType("player")) do
        if isPedOnFire(p) then outputChatBox("Płoniesz! Wskocz do wody.", p) end
    end
end, 1000, 0)

See also