DEVHUB DOCUMENTATION
Tebex StoreDevhub LIbDiscord Support
  • 🏠Home page
  • 🐌Download purchased assets
  • â‰ī¸Error: "You lack the required entitlement to use"
  • â‰ī¸Error: syntax error near '<\1>'
  • 💾SCRIPTS
    • 📗devhub_lib (NEEDED FOR EACH SCRIPT!)
      • đŸ’ģInstallation
      • 2ī¸âƒŖMigration from v1 to v2
      • âš™ī¸Framework
      • đŸ–ī¸Target
      • 🧭Ui
      • 🔑Vehicle Keys
      • â›ŊVehicle fuel
      • 🔊Sound System
      • 👕Clothing
      • â„šī¸Logs
      • 📡SQL
      • 🎨UI Color Customization
      • 🆘Compatibility test
  • 🔧Car Tune
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
    • 💾Saving Cartune Settings
  • 🚙Car Dancing
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
      • Beat generating
  • đŸ’ĒSkill Tree
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
    • đŸŽĢDevelopment
      • Listeners
      • Exports
      • Example skill
      • Pre-made skills
    • âš™ī¸Skill Generator
    • 🎨UI Color Customization
    • ❔FAQ
  • â›ī¸Miner Job
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
      • client.lua
      • shared.lua
      • server.lua
      • skillTree.lua
      • config.js
    • 🎨UI Color Customization
  • đŸĒĩDrywood Cutter Job
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
      • client.lua
      • shared.lua
      • server.lua
      • skillTree.lua
      • config.js
      • zones.lua
    • 🎨UI Color Customization
  • đŸŒŋ[FREE] Herbal Alchemist Job
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
      • client.lua
      • shared.lua
      • server.lua
      • skillTree.lua
      • config.js
    • 🎨UI Color Customization
  • 📱Who Am I?
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
      • shared.lua
      • server.lua
    • 🎨UI Color Customization
  • 🎆Skill Selection
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
    • đŸ’ĒSkill Tree connection
    • 🎨UI Color Customization
  • 🍲3D CRAFTING TABLE
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
    • ❓How to create table
    • 🌹Custom props
  • đŸ‹ī¸Gym
    • đŸ’ģInstallation
    • đŸ› ī¸Configuration
  • â™Ÿī¸Props
    • đŸ–ŧī¸Paintings Pack
    • đŸ”ĒKitchen Furniture Pack
Powered by GitBook
On this page
  1. Car Tune

Saving Cartune Settings

The dh_cartune script provides two exports that allow you to save and apply vehicle tuning settings:

local tune = exports["dh_cartune"]:getVehicleTune(plate)
exports["dh_cartune"]:setVehicleTune(plate, tune)

This is especially useful when storing vehicles in a garage. Typically, vehicle properties should be saved when storing the vehicle and applied when retrieving it.

Example Usage

Storing a Vehicle

When storing a vehicle, retrieve and save its tuning settings:

local vehicleProperties = GetVehicleData(vehicle) -- function from garage script
local plate = GetVehicleNumberPlateText(vehicle)
local tune = exports["dh_cartune"]:getVehicleTune(plate)
vehicleProperties.tune = tune

Retrieving a Vehicle

When retrieving a vehicle, apply the saved tuning settings:

local vehicleProperties = GetVehicleData(vehicle) -- function from garage script
local plate = GetVehicleNumberPlateText(vehicle)
exports["dh_cartune"]:setVehicleTune(plate, vehicleProperties.tune)

This ensures that the vehicle maintains its custom tuning when it is taken out of storage.

PreviousConfigurationNextCar Dancing

Last updated 2 months ago

🔧
💾