Skip to main content

v5.4.3

Fixed

  • Vehicles came out of the garage and the impound without their tuning. Mods, colours, wheels, extras, everything back to stock, while the saved data in the database was perfectly fine the whole time. The cause sits in how a park-out vehicle is created. It comes from CreateVehicleServerSetter, so for the first few hundred milliseconds the entity belongs to the server. The natives behind ESX.Game.SetVehicleProperties (SetVehicleMod, SetVehicleColours, SetVehicleExtra and the rest) only take effect on the client that owns the entity. On any other client they do nothing at all, without an error and without a line in the console. The properties were written in exactly that window, so they went nowhere and the car spawned stock. Whether it worked came down to how fast the ownership migrated, which depends on ping, on the distance to the spawn point and on who else is standing around, and that is why it hit some players and not others. The script now takes control of the vehicle first and writes the properties afterwards. On top of that it reads the values back (primary and secondary colour, wheel type, turbo and every mod slot) and writes them again if something did not stick, for up to a second, because the game keeps normalising a freshly created vehicle for a few more frames and can wipe a write that did land.
  • Both the garage and the impound are fixed. They share the same park-out code path, the bug was never specific to one of them.
  • Side effects of the same fix. The mod kit is now set explicitly before the properties are written instead of relying on the es_extended build to do it, and both spellings of the armour field (modArmor and modArmour, they differ between es_extended builds) are recognised when the result is verified. Engine, body and tank health are re-asserted together with the rest of the properties now, in one place, instead of in a separate pass.
Nothing to repair

Only the applying side was broken, never the saving side. Your owned_vehicles rows still hold the full tuning of every stored vehicle, so cars that used to come out stock have everything back after this update. No database change and nothing to rebuild, replace the resource files and restart it.

Still seeing a stock vehicle?

The script gives itself two seconds to take control of the fresh vehicle. If another player is standing right on the park-out spot and holds on to the entity for longer than that, the properties are written best effort and may not land. Moving the park-out spots of that garage apart from each other is the practical fix (garages).

Changed files

fxmanifest.lua
client/vehicles.lua