Coder Social home page Coder Social logo

qb-garages's Introduction

qb-garages

Public Garages

  • Park owned cars in public garages.
  • You can only parks vehicles that you own in public garages.

image

House Garages

  • Park owned cars in house garages. To add a house garage, you must have the realestate job and do /addgarage.
  • You can only parks vehicles from persons that have the key in a house garage.
  • You can take every vehicle from the house garages to which you have the key.
  • You can only parks ground vehicles in house garages.

Gang Garages

  • Allows for gangs to have their own garages.
  • You can parks every vehicle that is owned by gang members in gang garages.
  • You can take every vehicle from the gang garages.

Job Garages

  • Allows jobs to have garage specific.
  • You can parks every vehicle that is owned by someone in job garages.
  • You can take every vehicle from the job garages.

Depot Garages

  • Allows depot cars to be retreived from here. Cops can do /depot [price] to send a car to the depot.

Auto Respawn Config

  • If set to true, cars that are currently outside will be placed in the last garage used.
  • If set to false, cars that are currently outside will be placed in the depot.

Shared garages Config

  • If set to true, Gang and job garages are shared.
  • If set to false, Gang and Job garages are personal.

Configurations

  • You can only parks ground vehicles in garages of type "car" in config.
  • You can only parks water vehicles in garages of type "sea" in config.
  • You can only parks air vehicles in garages of type "air" in config.
  • Vehicle types and jobs or gang can be mixed in config.

Blips and names

  • Blips and names are modifiable for each garage.

License

QBCore Framework
Copyright (C) 2021 Joshua Eger

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>

qb-garages's People

Contributors

adweex avatar athul-aravind-k avatar berkiebb avatar chxttr avatar danielcoelh0 avatar developer-bear avatar dexter9006 avatar ghzgarage avatar i-kulgu avatar idrisdose avatar jaxonfromkh avatar jay-fivem avatar jericofx avatar jordan2139 avatar mmagnusss avatar monkeywhisper avatar n3meee avatar nemadev avatar newtonzz avatar qwerty1verified avatar sanriku-gaming avatar seraph1982 avatar shadowz-git avatar sharkiiie avatar sna-aaa avatar spkreality avatar theilleniumstudios avatar tom-osborne avatar wanderrer avatar worapolburaphan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qb-garages's Issues

Garage issues

Couple issues I have experienced so far in development.

  1. When using a house garage it is hit or miss on it allowing a car to be parked. Sometimes it works right away and sometimes it will say "Car was not deleted, make sure is if no one is in car" causing it not to store vehicle. Once this error occurs no prompt comes up on console. Also when this happens you cannot find your car in impound or anywhere. its just gone.
  2. The garage app does not work for phone anymore. Once opened it is a blank screne.
  3. When you go to store cars in "city" garages you drive to the marker and press " E" to park vehicle. Doing this will park the vehicle but the car will still remain visible and stay right on top of "park vehicle" marker. You can get right back into vehicle and drive off with it as if nothing happened. Again no error codes are thrown in console. I have not messed with any configuration on this as it is not needed.

If anyone has any ideas or ways to fix this please let me know! Thank you!!

Where is the sql file?

In the readme and here on the page it tells me to import the sql file but can't seem to find it anywhere.
What should I do?
Thanks!

Plate Whitespace

I have the latest commits, now I have vehicles with the following plates.

  1. Comet S2 (NOTEPIC)
  2. Nissian GT-R (GTR)
  3. Lexus LC500 (LEXUS)

I have printed the plates into the console and they appear like this, "GTR ", "LEXUS ", NOTEPIC ". The trimming function does not remove the whitespace, if I have my own trimming code before I push the plate as an argument like this:

local newPlate = plate:gsub("%s+", "")

Then use newPlate instead of plate it works fine.

Not sure if this is intended or an issue hence the issue ticket.

Job Garages

Ive notice when you park your car in the work garage (Police) for example. Your phone will tell you its in NONE garage.

'Vehicle not owned'

After purchasing and financing a vehicle and bringing it to the garage, you can't park it. Says 'vehicle not owned.'

If I logout and let the car go to Hayes Auto impound, pull it out and take to to a garage, I can't store it. 'Vehicle not owned.'

I've got qb-core, qb-vehicleshops, qb-vehiclekeys, and qb-garages all updated to the latest version.

No errors showing in server console or f8.

add police impoud stats

hello all
can add new stats for garage car impoud police
if v.state == 0 then
v.state = "Out"
elseif v.state == 1 then
v.state = "Garaged"
elseif v.state == 2 then
v.state = "Impound"
elseif v.state == 3 then
v.state = "Police Impound"
end

Impound lot bug

If you buy a vehicle from a dealership, you can run over to the impound lot, and your able to spawn a 1 copy, if you try again you despawn the one you spawned.

if stored in personal or shared, this doesnt happen, as it will Despawn that vehicle.
Possibly can be exploited if your able to sell the car and your copy at used car dealer "have not test"

I know this is my issue thread so your welcome to ignore this part
any way we can get a code put in for not being able to pull the vehicle out at all if the vehicle is spawned within the world
only if it has despawned somehow in the world, via server reset or, car blowing up.??

Depot exploit

If you press many times when removing your vehicle from the depot, you will add several equal vehicles, if the person has latency, more vehicles will be added.

im using this function to up the delay.

function TakeOutDepotVehicle(vehicle)
    if vehicle.state == "Impound" then
        TriggerServerEvent("qb-garage:server:PayDepotPrice", vehicle)
		Wait(500)
    end
end

Garage Issue

We have a roleplay server with multiple users. Everytime we give a new vehicle to a player as soon as they park it the vehicle disappears out of the garages. When we check our database it states it's in the garage but doesn't allow the user to see or take it out of the garage. Is there a fix for this issue? Please let me know asap.

can add blip manger show and hide same shop and add JobGarages?

hello
can add blip manger show and hide bilp garage same shop ?
because when create new garage for gang and job
He checks if he has a job, shows him garage bilp
Without giving many reasons
But it will be very useful to control it

and add new category JobGarages
for using police or any job

Garage - Duplicate spawn bug

Scenario If a friend of yours is driving your car and tries to park it. They obviously cant however what it does allow you to do is pull out your car from the garage even though it is already out. Allowing you to duplicate the spawn from garage over and over again without the car ever being returned.

Vehicle can be duplicated using garage

Suppose if we're sitting on passenger seat of our own vehicle driven by someone else and when it reaches the 'store vehicle' marker, as soon we press the key 'E' , it will show the 'vehicle has been stored' but the vehicle won't get deleted. We can take the duplicate of stored vehicle from garage.

House Garages blip error

When taking out of vehicle from impound including all public garages and trying to put vehicle in house garage, the house garage blip disappears and prints console error.

