Vehicle.ID

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events

This Vehicle class member returns the ID of the vehicle.

Syntax

  1. int Vehicle.ID

Arguments

  • none

Example

This command will return what vehicle id the player is driving.

  1.  
  2. function onPlayerCommand( player, cmd, text )
  3. {
  4. if ( cmd == "vehid" )
  5. {
  6. if ( player.Vehicle ) MessagePlayer( "Your vehicle's ID is: " + player.Vehicle.ID, player );
  7. }
  8. return 1;
  9. }
  10.  

Notes

The functions Player.Vehicle, MessagePlayer and event onPlayerCommand were used in this example. More info about them in the corresponding pages.

Related Functions

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox