Vehicle Properties
Instruction and guide on how to setup vehicle properties for T1GER resources
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
Navigate to
es_extended/client/functions.luaFind this function:
function ESX.Game.GetVehicleProperties(vehicle)Take a backup of the whole function (in-case you have some custom edits, you want to transfer).
Replace the whole function with this code:
function ESX.Game.GetVehicleProperties(vehicle)
return exports['t1ger_lib']:GetVehicleProperties(vehicle)
endNow find this function:
function ESX.Game.SetVehicleProperties(vehicle, props)As we did in 3., take a backup of the whole function.
Replace the whole function with this code:
function ESX.Game.SetVehicleProperties(vehicle, props)
exports['t1ger_lib']:SetVehicleProperties(vehicle, props)
endIf done correct, it should look like this (please ensure):

Restart the server and you are all set!
QB Core
Navigate to
qb-core/client/functions.luaFind this function:
function QBCore.Functions.GetVehicleProperties(vehicle)Take a backup of the whole function (in-case you have some custom edits, you want to transfer).
Replace the whole function with this code:
function QBCore.Functions.GetVehicleProperties(vehicle)
return exports['t1ger_lib']:GetVehicleProperties(vehicle)
endNow find this function:
function QBCore.Functions.SetVehicleProperties(vehicle, props)As we did in 3., take a backup of the whole function.
Replace the whole function with this code:
function QBCore.Functions.SetVehicleProperties(vehicle, props)
exports['t1ger_lib']:SetVehicleProperties(vehicle, props)
endIf done correct, it should look like this (please ensure):

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
Parameters:
vehicle: entity(vehicle)
SetVehicleProperties
Parameters:
vehicle: entity(vehicle)
props: table(props)
Last updated