Karma Developments
DiscordStore
  • Welcome
  • Script Guides
    • Karma Developments Clothing System
      • Install
      • How to change clothing images?
    • Karma Developments Dispatch System
      • Install
      • How to add new Job to Dispatch
      • How to add alerts in my other scripts?
    • Karma Developments Server-Side Graphics Overhaul System
      • Install
      • How to fix grass on roads?
      • Getting crashs?
    • Karma Developments NPC Dialog System
      • Install
      • How to add the images of items at STORES?
    • Karma Developments Garage & Impounds System
      • Install
      • How to create a new garage?
      • How to show vehicles at my qb-phone?
    • Karma Developments Tablet System
      • Install
      • How to add a App UI in Tablet?
  • ABOUT
    • All Links
Powered by GitBook
On this page
  1. Script Guides
  2. Karma Developments Garage & Impounds System

How to show vehicles at my qb-phone?

PreviousHow to create a new garage?NextKarma Developments Tablet System

Last updated 14 days ago

Setup

  1. First, go to qb-phone/html/index.html and remove the brand and garage from it.

  2. 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
  3. Last thing, now go to qb-phone/html/js/garage.js and replace the code to be like this picture