33 online 20 members  + Join RP Base  +
FreeScriptQBoxQBCoreESXox_core

v-park-fivem

by laforetbrut  ·  version 1.2.12  ·  updated 22 days ago

No reviews yet

Downloads
0
Reviews
0
Size
658 KB
Code check
Clean
Licence
Apache-2.0
Released
Nov 2026

Vehicle persistence for FiveM (qb-core, qbx_core, ESX, ox_core): vehicles come back in the exact space they were left in, even in tight ones. Streamed on demand

v-park-fivem
v-park
Current release: 1.2.12. Author: vyrriox.

Vehicle persistence for FiveM, built for QBCore and running on qbx_core, ESX and ox_core too.

Leave a car somewhere and it is still there after the restart, in the same parking space -
not approximately, not in the middle of the road, not on top of an NPC's Asea. Nothing is
spawned until somebody is near it, bodywork damage is stored and synchronised so two players
see the same dents, and job and rental vehicles can be tied to their owner being online rather
than to a clock.

There is a migration from Advanced Parking that reads your existing table, tells you exactly
what it found, and changes nothing until you say so.

Contents
  • What it does
  • The tight-space problem
  • Compatibility
  • Installation
  • Commands
  • The admin panel
  • Semi-persistence
  • Cleanup by use
  • Deformation
  • Performance
  • Migrating from Advanced Parking
  • Garage integration
  • Discord webhooks
  • Known limits
  • Documentation
  • Version française

What it does
  • Vehicles stay where they were left. Across a resource restart, a server restart, and a
crash. Position, rotation, modifications, colours, damage, fuel, dirt, plate, extras,
livery and lock state.
  • A player's own car is kept from the moment they get in. No command, no waiting. If the
framework says it is theirs - or they simply hold the keys - it is kept, which matters
most in the case that used to lose it: taking the car out and disconnecting a minute later.
Persistence defaults to owned for exactly this reason: the cars players care about, not
every taxi anybody has ever sat in.
  • They come back in the SAME SPACE. A four-stage placement engine handles the tight cases:
underground car parks, single-car garages, alleyways, MLO interiors, multi-storey ramps. It
is the section of the config worth reading, and it has its own heading below.
  • Nothing is spawned until somebody is near it. A database with five thousand vehicles and
one player online has perhaps thirty entities in the world. Everything else is a row.
  • Bodywork deformation is stored and synchronised. The dents come back, and every player
sees the same ones - which the engine does not otherwise guarantee.
  • Job and rental vehicles can be semi-persistent. A police cruiser survives the 06:00
restart because the officer is still on shift, and disappears 45 minutes after they log off.
Server downtime does not count against that timer.
  • Idle vehicles go back to a garage rather than being deleted. A car nobody has driven in
a fortnight is returned to the garage it came out of. Configurable, previewable, and it
trickles rather than clearing the map in one pass.
  • An admin panel. Search, filter and sort every persisted vehicle; teleport to one, bring
one to you, repair, clean, refuel, unlock, rename, transfer, send to a garage, impound,
delete - and restore from the trash when somebody deletes the wrong one.
  • A migration from Advanced Parking that introspects your table rather than assuming a
schema, with a scan, a dry run, a backup and a rollback.
  • Discord webhooks for errors, staff actions and activity, on three separate channels,
deduplicated and rate-limited so one error in a timer cannot flood a channel.
  • No hard dependency. Framework, database driver, fuel resource, key resource, garage,
notification system and target are all detected at runtime and all optional. /vparkinfo
prints what was found.

The tight-space problem
This is the reason the resource exists, so it is worth stating precisely.

A vehicle restored at the coordinates it was saved at will, on a stock setup, end up somewhere
else. Four separate mechanisms move it, and each needs a different answer:

#, What moves it, The answer here

1, Collision is not loaded yet. The entity is created before the map streams in, so it falls, and by the time the ground arrives it is under it. The engine pops it out - into the road, usually., Create it frozen and with collision off, wait for HasCollisionLoadedAroundEntity, then hand physics back.
2, Something is already there. Ambient traffic spawns while the server is empty and the game parks an NPC car exactly where the player left theirs., Clear the disposable ones - empty, unowned, not ours, not a mission entity - then suppress traffic generation there for a few seconds. The vehicle is placed at its saved pose either way: it is never moved aside, because the only things that can be in the way are already cleared, coexisted with it, or will leave on their own.
3, The engine ground-snaps it. SetVehicleOnGroundProperly probes downwards, finds the level below in a car park, and drops the car through the floor., Never call it. Place with SetEntityCoordsNoOffset at the exact saved Z, and consult the ground only when the saved Z is provably wrong - more than 1.5 m below it.
4, It is in an interior. An entity at MLO coordinates without being told which room renders through the wall or falls to the world below., Store the interior and the room key, and force them on restore.

On top of those, two things that are not fixes so much as design decisions:

  • **freezeUntilTouched is on by default.** A restored vehicle stays frozen until a player
comes near it or interacts with it. A frozen entity cannot be walked out of a tight bay by
the physics solver over twenty minutes, cannot be nudged down a camber by passing traffic,
and is not simulated at all - which is most of the performance story. It wakes before a
player can reach it, so it is invisible in play.
  • When the exact spot really is blocked, the fallback is place - put it exactly where it
was anyway, frozen. For a tight space that is the right answer: with nothing pushing it,
the intersection is stable, and the first player to drive it out resolves it naturally. The
alternatives (defer, ground, skip) are all one config line away.

`

…