Comments (9)
i found out why when you have more than 6 cars or so nothings shows up i hop you fix it
from qb-phone.
This issue has had 60 days of inactivity & will close within 7 days
from qb-phone.
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.
What line does that go on
from qb-phone.
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.
PR #383 I think fixes this issue
from qb-phone.
#382
Just make this change or download a fresh copy.
from qb-phone.
https://www.mediafire.com/folder/y810hvu00sy5o/qb-phone QB-Phone Script
from qb-phone.
This issue has had 60 days of inactivity & will close within 7 days
from qb-phone.
Related Issues (20)
- [BUG] Duplicate Invoices HOT 1
- [BUG] XSS in Twitter and Advertisment due to name handling HOT 3
- [BUG] SCRIPT ERROR: @qb-phone/client/main.lua:1058: attempt to index a nil valua (field 'RaceData) HOT 3
- pictures HOT 3
- SCRIPT ERROR: @qb-garages/client/main.lua:273: attempt to index a nil value (field '?') HOT 3
- [SUGGESTION] HOT 8
- Warning: could not find file html/fonts/*.ttf , html/fonts/*.otf , html/fonts/*.woff (defined in fxmanifest.lua:25) HOT 2
- [SUGGESTION] HOT 1
- [BUG] VEHICLE GARAGE TRACKING APP NOT WORKING HOT 1
- does not show any online job in phone services app [BUG]
- [BUG] HOT 1
- qb phone not working nor is hud HOT 5
- [BUG] HOT 1
- Apps not showing HOT 18
- [BUG] PHONE NOT WORKING HOT 3
- [BUG] 'app' is not available HOT 1
- [BUG] HOT 5
- [SUGGESTION]
- [BUG] HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qb-phone.