Squirrel/Client/Functions/Vehicles/Gear

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{Squirrel/Title|Vehicle.Gear}} This ''Vehicle'' class member returns the gear of the vehicle. == Syntax == <code>int Vehicle.Gear</code> == Arguments == * '''none''' == Exa…')
 
m (moved Squirrel/Server/Functions/Vehicles/Gear to Squirrel/Client/Functions/Vehicles/Gear: 99% sure gear isnt transmitted in the netcode so the server wouldnt know)

Revision as of 01:09, 17 August 2011

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