Squirrel/Server/Functions/Cheats/SetFlyingCars
From Liberty Unleashed Wiki
(Difference between revisions)
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 | + | * '''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
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:
bool SetFlyingCars( bool enabled )
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'.
function onPlayerCommand( player, command, text ) { if ( command == "flycars" ) SetFlyingCars( true ); return 1; }
[edit] Notes
The event onPlayerCommand was used in in this example. More info about it in the corresponding page.
[edit] Related Functions
- GetFlyingCars
- GetHandlingCheat
- SetFlyingCars
- SetHandlingCheat