Squirrel/Server/Functions/Effects/ExtinguishFire

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(New page: __NOTOC__ This function extinguishes fire at the given coordinates. == Syntax == <code>bool ExtinguishFire( Vector vPos, float fRadius )</code> <code>bool ExtinguishFire( float x, float ...)
 
Line 15: Line 15:
 
== Example ==
 
== Example ==
  
{{Squirrel/NeedsExample}}
 
 
<code lang="squirrel">
 
<code lang="squirrel">
-- todo
+
function onPlayerCommand( player, cmd, text )
 +
{
 +
if ( cmd == "extinguish2" )
 +
{
 +
local pos = player.Pos;
 +
ExtinguishFire( Vector( pos.x + 2, pos.y, pos.z, 5.00 )
 +
}
 +
}
 
</code>
 
</code>
  
 
=== Notes ===
 
=== Notes ===
  
-- Example notes here
+
The call [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] was used in in this example. More info about this in the corresponding page.
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Server/Functions/Effects}}
 
{{Squirrel/Server/Functions/Effects}}

Revision as of 01:15, 8 March 2010

This function extinguishes fire at the given coordinates.

Syntax

  1. bool ExtinguishFire( Vector vPos, float fRadius )
  1. 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

  1.  
  2. function onPlayerCommand( player, cmd, text )
  3. {
  4. if ( cmd == "extinguish2" )
  5. {
  6. local pos = player.Pos;
  7. ExtinguishFire( Vector( pos.x + 2, pos.y, pos.z, 5.00 )
  8. }
  9. }
  10.  

Notes

The call onPlayerCommand was used in in this example. More info about this in the corresponding page.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox