Player::taskEnterVehicle: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
 
Line 11: Line 11:
*'''seat:''' int
*'''seat:''' int
*'''speed:''' float ('''Speeds''': <code>1.0</code> Walking, <code>2.0</code> Running)
*'''speed:''' float ('''Speeds''': <code>1.0</code> Walking, <code>2.0</code> Running)
*'''mode:''' int ('''Modes''': <code>1</code> Moves to the vehicle, <code>3</code> Teleport to the vehicle, <code>16</code> Teleports directly intro vehicle)
*'''mode:''' int ('''Modes''': <code>1</code> Moves to the vehicle, <code>3</code> Teleport to the vehicle, <code>16</code> Teleports directly intro vehicle, <code>8</code> Jacks the vehicle, <code>262144</code> Enters the vehicle from the opposite door, <code>524288</code> Opens door without entering vehicle)
*'''p6:''' int (Always 0)
*'''p6:''' int (Always 0)



Latest revision as of 11:02, 19 May 2020

Syntax

player.taskEnterVehicle(vehicle, timeout, seat, speed, mode, p6);

Required Arguments

  • vehicle: Vehicle handle or object
  • timeout: int
  • seat: int
  • speed: float (Speeds: 1.0 Walking, 2.0 Running)
  • mode: int (Modes: 1 Moves to the vehicle, 3 Teleport to the vehicle, 16 Teleports directly intro vehicle, 8 Jacks the vehicle, 262144 Enters the vehicle from the opposite door, 524288 Opens door without entering vehicle)
  • p6: int (Always 0)

Return value

  • Undefined

Example

Client-Side
let Ped = mp.peds.new(mp.game.joaat('MP_F_Freemode_01'), new mp.Vector3( 100.0, -100.0, 25.0), 270.0, (streamPed) => {
    // Ped Streamed
    streamPed.setAlpha(0);
}, player.dimension);

let Veh = mp.vehicles.new(mp.game.joaat("turismor"), new mp.Vector3(-421.88, 1136.86, 326),
    {
        numberPlate: "ADMIN",
        color: [[255, 0, 0],[255,0,0]]
    });

Ped.taskEnterVehicle(Veh.handle, 10000, -1, 1, 1, 0);

See also