Player::setIntoVehicle

From RAGE Multiplayer Wiki

This function puts ped into vehicle.

Seats:

  • -1 - driver seat
  • 0 - passenger seat 1
  • 1 - passenger seat 2
  • 2 - passenger seat 3

(note this is for normal vehicles with 4 seats)

Syntax

player.setIntoVehicle(vehicle, seatIndex);

Required Arguments

  • vehicle: Vehicle handle or object
  • seatIndex: int

Return value

  • Undefined

Example

Client-Side
let vehicle = mp.vehicles.new(mp.game.joaat('sultan'), mp.players.local.position, {
    numberPlate: 'yess'
});
mp.players.local.setIntoVehicle(vehicle.handle, -1);

See also