SetFlyingCars

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function enables or disables the flying cars cheat code (chittychittybb in GTA III / comeflywithme in GTA:VC) for an individual player or the server globally.

Syntax

SetFlyingCars can take 2 different lists of parameters:

  1. bool SetFlyingCars( bool enabled )
  1. bool SetFlyingCars( Player plr, bool enabled )

Arguments

  • enabled - A boolean to either enable (true) or disable (false) this cheat code
  • plr - The player to enable/disable this cheat code for. Without this argument the function will change the global status

Example

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

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

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