Open-source FiveM scripts, MLOs, vehicles & server packs for ESX, QBCore & Qbox. Browse Shop →
All Shop
Advanced Vehicle System

Description

This script is roleplay focused: it gives your players’ vehicles a value and adds degradation, which makes it important to buy new vehicles or keep used ones maintained.

How to start a car

  • Press G to turn the key and put the vehicle in ignition state.
  • Hold G to start the engine.

The key can be changed in cl_config.lua.

RP possibilities

  • New vehicles matter more because their engine starts fast.
  • Used vehicles lose value, even when modded, because of a slower engine start or engine damage based on mileage and missing maintenance.
  • Mechanics can maintain used vehicles to keep engine start time and engine damage low.
  • Vehicles that are not repaired take much longer to start, which gives cops a better chance of catching robbers.

Features

  • Start time grows with the mileage since the last start fix, in steps you define in cl_config.lua
  • Maximum engine health drops with the mileage since the last engine fix, also configurable
  • Mechanic commands /fixengine and /fixstart, protected by ace permissions
  • Optional owner-only ignition and engine start: call TriggerEvent('vehicle_system:setOwner', source, plate) from your vehicle shop after a purchase
  • Owner identifier type selectable in sv_config.lua (steam, license or fivem)
  • Vehicle data (mileage, checks, owner) is stored in the carsystem table and saved automatically at a set interval

Preview

Requirements

  • MySQL Async Library
  • No framework calls are used in the package; ownership works through player identifiers.
  • Note: according to the included readme, the script asks for a license key in sv_config.lua and verifies the server IP on first start.

Installation

  • Import db.sql into your database (use db-update.sql instead when updating from an older version).
  • Copy the codev_vehsystem folder into your resources directory. Do not rename it.
  • Add ensure codev_vehsystem to your server.cfg after mysql-async.
  • Give mechanics or admins the ace permissions, for example add_ace group.admin codev_vehsystem allow.

Related resources

All resources →