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

Function

setPedOnFire

Server and clientPedsIdentical to MTA:SA

Sets a ped on fire or puts it out. A player really starts burning in their game: the fire is visible and they lose health until the fire goes out by itself or until setPedOnFire(player, false). For NPCs the value is stored for scripts. isPedOnFire for a player shows whether their ped is really burning.

Syntax

bool setPedOnFire(ped ped, bool value)

Arguments

pedped
A player or an NPC.
valuebool
true = burning, false = not.

Returns

true on success.

Example

addCommandHandler("podpal", function(player)
    setPedOnFire(player, true)
end)

Notes

Fire goes out by itself. As in the game, fire on a ped goes out after a while, so isPedOnFire then returns to false. On the client you can set your own ped on fire with the same function.

See also