Talk:RU/CreateFire

From Multi Theft Auto: Wiki
Revision as of 14:54, 8 September 2014 by OpenIDUser70 (talk | contribs) (Created page with "_NOTOC__ {{Client function}} Поджигает определенное места на карте. ==Syntax== <syntaxhighlight lang="lua">bool createFire ( float x, float y, float z [, flo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

_NOTOC__

Поджигает определенное места на карте.

Syntax

bool createFire ( float x, float y, float z [, float size = 1.8 ] )

Required Arguments

  • x, y, z: the coordinates when the initial patch of fire will be created.

Optional Arguments

  • size: a float value indicating the size of the initial patch of fire. It will also make the fire to stay alive more or less time.

Returns

Returns true if successful, false if bad arguments were passed or the limit of active fires was reached. There can be a maximum of 60 active fires.

Example

This example adds a /fire command, which creates a patch of fire in the position of the player that types it.

function burn(commandName, theSize)
   if tonumber(theSize) then
        local x, y, z = getElementPosition(getLocalPlayer())
        createFire(x, y, z, tonumber(theSize))
        outputChatBox("Burn, buuuuurn >:]")
   else
        outputChatBox("Syntax: /fire <size>")
   end
end
addCommandHandler("fire", burn)

See Also