KS-Permanent-Vehicle
Installation
- Unzip the delivered archive into your
resources/folder, under the nameks-permanent-vehicle. - Import the provided
install.sqlfile into your database. - Add
ensure ks-permanent-vehicleto yourserver.cfg, afteroxmysqlandqb-core. - Restart your server.
Configuration
Config.PermanentVehicles = {
{
model = "police3",
coords = vec4(441.9, -981.2, 30.7, 90.0),
respawnAfter = 300, -- secondes après destruction
locked = true,
accessJob = "police",
},
}
accessJob restricts unlocking to the given job — leave it as nil for a vehicle accessible to everyone.
Forcing an immediate respawn
Useful in an admin command to reset a vehicle to its original position without waiting for the configured delay:
exports['ks-permanent-vehicle']:ForceRespawn(vehicleIndex)
vehicleIndex matches the vehicle entry’s position in Config.PermanentVehicles, starting at 1.
Common issues
The vehicle doesn’t respawn after being destroyed. Check that respawnAfter is set (a nil value disables automatic respawn) and that no other script deletes the entity before the delay expires.
Two permanent vehicles appear in the same spot after a restart. This usually means the resource is ensured twice, or the script restarted without cleaning up its entities first — check that it’s only loaded once in server.cfg.

