[BUG] - After adding the /addgarage to house and owned the house when I park the car it works until restart , after restart when I pull car out then try to park it again it says "This vehicle cant be stored".
isaadamirr opened this issue · 6 comments
Describe the bug
After adding the /addgarage to house and owned the house when I park the car it works until restart , after restart when I pull car out then try to park it again it says "This vehicle cant be stored".
To Reproduce
- Try add garage in house
- Park some cars
- Restart server
- Pull car out
- Park it back it will say an error mentioned above.
Expected behavior
Car should be parked at the garage all the time when I park car any time at the added garage.
Screenshots
Please find the video link here: https://tinyurl.com/yrfbdgmy
Questions (please complete the following information):
- When you last updated -- [Last week]
- Are you using custom resource? which ones? [no default]
- Have you renamed
qb-
to something custom? [no]
+1
if type == 'house' and not exports['qb-houses']:hasKey(Player.PlayerData.license, Player.PlayerData.citizenid, Config.Garages[garage].houseName) then
cb(true)
else
cb(false)
end
I changed the code in the server/main.lua to this and it seems to be working
if type == 'house' and not exports['qb-houses']:hasKey(Player.PlayerData.license, Player.PlayerData.citizenid, Config.Garages[garage].houseName) then cb(true) else cb(false) end
I changed the code in the server/main.lua to this and it seems to be working
Code seems will work for the house garage but it still won't be working with other garages, please confirm if this should be working with other garages as well?
Cancels out all other garages when using that code. Only house garages will work.
Cancels out all other garages when using that code. Only house garages will work.
if type == 'house' and exports['qb-houses']:hasKey(Player.PlayerData.license, Player.PlayerData.citizenid, Config.Garages[garage].houseName) then
cb(false)
return
end
Replace with this you can use all public garages and houses garage
This issue has had 60 days of inactivity & will close within 7 days