qMartis

How to freeze plane position

Recommended Posts

 

entity.freezePosition(toggle); 

I try this but maybe I'm wrong with code 

 

veh = mp.vehicles.new(mp.joaat('cargoplane'), new mp.Vector3(1702.69482421875,-2967.266845703125,747.1845092773438));
veh.dimension = gameDimension;
player.call('freezePlane', [veh]);
 
Client side: 
mp.events.add('freezePlane', (plane) => {
    plane.freezePosition(true);
});
  • Like 1

Share this post


Link to post
Share on other sites

The location you spawning the plane at, is it within the stream range of your local player?

Share this post


Link to post
Share on other sites
Posted (edited)
9 hours ago, Doom said:

The location you spawning the plane at, is it within the stream range of your local player?

player position is same like plane 

player.position= new mp.Vector3(gameStartedData.vehPositionX[gameDimension]+gameStartedData.sk, gameStartedData.vehPositionY[gameDimension]+gameStartedData.sk1, 747.1845092773438-2)

I tried another way, but plane position z bouncing. Maybe is possible turn off entity gravity ?

setInterval(function() {
veh.position.z = 747.1845092773438;
},1)
Edited by qMartis

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.