SetVehicleWheelStates: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
Line 2: Line 2:
This function sets the state of wheels on the vehicle.
This function sets the state of wheels on the vehicle.


No vehicles have more than 4 wheels, if they appear to they will be duplicating other wheels.
Internally, no vehicles have more than 4 wheels. If they appear to, they will be duplicating other wheels.


==Syntax==
==Syntax==
Line 17: Line 17:


==Wheel-State values==
==Wheel-State values==
** '''0:''' Inflated
* '''0:''' Inflated
** '''1:''' Flat
* '''1:''' Flat
** '''2:''' Fallen off
* '''2:''' Fallen off


==Example==
==Example==

Revision as of 00:16, 6 October 2006

This function sets the state of wheels on the vehicle.

Internally, no vehicles have more than 4 wheels. If they appear to, they will be duplicating other wheels.

Syntax

setVehicleWheelStates ( vehicle theVehicle, int frontLeft, [ int frontRight = -1, int rearLeft = -1, int rearRight = -1 ])

Required Arguments

  • theVehicle: A handle to the vehicle that you wish to change the wheel states of.
  • frontLeft: A whole number representing the wheel state (-1 for no change )

Optional Arguments

  • frontRight: A whole number representing the wheel state (-1 for no change )
  • rearLeft: A whole number representing the wheel state (-1 for no change )
  • rearRight: A whole number representing the wheel state (-1 for no change )

Wheel-State values

  • 0: Inflated
  • 1: Flat
  • 2: Fallen off

Example

This example creates a new vehicle then punctures its front left wheel.

newcar = createVehicle ( 520, 1024, 1024, 1024 )
state = setVehicleWheelStates ( newcar, 1 ) -- Punctures the front-left wheel on the vehicle

See Also