Vehicle::setOnGroundProperly: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
No edit summary
Line 7: Line 7:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
mp.events.add('setVehiclePosition', (x, y, z, a, b, c) => {
    mp.players.local.vehicle.position = new mp.Vector3(x, y, z);
    mp.players.local.vehicle.rotation = new mp.Vector3(a, b, c);
    mp.players.local.vehicle.setOnGroundProperly();
});
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==

Revision as of 14:03, 14 January 2019

Sets a vehicle on the ground on all wheels. Returns whether or not the operation was successful.

sfink: This has an additional param(Vehicle vehicle, float p1) which is always set to 5.0f in the b944 scripts.

Syntax

vehicle.setOnGroundProperly();

Required Arguments

Return value

  • Boolean

Example

mp.events.add('setVehiclePosition', (x, y, z, a, b, c) => {
    mp.players.local.vehicle.position = new mp.Vector3(x, y, z);
    mp.players.local.vehicle.rotation = new mp.Vector3(a, b, c);
    mp.players.local.vehicle.setOnGroundProperly();
});

See also