Vehicle.Model

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 Model of the given vehicle.

Syntax

  1. Integer Vehicle.Model

Example

This returns the model ID of vehicle ID 0.

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "model" )
  5. {
  6. local pVehicle = FindVehicle( 0 );
  7. if ( pVehicle ) MessagePlayer( "Vehicle ID 0's model ID is " + pVehicle.Model, pPlayer );
  8. }
  9. return 1;
  10. }
  11.  

Notes

The functions MessagePlayer and FindVehicle 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