Vehicle.Gear

From Liberty Unleashed Wiki
Revision as of 01:16, 17 August 2011 by VRocker (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This Vehicle class member returns the gear of the vehicle.

Syntax

  1. int Vehicle.Gear

Arguments

  • none

Example: Returning the value

  1.  
  2. function onClientCommand( szCommand, szText )
  3. {
  4. if ( szCommand == "gear" )
  5. {
  6. local pPlayer = FindLocalPlayer();
  7. if ( pPlayer.Vehicle ) Message( "Current vehicle gear: " + pPlayer.Vehicle.Gear);
  8. }
  9. return 1;
  10. }
  11.  

Notes

The functions Message and FindLocalPlayer and event onClientCommand were used in this example. More info about them in the corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox