How to show vehicles at my qb-phone?
Setup
First, go to qb-phone/html/index.html and remove the brand and garage from it.
Second, go to qb-phone/client/main.lua and replace to this code
local function OpenPhone() local QBCore = exports['qb-core']:GetCoreObject() QBCore.Functions.TriggerCallback('qb-phone:server:HasPhone', function(HasPhone) if HasPhone then PhoneData.PlayerData = QBCore.Functions.GetPlayerData() SetNuiFocus(true, true) SendNUIMessage({ action = 'open', Tweets = PhoneData.Tweets, AppData = Config.PhoneApplications, CallData = PhoneData.CallData, PlayerData = PhoneData.PlayerData, }) PhoneData.isOpen = true CreateThread(function() while PhoneData.isOpen do DisableDisplayControlActions() Wait(1) end end) if not PhoneData.CallData.InCall then DoPhoneAnimation('cellphone_text_in') else DoPhoneAnimation('cellphone_call_to_text') end SetTimeout(250, function() newPhoneProp() end) QBCore.Functions.TriggerCallback('karma-garages:getCharacterAllVehicles', function(vehicles) PhoneData.GarageVehicles = vehicles end) else QBCore.Functions.Notify("You don't have a phone", 'error') end end) end
Last thing, now go to qb-phone/html/js/garage.js and replace the code to be like this picture
Last updated