Giter Club home page Giter Club logo

qb-garages's Introduction

qb-garages

Public Depot

  • Park owned cars in public garages. Configure the garages on config.lua.

image

image

House Garages

  • Park owned cars in house garages. To add a house garage, you must have the realestate job and do /addgarage.

Gang Garages

  • Allows for gangs to have their own garages. Configure the garages on config.lua.

Job Garages

  • Allows jobs to have garage specific. Configure the garages on config.lua.

Depot Garages

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

Auto Respawn Config

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

Common Error Messages

  • "Vehicle not owned" - You can only parks vehicles that you own (needs to be in the database).

OPTIONAL qb-target by Berkie - https://github.com/BerkieBb/qb-targe

  • If using qb-target, here's some triggers you can use to open the public garage and depot. (Make sure to add the following code to client.lua)

Public Garage Trigger

RegisterNetEvent('qb-garages:client:menuGarage', function() 
local pos = GetEntityCoords(PlayerPedId())
for k, v in pairs(Garages) do
    local takeDist = #(pos - vector3(Garages[k].takeVehicle.x, Garages[k].takeVehicle.y, Garages[k].takeVehicle.z))
    if takeDist <= 15 then
        MenuGarage()
        currentGarage = k
    end
end
end)

Depot Garage Trigger

RegisterNetEvent('qb-garages:client:menuDepot', function() 
local pos = GetEntityCoords(PlayerPedId())
for k, v in pairs(Depots) do
    local depottakeDist = #(pos - vector3(Depots[k].takeVehicle.x, Depots[k].takeVehicle.y, Depots[k].takeVehicle.z))
    if depottakeDist <= 15 then
        MenuDepot()
        currentGarage = k
    end
end
end)

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

ghzgarage avatar developer-bear avatar jaxonfromkh avatar berkiebb avatar jericofx avatar chxttr avatar jay-fivem avatar sna-aaa avatar idrisdose avatar falcon1641 avatar newtonzz avatar n3meee avatar evanillaa avatar roobr avatar jxnnyo avatar gutsoo avatar darknight2590 avatar waseem-h avatar pluto-really avatar monkeywhisper avatar memojustone avatar manliketjb avatar dannysrp avatar avery1227 avatar

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.