Author Topic: Weird situation spawning a personal vehicle  (Read 2316 times)

0 Members and 1 Guest are viewing this topic.

Offline Treba

  • Enforcer
  • *
  • Posts: 173
  • Country: ua
  • Respect: +32/-78
  • Buster
    • View Profile
Weird situation spawning a personal vehicle
« on: July 25, 2019, 10:18:31 pm »
I came ingame, ordered a personal car, headed to it and got questioned by my arrival. The text above my car stated that was "Sadler" available for a test drive. I entered it and got my car and character teleported to the dealership. The next moment I was messaged that my car had been returned to my garage.
It hasn't repeated anymore but I think that situation needs to be explored.




« Last Edit: July 25, 2019, 10:22:12 pm by ᛏreba »
Please stop +REP'ing me. I already know I'm most authoritative here

Offline Mike

  • Server Owner
  • *
  • Posts: 3668
  • Country: gb
  • Respect: +413/-69
  • Gender: Male
    • View Profile
  • MCNR name: Mike
  • Discord name: mp2
Re: Weird situation spawning a personal vehicle
« Reply #1 on: July 25, 2019, 10:21:51 pm »
This is a known issue with other vehicles, and is under investigation. Sorry about this.
View trailers here.


Offline Mike

  • Server Owner
  • *
  • Posts: 3668
  • Country: gb
  • Respect: +413/-69
  • Gender: Male
    • View Profile
  • MCNR name: Mike
  • Discord name: mp2
Re: Weird situation spawning a personal vehicle
« Reply #2 on: July 27, 2019, 12:36:50 am »
Something happens during the course of the server being online for a long time whereby the dealership test drive vehicles somehow get destroyed. What then happens is you request a personal vehicle and it takes the vehicle ID that the destroyed test drive vehicle had. The server will think it is a test drive vehicle.

One course of action would be to detect when a test drive vehicle is destroyed and no longer store that vehicle ID as being a test drive vehicle. But the issue would still remain that test drive vehicles should not be getting destroyed except for city change.

I need to find out which part of the script is destroying them.
View trailers here.


Offline Treba

  • Enforcer
  • *
  • Posts: 173
  • Country: ua
  • Respect: +32/-78
  • Buster
    • View Profile
Re: Weird situation spawning a personal vehicle
« Reply #3 on: July 27, 2019, 02:56:01 pm »
Something happens during the course of the server being online for a long time whereby the dealership test drive vehicles somehow get destroyed. What then happens is you request a personal vehicle and it takes the vehicle ID that the destroyed test drive vehicle had. The server will think it is a test drive vehicle.

One course of action would be to detect when a test drive vehicle is destroyed and no longer store that vehicle ID as being a test drive vehicle. But the issue would still remain that test drive vehicles should not be getting destroyed except for city change.

I need to find out which part of the script is destroying them.

Probably in OnPlayerExitVehicle
Please stop +REP'ing me. I already know I'm most authoritative here

Offline Mike

  • Server Owner
  • *
  • Posts: 3668
  • Country: gb
  • Respect: +413/-69
  • Gender: Male
    • View Profile
  • MCNR name: Mike
  • Discord name: mp2
Re: Weird situation spawning a personal vehicle
« Reply #4 on: September 24, 2019, 09:27:09 am »
I have been meaning to fix this for a while. I am 99% certain this is caused by the fact that all vehicles on the server are destroyed on city change, but some things 'carry over' from the previous city's vehicles. Two things were not 'reset' when a vehicle is destroyed, which could affect how the vehicle is treated on the next city. This has been fixed which may resolve this issue. I have debug logs which tell me when a dealership vehicle was wrongly destroyed and why, and most of them are from a 'static vehicle respawning' but they are not static vehicles. I think the vehicle IDs were static vehicle IDs in the last city.

I will keep an eye on the logs as the static vehicle respawn is not the only reason it reports.

Another issue was that when the dealership test drive ended/failed, it would destroy your current vehicle and your 'last' vehicle (which would be your current vehicle if things go right). It now explicitly remembers the vehicle which is soley created for the test drive and will only destroy that.
View trailers here.