Squirrel/Server/Functions/Cheats/SetFlyingCars

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (fixin' typos)
 
Line 12: Line 12:
  
 
* '''enabled''' - A boolean to either enable (true) or disable (false) this cheat code
 
* '''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 lobal status
+
* '''plr''' - The player to enable/disable this cheat code for. Without this argument the function will change the global status
  
 
== Example ==
 
== Example ==

Latest revision as of 18:46, 24 September 2010

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.

[edit] Syntax

SetFlyingCars can take 2 different lists of parameters:

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

[edit] 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

[edit] 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.  

[edit] Notes

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

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox