Vehicle.SetWheelStatus

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

This Vehicle class method will set the status of the given wheel.

Syntax

  1. bool Vehicle.SetWheelStatus( int wheel, int status )

Arguments

  • wheel - The wheel you wish to set the status of. A list of vehicle wheel constants can be found from here
  • status - The status code of the wheel:
    • WHEELSTATUS_OK - The wheel is fine
    • WHEELSTATUS_FLAT - Flat tire
    • WHEELSTATUS_FUCKED - Completely missing a wheel

Example

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "setwheel" )
  5. {
  6. if ( pPlayer.Vehicle ) pPlayer.Vehicle.SetWheelStatus( WHEEL_FRONTLEFT, WHEELSTATUS_FLAT );
  7. }
  8. return 1;
  9. }
  10.  

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