Jump to content

Vehicle.spawn() heading


matvejs16

Recommended Posts

13 часа назад, matvejs16 сказал:

Server side.
If i use vehicle.spawn(position, heading) and then get vehicle.heading - values not match
some months before there was no problem.

For example:
mp.events.addCommand('respawncar', (player, fullText, heading) => {
    if (player.vehicle) {
        player.vehicle.spawn(player.vehicle.position, Number(heading))
        console.log(player.vehicle.heading)
        setTimeout(() => {
            console.log(player.vehicle.heading)
        }, 1000);
    }
})

 

I used command /respawncar 10, after what i got 2 values in console:
First: 10
Second: -146.95310974121094
Link to comment
Share on other sites

23 часа назад, matvejs16 сказал:

Server side.
If i use vehicle.spawn(position, heading) and then get vehicle.heading - values not match
some months before there was no problem.

https://imgur.com/SKiRpMv - here you can see I executed 7 times this command with different values [-50, 1, 2, 3, 4, 5, 6]

Цитата
player.vehicle.spawn(player.vehicle.position, Number(heading))
console.log(player.vehicle.heading)
setTimeout(() => {
     console.log(player.vehicle.heading)
}, 1000);
Link to comment
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.
×
×
  • Create New...