Squirrel/Server/Functions/Cheats/GetHandlingCheat

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
m (Forgot title)
m (copypaste bs)
 
Line 25: Line 25:
 
=== Notes ===
 
=== Notes ===
  
The function [[Squirrel/Server/Functions/Messages/MessagePlayer|MessagePlayer]] and event [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] were used in in this example. More info about them in the corresponding pages.
+
The function [[Squirrel/Server/Functions/Messages/MessagePlayer|MessagePlayer]] and event [[Squirrel/Server/Events/Player/onPlayerCommand|onPlayerCommand]] were used in this example. More info about them in the corresponding pages.
  
 
== Related Functions ==
 
== Related Functions ==
  
 
{{Squirrel/Server/Functions/Cheats}}
 
{{Squirrel/Server/Functions/Cheats}}

Latest revision as of 19:58, 24 September 2010

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This function returns whether the improved handling cheat code (cornerslikemad in GTA III / gripiseverything in GTA:VC) has been activated for a certain player or the server. This function returns a simple true/false value.

[edit] Syntax

  1. bool GetHandlingCheat( [ Player plr ] )

[edit] Arguments

  • plr - With this optional argument you can check the cheat status for an individual player. Without it the function will return the global server status

[edit] Example

This example will return whether the handling cheat has been activated globally when someone types '/handling'.

  1.  
  2. function onPlayerCommand( player, command, text )
  3. {
  4. if ( command == "handling" ) MessagePlayer( "Perfect Handling is currently set to " + GetHandlingCheat(), player );
  5. return 1;
  6. }
  7.  

[edit] Notes

The function MessagePlayer and event onPlayerCommand were used in this example. More info about them in the corresponding pages.

[edit] Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox