From RAGE Multiplayer Wiki
Jump to navigation Jump to search
Js.png JavaScript

Creates a vehicle.
- Colors don't always work as expected if you use them inside the function. Also number plate won't work properly. Better set those after vehicle is created.
- Heading means Z Rotation.
- In 0.3.7 numberPlate property is bugged, so set the numberPlate after vehicle creation with vehicle.numberPlate = 'plate';
- In 1.1 this function create vehicle in dimension '0' by default (on 0.3.7 in your character's dimension)

Syntax, position,
    heading: heading,
    numberPlate: numberPlate,
    alpha: alpha,
    color: color,
    locked: locked,
    engine: engine,
    dimension: dimension


  • model: Hash (use mp.joaat) or String
  • position: Vector3
  • heading: Number [-180:180]
  • numberPlate: String
  • alpha: Number
  • color: [[Number, Number, Number], [Number, Number, Number]]
  • locked: Boolean
  • engine: Boolean
  • dimension: Number


An example of creating a red Turismo with the license plate ADMIN

Client-Side"turismor"), new mp.Vector3(-421.88, 1136.86, 326),
        numberPlate: "ADMIN",
        color: [[255, 0, 0],[255,0,0]]

Same example but creating a blue Turismo and using it server-side

Server-Side"turismor"), new mp.Vector3(-441.88, 1156.86, 326),
        numberPlate: "ADMIN",
        color: [[0, 255, 0],[0, 255, 0]]

See also