CreateFire: Difference between revisions
Jump to navigation
Jump to search
(New page: __NOTOC__ {{Client function}} Creates a patch of fire that will spread a bit and die out after a while. ==Syntax== <syntaxhighlight lang="lua">bool createFire ( float x, float y, float z [, float size = ...) |
|||
Line 15: | Line 15: | ||
===Returns=== | ===Returns=== | ||
Returns ''true'' if successful, ''false'' otherwise. There can be a maximum of 60 active fires. | Returns ''true'' if successful, ''false'' otherwise. There can be a maximum of 60 active fires. | ||
== Example == | |||
<syntaxhighlight lang="lua"> | |||
function burn(player, commandName, height) | |||
if height then | |||
x, y, z = getPlayerPosition(player) | |||
createFire(x, y, z, height) | |||
outputChatBox("Burn motherfucker, buuuuurn >:]", player) | |||
end | |||
end | |||
addCommandHandler("fire", burn) | |||
</syntaxhighlight> | |||
==See Also== | ==See Also== | ||
{{Client fire functions}} | {{Client fire functions}} |
Revision as of 02:14, 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
function burn(player, commandName, height) if height then x, y, z = getPlayerPosition(player) createFire(x, y, z, height) outputChatBox("Burn motherfucker, buuuuurn >:]", player) end end addCommandHandler("fire", burn)
See Also