(Note: version of script on the screen shot is before the recent update about gang garages. After updating, I have the same error but in a different line, it's on line 791.)

Console Error Message: https://prnt.sc/1if8f9o

depot price

Can't find where to adjust the depot price

Impound not working

I don't know if I'm doing something wrong but lets say I buy a car from PDM, put it in my garage, take it out then DV it then go to the impound its not there. Really nothing is ever there no matter what i try i don't know why I've tried a reinstall of the script. Can someone please help me.

[add] job garages

Suggesting adding garages for jobs that can be used
In the use of cars owned by police officers
Players have more options
It can also be added if you own a burger or taco restaurant
Employees can park vehicles inside the garage

Depot Duplicate Glitch

I am running the newest build of qb-garages and this is still happening,

you can pull a car out of the depot and then go back into the depot and it will still be there,

you can also get someone to sit in the car and then go into the depot and duplicate the car out,

https://i.imgur.com/Vj2P85h.jpeg

desktop-20210818-10522309dvr-trim_MZF59P4n.mp4

Save for paints

Hello i have came across a issue i have had now since day 1 and never got to post about it...

Store cars works fine but wen painting cars and store them the paint dont save..

unable to garage a financed vehicle

have the latest qb-vehicleshop and qb-garages when I purchase a vehicle and take it to a garage point it does not allow me to store the vehicle / when I re-log the vehicle is in the compound where I can take it out again.

notify message states : Vehicle Not Owned

[Suggestion] Make config to pull cars from any garage

I like the idea of having a config to allow cars to be pulled from any garage, so people can decide how "realistic" they want to be.

Right now the fix is to remove garage, however since the latest update im getting an error.
QBCore.Functions.CreateCallback("qb-garage:server:GetUserVehicles", function(source, cb) local src = source local pData = QBCore.Functions.GetPlayer(src) exports.oxmysql:execute('SELECT * FROM player_vehicles WHERE citizenid = ?', {pData.PlayerData.citizenid}, function(result) if result[1] then cb(result) else cb(nil) end end) end)
https://i.imgur.com/ez4YZmi.png

I know you guys are cleaning up things before adding new stuff, but seeing as the garages are getting revamped might be worth adding this in.

Vehicle can be duplicated from Impound

If someone is sitting inside a vehicle and when we try to take the same vehicle from Impound, it gets duplicated. The vehicle will be deleted only if no-one is sitting inside at the instant we take our vehicle from impound.

cant seem to have more then 4 car's per a garge...

So i went and bought a car put it in the pillbox garage and it doesn't show up ... so then was able to change the garage location and now the car show up in it.. im not sure if there is a limit on the amount per garage.. if i can get some enlight on this and reason

Bug issue

I noticed that some people are using the car redemption feature while doing some bad things such as: picking cannabis, just putting the lever in the car and then returning to the car redemption area can bring all the necessary numbers back. Can you remove the storage feature when redeeming the car?

Addon Cars not possible to get out of garage

It's not possible to get addon vehicles out of the garage, it gives a error: @qb-garages/client/main.lua:351: attempt to index a nil value (field '?') when you have addon vehicles

Job garages

It is not allowing multiple garages for a single job
Icons for everything after the first job garage isn't showing

part of my config if that helps

JobGarages = {
["police"] = {
label = "Police",
takeVehicle = vector3(454.6, -1017.4, 28.4),
spawnPoint = vector4(438.4, -1018.3, 27.7, 90.0),
putVehicle = vector3(454.6, -1017.4, 28.4),
job = "police"
},
["police2"] = {
label = "Police",
takeVehicle = vector3(390.85, -1610.35, 29.29),
spawnPoint = vector4(389.9, -1623.25, 29.29, 316.59),
putVehicle = vector3(400.48, -1618.68, 29.29),
job = "police"
},
["police3"] = {
label = "Police",
takeVehicle = vector3(-860.36, -2353.44, 13.96),
spawnPoint = vector4(-867.29, -2340.44, 13.96, 134.83),
putVehicle = vector3(-877.38, -2346.93, 13.96),
job = "police"
},
["police4"] = {
label = "Police",
takeVehicle = vector3(-1607.03, -1040.82, 13.1),
spawnPoint = vector4(-1587.33, -1035.12, 13.02, 18.99),
putVehicle = vector3(-1613.38, -1037.07, 13.15),
job = "police"
},
["police5"] = {
label = "Police",
takeVehicle = vector3(-1039.77, -855.62, 4.88),
spawnPoint = vector4(-1051.93, -855.03, 4.87, 121.62),
putVehicle = vector3(-1045.7, -861.27, 4.92),
job = "police"
},
["police6"] = {
label = "Police",
takeVehicle = vector3(-560.89, -146.49, 38.14),
spawnPoint = vector4(-574.55, -152.84, 37.91, 285.73),
putVehicle = vector3(-552.83, -142.94, 38.25),
job = "police"
},
["police7"] = {
label = "Police",
takeVehicle = vector3(631.63, 23.57, 87.36),
spawnPoint = vector4(599.69, 34.05, 90.65, 247.5),
putVehicle = vector3(621.35, 26.68, 88.4),
job = "police"
},
["police8"] = {
label = "Police",
takeVehicle = vector3(2029.48, 3450.42, 43.89),
spawnPoint = vector4(2051.62, 3456.17, 43.77, 83.1),
putVehicle = vector3(2041.4, 3457.82, 43.79),
job = "police"
},
["police9"] = {
label = "Police",
takeVehicle = vector3(1853.76, 3676.28, 33.77),
spawnPoint = vector4(1867.75, 3696.93, 33.56, 209.38),
putVehicle = vector3(1847.44, 3672.2, 33.7),
job = "police"
},
["police10"] = {
label = "Police",
takeVehicle = vector3(-442.05, 6026.88, 31.34),
spawnPoint = vector4(-447.61, 6033.98, 31.34, 303.75),
putVehicle = vector3(-435.52, 6031.99, 31.34),
job = "police"
},
}

can add `fakeplate` varchar(50) DEFAULT NULL,

Is there a clear scenario?
To use fakeplate?

CREATE TABLE IF NOT EXISTS player_vehicles (
fakeplate varchar(50) DEFAULT NULL,
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;

Rename license plate issue

When you rename the license plate in the database it seems to cause some issue. after a restart of the client and going back into the server if you try to store your car it says you dont own the car.

it seems 'qb-garage:server:checkVehicleOwner' when its checking for the license plate, the plate argument has a space infront of it.

i did a simple print to see what inside the plate variable and there is a space infront of the plate name.
doing a simple string.gsub(plate, "%s+", "") it solves the issue but for the life of me i cant figure out where that space is coming from

Impound bug

When your car is impounded, if you retrieve it and damage it before storing it, if you go back to the impound you can retrieve it again and it will be fixed.

New suggestion

New suggestion
This project deserves to be special
Why not allocate vehicle storage
add to config.lua
UsedRealPark = true
With this option, vehicles are virtually stored on the streets and do not disappear
The option can be disabled for weak servers
And powerful servers can use this option
It would be a very cool idea
https://www.youtube.com/watch?v=sDsqSuw2yKg
more custems

[Suggestion] Shared Garages with multiple players

A car should be accessible to more than one player

The kinds of vehicle sharing:

  • Job and grade
    • A car can be shared with a job and a grade so that player can pull it out if they match the condition
  • Gang and grade
  • Players directly

Can't park owned vehicle in house garage

Can't park owned vehicles in house garages. (It shows: Nobody owns this vehicle) no error serverside/clientside
public garages work as before.

Does someone have an idea why?

Impound

I get this error when opening the impound

image

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.