setElementOnFire
Client
Sets an element on fire or puts it out on this client.
Also exists on the server, with its own implementation: setElementOnFire
bool setElementOnFire(element element, bool onFire)
Parameters
| Name | Type | Description |
|---|---|---|
| element | element | The ped, vehicle or object, or the local player. |
| onFire | bool | true to set it on fire, false to put it out. |
Returns
true if it applied, false if the element is not streamed in, cannot burn or came from the server.
Example
local ped = createPed("bfori", 2495, -1687, 13.5)
setTimer(function()
setElementOnFire(ped, true)
end, 1000, 1)NoteElements the server created cannot be changed here, except the local player.