Skip to main content
This page documents the vehicle data structures, type constants, storage configuration, and vehicle state management in Mythic Framework.

Vehicle Data Structure

Vehicles stored in the database have the following structure:

Type Constants

Owner Types

Owner type determines who owns the vehicle. Character Ownership:
Fleet Ownership:

Storage Types

Storage type determines where the vehicle is stored. Impound Storage:
Garage Storage:
Property Storage:

Vehicle Types

Vehicle type determines handling and storage locations. Usage:

Vehicle Properties

Vehicle customization properties follow the standard FiveM format:

Vehicle Entity State

Spawned vehicles have state stored in Entity(vehicle).state:

Core State Fields

Accessing Vehicle State

Server Side:
Client Side:

Garage Configuration

Garages are defined in shared/vehicleStorage.lua:

Garage Example (Public)

Garage Example (Job Fleet)

Garage Example (Boat Dock)

Garage Example (Helipad)


Impound Configuration

Impound system configuration in shared/vehicleImpound.lua:

Impound Levels

Police can impound vehicles at different severity levels: Level 1: Minor Violation
  • Fine: $2,000
  • Holding: 0 hours (immediate retrieval)
Level 2: Moderate Violation
  • Fine: $3,500
  • Holding: 6 hours
Level 3: Serious Violation
  • Fine: $5,000
  • Holding: 12 hours
Level 4: Severe Violation
  • Fine: $8,500
  • Holding: 24 hours
Regular Impound (Non-Police):
  • Fine: $750
  • Holding: 0 hours

Vehicle Identification

VIN Generation

VINs are auto-generated for owned vehicles:

Plate Generation

License plates are auto-generated:

Best Practices

Before performing vehicle operations:
Check ownership before allowing actions:
Entity state is synced automatically:
Always save vehicle before deleting:
Check grade level and workplace:

Data Migration

When modifying vehicle data structures, use database migrations:

Next Steps

Vehicles - Exports

Vehicle management methods

Vehicles - Events

Vehicle-related events

Garages Feature

Complete garage system

Impound System

Vehicle impound mechanics
Entity State Performance: Entity state is automatically networked. Avoid storing large tables or frequently changing data in entity state to minimize network traffic.
VIN Uniqueness: VINs must be globally unique. Never manually assign VINs without checking for duplicates in the database first.