Difference between revisions of "CreateFire"

From Multi Theft Auto: Wiki
Jump to: navigation, search
(Example)
(Example)
Line 19: Line 19:
  
 
<section name="Client" class="client" show="true">
 
<section name="Client" class="client" show="true">
Command for creating Clientside Fire.
+
Command for creating Clientside Fire on the Players Position.
  
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">

Revision as of 02:17, 2 May 2010

Creates a patch of fire that will spread a bit and die out after a while.

Syntax

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

Required Arguments

  • x, y, z: coordinates of the fire.

Optional Arguments

  • size: the size of the initial fire.

Returns

Returns true if successful, false otherwise. There can be a maximum of 60 active fires.

Example

<section name="Client" class="client" show="true"> Command for creating Clientside Fire on the Players Position.

function burn(player, commandName, height)
   if height then
        x, y, z = getPlayerPosition(player)
        createFire(x, y, z, height)
        outputChatBox("Burn motherfucker, buuuuurn >:]", player)
   else
        outputChatBox("Syntax: /fire <height>", player)
   end
end
addCommandHandler("fire", burn)

See Also

  • createFire