Squirrel/Server/Functions/Effects/ExtinguishFire
From Liberty Unleashed Wiki
(Difference between revisions)
(→Example) |
|||
Line 21: | Line 21: | ||
{ | { | ||
local pos = player.Pos; | local pos = player.Pos; | ||
− | ExtinguishFire( Vector( pos.x + | + | ExtinguishFire( Vector( pos.x + 5, pos.y, pos.z, 5.00 ) |
} | } | ||
} | } | ||
</code> | </code> | ||
+ | |||
+ | This will extinguish all fires that are 5 x co-ordinates away from the player, with a 5.00 radius. | ||
=== Notes === | === Notes === |
Revision as of 01:22, 8 March 2010
This function extinguishes fire at the given coordinates.
Syntax
bool ExtinguishFire( Vector vPos, float fRadius )
bool ExtinguishFire( float x, float y, float z, float fRadius )
Arguments
- vPos - The position where the fire should be extinguished
- x, y, z - The coordinates of the position to be extinguished as separate float values
- fRadius - The radius which should be extinguished
Example
function onPlayerCommand( player, cmd, text ) { if ( cmd == "extinguish2" ) { local pos = player.Pos; ExtinguishFire( Vector( pos.x + 5, pos.y, pos.z, 5.00 ) } }
This will extinguish all fires that are 5 x co-ordinates away from the player, with a 5.00 radius.
Notes
The call onPlayerCommand was used in in this example. More info about this in the corresponding page.
Related Functions
- CreateExplosion
- CreateFire
- ExtinguishFire
- ExtinguishAllFires