Vehicle.Gear

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

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 onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "gear" )
  5. {
  6. if ( pPlayer.Vehicle ) MessagePlayer( "Current vehicle gear: " + pPlayer.Vehicle.Gear, pPlayer );
  7. }
  8. return 1;
  9. }
  10.  

Notes

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

Notes

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

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox