From 4fc973e1132628d5dae1d52d5a987146457dbf1f Mon Sep 17 00:00:00 2001 From: MadCap <95227673+ThatMadCap@users.noreply.github.com> Date: Mon, 6 Jan 2025 13:10:24 +0000 Subject: [PATCH] fix(client\vehicletext): brand name text duplicate --- client/vehicletext.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/vehicletext.lua b/client/vehicletext.lua index 7c320bc7..0d729009 100644 --- a/client/vehicletext.lua +++ b/client/vehicletext.lua @@ -3,8 +3,11 @@ local QBCore = exports['qb-core']:GetCoreObject() CreateThread(function() for _, v in pairs(QBCore.Shared.Vehicles) do local text - if v.brand then - text = v.brand..' '..v.name + local name = string.lower(v.name) + local brand = string.lower(v.brand) + if v.brand and string.match(name, brand) then + local nameWithoutBrand = string.gsub(name, brand, "") + text = v.brand .. ' ' .. nameWithoutBrand else text = v.name end