T1GER Scripts Documentation
Tebex StoreDiscordYouTubeCFX Forum
  • T1GER Scripts Documentation
  • Quick Links
    • t1ger.net | Shop Now
    • Join Discord
  • Information
    • FiveM Asset Escrow
  • Resources
    • T1GER Mechanic
      • Installation
        • Job Account
          • Setup
          • API
      • Configuration
        • Shop
      • API
        • Exports
        • Events
      • Troubleshoot
    • T1GER Library
      • Installation
        • Inventory
        • Target
        • Garage
        • Society Account
        • Vehicle Properties
      • Configuration
    • T1GER Gang System
      • Installation
      • Gang Garages
      • Product Information
    • T1GER Tuning System
      • Installation
      • API
        • Client
        • Server
      • Troubleshoot
        • Common Issues
        • Error Codes
      • Guides
        • Commands
        • Shops
        • Markers
        • Mod Stations
        • Pricing
        • Mod Orders
        • Vehicle Mods
        • Engine Swaps
        • Nitrous
    • T1GER ATM Robbery
      • Installation
      • API
        • Client
        • Server
      • Troubleshoot
        • Common Issues
        • Error Codes
      • Guides
        • Hacking Minigame
        • Dispatch
    • T1GER Dealerships
  • Free Resources
    • T1GER Keys
    • T1GER Garage
    • T1GER Bank Robbery
    • T1GER Tow Trucker
Powered by GitBook
On this page
  • Introduction
  • Setup
  • Functions
  • GetVehicleProperties
  • SetVehicleProperties
  1. Resources
  2. T1GER Library
  3. Installation

Vehicle Properties

Instruction and guide on how to setup vehicle properties for T1GER resources

PreviousSociety AccountNextConfiguration

Last updated 10 months ago

Introduction

With the release of T1GER Tuning System, we needed to introduce our own vehicleprops.lua with get and set methods to fully ensure vehicle mods being applied and saved correctly.

You can easily add your 3rd-party custom edits from your current vehicle properties into our vehicleprops.lua.

Setup

This guide will help you setup vehicle properties inside your framework functions.

Please note. If you have 3rd-party resources that calls vehicle properties but not using ESX/QB framework functions, then you need to manually replace these with our exports.

ESX
  1. Navigate to es_extended/client/functions.lua

  2. Find this function:

function ESX.Game.GetVehicleProperties(vehicle)
  1. Take a backup of the whole function (in-case you have some custom edits, you want to transfer).

  2. Replace the whole function with this code:

function ESX.Game.GetVehicleProperties(vehicle)
    return exports['t1ger_lib']:GetVehicleProperties(vehicle)
end
  1. Now find this function:

function ESX.Game.SetVehicleProperties(vehicle, props)
  1. As we did in 3., take a backup of the whole function.

  2. Replace the whole function with this code:

function ESX.Game.SetVehicleProperties(vehicle, props)
    exports['t1ger_lib']:SetVehicleProperties(vehicle, props)
end
  1. If done correct, it should look like this (please ensure):

  2. Restart the server and you are all set!

QB Core
  1. Navigate to qb-core/client/functions.lua

  2. Find this function:

function QBCore.Functions.GetVehicleProperties(vehicle)
  1. Take a backup of the whole function (in-case you have some custom edits, you want to transfer).

  2. Replace the whole function with this code:

function QBCore.Functions.GetVehicleProperties(vehicle)
    return exports['t1ger_lib']:GetVehicleProperties(vehicle)
end
  1. Now find this function:

function QBCore.Functions.SetVehicleProperties(vehicle, props)
  1. As we did in 3., take a backup of the whole function.

  2. Replace the whole function with this code:

function QBCore.Functions.SetVehicleProperties(vehicle, props)
    exports['t1ger_lib']:SetVehicleProperties(vehicle, props)
end
  1. If done correct, it should look like this (please ensure):

  2. Restart the server and you are all set!

Functions

The GetVehicleProperties() and SetVehicleProperties() functions can be found and altered inside t1ger_lib/vehicleprops.lua

GetVehicleProperties

exports['t1ger_lib']:GetVehicleProperties(vehicle)
-- returns the given vehicle's properties

Parameters:

  • vehicle: entity(vehicle)

SetVehicleProperties

exports['t1ger_lib']:SetVehicleProperties(vehicle, props)
-- sets the given vehicle's properties

Parameters:

  • vehicle: entity(vehicle)

  • props: table(props)