Squirrel/Server/Functions/Game/SetFriendlyFire

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(New page: __NOTOC__ This function sets the friendly fire setting on or off. == Syntax == <code>bool SetFriendlyFire( bool bEnabled )</code> == Arguments == * '''bEnabled''' - Should friendly fir...)
 
(Example)
Line 12: Line 12:
 
== Example ==
 
== Example ==
  
{{Squirrel/NeedsExample}}
 
 
<code lang="squirrel">
 
<code lang="squirrel">
-- todo
+
function onPlayerCommand( player, command, text )
 +
{
 +
if ( command == "setff" ) SetFriendlyFire( true );
 +
}
 
</code>
 
</code>
  
 
=== Notes ===
 
=== Notes ===
  
-- Example notes here
+
This command will enable Friendly Fire in the server.
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Server/Functions/Game}}
 
{{Squirrel/Server/Functions/Game}}

Revision as of 02:48, 7 January 2010

This function sets the friendly fire setting on or off.

Syntax

  1. bool SetFriendlyFire( bool bEnabled )

Arguments

  • bEnabled - Should friendly fire be enabled or not

Example

  1.  
  2. function onPlayerCommand( player, command, text )
  3. {
  4. if ( command == "setff" ) SetFriendlyFire( true );
  5. }
  6.  

Notes

This command will enable Friendly Fire in the server.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox