Type Vehicle
Vehicle
Methods
| boostTimeLeft() | Gets the amount of time remaining in the vehicle's boost. |
| cameraDistance() | Returns the distance of the camera from the vehicle. |
| driver() | Returns the driver of the given vehicle. |
| getHLSpeed() | Returns the vehicle's current speed in Hammer units. |
| getMaxSpeed() | Returns the maximum speed of the vehicle in miles per hour. |
| getPassengerSeatPoint( num ) | Returns the position and angles of a passenger seat. |
| getRPM() | Returns the vehicle's RPM value. |
| getSpeed() | Returns the current speed of the vehicle in miles per hour. |
| getSteering() | Returns the current steering of the vehicle. |
| getSteeringDegrees() | Returns the current steering in degrees. |
| getThrottle() | Gets the current throttle value. |
| getVehicleViewPosition( num ) | Returns the view position of a given passenger. |
| getWheel() | Gets the physics object of the given wheel. |
| getWheelContactPoint( wheel ) | Returns the wheel contact point. |
| getWheelCount() | Returns the number of wheels the vehicle has. |
| hasBoost() | Gets whether the vehicle has boost functionality. |
| hasBrakePedal() | Gets whether the vehicle has a break pedal. |
| isEngineEnabled() | Gets whether the vehicle's engine can be started. |
| isEngineStarted() | Gets whether the vehicle's engine is started. |
| isVehicleBodyInWater() | Returns whether the vehicle is in water. |
| passenger( num ) | Returns the passenger of the given vehicle. |
| thirdPersonMode() | Returns whether the vehicle is in third person mode. |
Methods
- Vehicle:boostTimeLeft()
-
Gets the amount of time remaining in the vehicle's boost.
Environment:
ServerReturn value:
(number)Time left for boosting. - Vehicle:cameraDistance()
-
Returns the distance of the camera from the vehicle.
Environment:
SharedReturn value:
(number)Distance of the camera. - Vehicle:driver()
-
Returns the driver of the given vehicle.
Environment:
ServerReturn value:
(Player)Driver player or nil. - Vehicle:getHLSpeed()
-
Returns the vehicle's current speed in Hammer units.
Environment:
ServerReturn value:
(number)Speed value, the length of the velocity vector. - Vehicle:getMaxSpeed()
-
Returns the maximum speed of the vehicle in miles per hour.
Environment:
ServerReturn value:
(number)Maximum speed in miles per hour. - Vehicle:getPassengerSeatPoint( num )
-
Returns the position and angles of a passenger seat.
Environment:
ServerParameters:
-
num: The passenger to get, 1 is the driver.
Return values:
-
(Vector)Position -
(Angle)Seat angles.
-
- Vehicle:getRPM()
-
Returns the vehicle's RPM value. This may not be accurate due to the way vehicles operate internally.
Environment:
ServerReturn value:
(number)RPM. - Vehicle:getSpeed()
-
Returns the current speed of the vehicle in miles per hour.
Environment:
ServerReturn value:
(number)Current speed in miles per hour. - Vehicle:getSteering()
-
Returns the current steering of the vehicle.
Environment:
ServerReturn value:
(number)Steering value. - Vehicle:getSteeringDegrees()
-
Returns the current steering in degrees.
Environment:
ServerReturn value:
(number)Steering degrees. - Vehicle:getThrottle()
-
Gets the current throttle value.
Environment:
ServerReturn value:
(number)Current throttle value. - Vehicle:getVehicleViewPosition( num )
-
Returns the view position of a given passenger.
Environment:
ServerParameters:
-
num: The passenger to get, 1 is the driver.
Return values:
-
(Vector)View position -
(Angle)View angles -
(number)Field of view.
-
- Vehicle:getWheel()
-
Gets the physics object of the given wheel.
Environment:
ServerReturn value:
(PhysObj)The physics object for the given wheel, if it exists. - Vehicle:getWheelContactPoint( wheel )
-
Returns the wheel contact point.
Environment:
ServerParameters:
-
wheel: Number indicating which wheel to check.
Return values:
-
(Vector)Contact position -
(number)Surface properties -
(boolean)Indicates if it's on the ground.
-
- Vehicle:getWheelCount()
-
Returns the number of wheels the vehicle has.
Environment:
ServerReturn value:
(number)Number of wheels the vehicle has. - Vehicle:hasBoost()
-
Gets whether the vehicle has boost functionality.
Environment:
ServerReturn value:
(boolean)True if the vehicle can boost, false otherwise. - Vehicle:hasBrakePedal()
-
Gets whether the vehicle has a break pedal.
Environment:
ServerReturn value:
(boolean)True if the vehicle has a break pedal, false otherwise. - Vehicle:isEngineEnabled()
-
Gets whether the vehicle's engine can be started.
Environment:
ServerReturn value:
(boolean)Boolean true if the vehicle's engine can be started, false otherwise. - Vehicle:isEngineStarted()
-
Gets whether the vehicle's engine is started.
Environment:
ServerReturn value:
(boolean)True if the vehicle's engine is started, false otherwise. - Vehicle:isVehicleBodyInWater()
-
Returns whether the vehicle is in water.
Environment:
ServerReturn value:
(boolean)True if in water, false otherwise. - Vehicle:passenger( num )
-
Returns the passenger of the given vehicle.
Environment:
ServerParameters:
-
num: The passenger to get. Starts at 0.
Return value:
(Player)Passenger player or nil. -
- Vehicle:thirdPersonMode()
-
Returns whether the vehicle is in third person mode.
Environment:
SharedReturn value:
(boolean)True if in third person.