Squirrel/Server/Functions/Cheats/SetFlyingCars

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (Example)
Line 11: Line 11:
  
 
== Example ==
 
== Example ==
 +
 +
This example enables the flying cars cheat if someone types '/flycars'.
  
 
<code lang="squirrel">
 
<code lang="squirrel">
Line 21: Line 23:
 
=== Notes ===
 
=== Notes ===
  
This function is used to enable/disable flying cars.
+
The event [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] was used in in this example. More info about it in the corresponding page.
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Server/Functions/Cheats}}
 
{{Squirrel/Server/Functions/Cheats}}

Revision as of 17:47, 7 January 2010

This function enables or disables the flying cars cheat code (chittychittybb in GTA III / comeflywithme in GTA:VC).

Syntax

  1. bool SetFlyingCars( bool enabled )

Arguments

  • enabled - A boolean to either enable (true) or disable (false) this cheat code

Example

This example enables the flying cars cheat if someone types '/flycars'.

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

Notes

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

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox