Giter Site home page Giter Site logo

Comments (9)

amsali22 avatar amsali22 commented on August 17, 2024

i found out why when you have more than 6 cars or so nothings shows up i hop you fix it

from qb-phone.

github-actions avatar github-actions commented on August 17, 2024

This issue has had 60 days of inactivity & will close within 7 days

from qb-phone.

HypnoticGD avatar HypnoticGD commented on August 17, 2024

Try this code

QBCore.Functions.CreateCallback('qb-phone:server:GetGarageVehicles', function(source, cb)
local Player = QBCore.Functions.GetPlayer(source)
local Vehicles = {}
local result = exports.oxmysql:executeSync('SELECT * FROM player_vehicles WHERE citizenid = ?', {Player.PlayerData.citizenid})
if result[1] ~= nil then
for k, v in pairs(result) do
local vehicleData = QBCore.Shared.Vehicles[v.vehicle]
local modifications = json.decode(v.mods)
local VehicleGarage = "None"
if v.garage ~= nil then
if GetGarageNamephone(v.garage) then
if Garages[v.garage] or GangGarages[v.garage] or JobGarages[v.garage] then
if Garages[v.garage] ~= nil then
VehicleGarage = Garages[v.garage]["label"]
elseif GangGarages[v.garage] ~= nil then
VehicleGarage = GangGarages[v.garage]["label"]
elseif JobGarages[v.garage] ~= nil then
VehicleGarage = JobGarages[v.garage]["label"]
end
end
else
VehicleGarage = v.garage
end
end
local VehicleState = "In"
if v.state == 0 then
if v.depotprice == 0 then
VehicleGarage = "None"
VehicleState = "Out"
else
VehicleGarage = "Depot"
VehicleState = "In Depot"
end
elseif v.state == 2 then
VehicleGarage = "Police Depot"
VehicleState = "Impounded"
end
local vehdata = {}
if vehicleData and vehicleData["brand"] then
vehdata = {
fullname = vehicleData["brand"] .. " " .. vehicleData["name"],
brand = vehicleData["brand"],
model = vehicleData["name"],
plate = v.plate,
garage = VehicleGarage,
state = VehicleState,
fuel = modifications.fuelLevel,
engine = modifications.engineHealth,
body = modifications.bodyHealth
}
else
vehdata = {
fullname = v.vehicle,
brand = v.vehicle,
model = v.vehicle,
plate = v.plate,
garage = VehicleGarage,
state = VehicleState,
fuel = modifications.fuelLevel,
engine = modifications.engineHealth,
body = modifications.bodyHealth
}
end
table.insert(Vehicles, vehdata)
end
cb(Vehicles)
else
cb(nil)
end
end)

maby it works for me it worked perfectly.

from qb-phone.

Avzyttv avatar Avzyttv commented on August 17, 2024

What line does that go on

from qb-phone.

HypnoticGD avatar HypnoticGD commented on August 17, 2024

go to qp-phone > Server > Main.lua for me it is the code line 598

just STRG + F and search for phone:server:GetGarageVehicles you will find it

from qb-phone.

DeadClap avatar DeadClap commented on August 17, 2024

PR #383 I think fixes this issue

from qb-phone.

Sharkiiie avatar Sharkiiie commented on August 17, 2024

#382
Just make this change or download a fresh copy.

from qb-phone.

HypnoticGD avatar HypnoticGD commented on August 17, 2024

https://www.mediafire.com/folder/y810hvu00sy5o/qb-phone QB-Phone Script

from qb-phone.

github-actions avatar github-actions commented on August 17, 2024

This issue has had 60 days of inactivity & will close within 7 days

from qb-phone.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.