From 8c9299f7b2f047261ab6c3088e3b8767577ca0c8 Mon Sep 17 00:00:00 2001
From: Kakarot <57848836+GhzGarage@users.noreply.github.com>
Date: Tue, 31 Oct 2023 18:16:38 -0500
Subject: [PATCH] Garage 2.0
---
client/main.lua | 829 +++++++++++++++-----------------------
config.lua | 952 ++++++++++++++++++++++++--------------------
database.sql | 29 --
fxmanifest.lua | 15 +-
html/index.html | 19 +
html/logo.png | Bin 0 -> 2613 bytes
html/script.js | 260 ++++++++++++
html/style.css | 186 +++++++++
locales/ar.lua | 54 ++-
locales/da.lua | 68 +---
locales/de.lua | 68 +---
locales/en.lua | 76 +---
locales/es.lua | 69 +---
locales/et.lua | 69 +---
locales/fa.lua | 52 ++-
locales/fi.lua | 52 ++-
locales/fr.lua | 69 +---
locales/ge.lua | 52 ++-
locales/it.lua | 52 ++-
locales/nl.lua | 68 +---
locales/pt-br.lua | 74 +---
locales/pt.lua | 68 +---
locales/ro.lua | 73 +---
locales/sk.lua | 52 ++-
locales/sv.lua | 68 +---
locales/tr.lua | 68 +---
player_vehicles.sql | 26 ++
server/main.lua | 438 ++++++++------------
28 files changed, 1909 insertions(+), 1997 deletions(-)
delete mode 100644 database.sql
create mode 100644 html/index.html
create mode 100644 html/logo.png
create mode 100644 html/script.js
create mode 100644 html/style.css
create mode 100644 player_vehicles.sql
diff --git a/client/main.lua b/client/main.lua
index 3ce7dd3..ac13735 100644
--- a/client/main.lua
+++ b/client/main.lua
@@ -2,461 +2,411 @@ local QBCore = exports['qb-core']:GetCoreObject()
local PlayerData = {}
local PlayerGang = {}
local PlayerJob = {}
-
-local Markers = false
-local HouseMarkers = false
-local InputIn = false
-local InputOut = false
-local currentGarage = nil
-local currentGarageIndex = nil
local garageZones = {}
-local lasthouse = nil
-local blipsZonesLoaded = false
+local listenForKey = false
+-- Functions
---Menus
-local function MenuGarage(type, garage, indexgarage)
- local header
- local leave
- if type == "house" then
- header = Lang:t("menu.header." .. type .. "_car", { value = garage.label })
- leave = Lang:t("menu.leave.car")
- else
- header = Lang:t("menu.header." .. type .. "_" .. garage.vehicle, { value = garage.label })
- leave = Lang:t("menu.leave." .. garage.vehicle)
+local function round(num, numDecimalPlaces)
+ return tonumber(string.format('%.' .. (numDecimalPlaces or 0) .. 'f', num))
+end
+
+local function CheckPlayers(vehicle)
+ for i = -1, 5, 1 do
+ local seat = GetPedInVehicleSeat(vehicle, i)
+ if seat then
+ TaskLeaveVehicle(seat, vehicle, 0)
+ end
end
+ Wait(1500)
+ QBCore.Functions.DeleteVehicle(vehicle)
+end
- exports['qb-menu']:openMenu({
- {
- header = header,
- isMenuHeader = true
- },
- {
- header = Lang:t("menu.header.vehicles"),
- txt = Lang:t("menu.text.vehicles"),
- params = {
- event = "qb-garages:client:VehicleList",
- args = {
- type = type,
- garage = garage,
- index = indexgarage,
- }
+local function OpenGarageMenu(data)
+ QBCore.Functions.TriggerCallback('qb-garages:server:GetGarageVehicles', function(result)
+ if result == nil then return QBCore.Functions.Notify(Lang:t('error.no_vehicles'), 'error', 5000) end
+ local formattedVehicles = {}
+ for _, v in pairs(result) do
+ local enginePercent = round(v.engine, 0)
+ local bodyPercent = round(v.body, 0)
+ local vname = nil
+ pcall(function()
+ vname = QBCore.Shared.Vehicles[v.vehicle].name
+ end)
+ formattedVehicles[#formattedVehicles + 1] = {
+ vehicle = v.vehicle,
+ vehicleLabel = vname or v.vehicle,
+ plate = v.plate,
+ state = v.state,
+ fuel = v.fuel,
+ engine = enginePercent,
+ body = bodyPercent,
+ distance = v.drivingdistance or 0,
+ garage = Config.Garages[data.indexgarage],
+ type = data.type,
+ index = data.indexgarage,
+ depotPrice = v.depotprice or 0,
+ balance = v.balance or 0
}
- },
- {
- header = leave,
- txt = "",
- params = {
- event = "qb-menu:closeMenu"
- }
- },
- })
+ end
+ SetNuiFocus(true, true)
+ SendNUIMessage({
+ action = 'VehicleList',
+ garageLabel = Config.Garages[data.indexgarage].label,
+ vehicles = formattedVehicles,
+ })
+ end, data.indexgarage, data.type, data.category)
end
-local function ClearMenu()
- TriggerEvent("qb-menu:closeMenu")
+local function DepositVehicle(veh, data)
+ local plate = QBCore.Functions.GetPlate(veh)
+ QBCore.Functions.TriggerCallback('qb-garages:server:canDeposit', function(canDeposit)
+ if canDeposit then
+ local bodyDamage = math.ceil(GetVehicleBodyHealth(veh))
+ local engineDamage = math.ceil(GetVehicleEngineHealth(veh))
+ local totalFuel = exports[Config.FuelResource]:GetFuel(veh)
+ TriggerServerEvent('qb-vehicletuning:server:SaveVehicleProps', QBCore.Functions.GetVehicleProperties(veh))
+ TriggerServerEvent('qb-garages:server:updateVehicleStats', plate, totalFuel, engineDamage, bodyDamage)
+ CheckPlayers(veh)
+ if plate then TriggerServerEvent('qb-garages:server:UpdateOutsideVehicle', plate, nil) end
+ QBCore.Functions.Notify(Lang:t('success.vehicle_parked'), 'primary', 4500)
+ else
+ QBCore.Functions.Notify(Lang:t('error.not_owned'), 'error', 3500)
+ end
+ end, plate, data.type, data.indexgarage, 1)
end
-local function closeMenuFull()
- ClearMenu()
+local function IsVehicleAllowed(classList, vehicle)
+ if not Config.ClassSystem then return true end
+ for _, class in ipairs(classList) do
+ if GetVehicleClass(vehicle) == class then
+ return true
+ end
+ end
+ return false
end
-local function DestroyZone(type, index)
- if garageZones[type .. "_" .. index] then
- garageZones[type .. "_" .. index].zonecombo:destroy()
- garageZones[type .. "_" .. index].zone:destroy()
- end
+local function CreateBlips(setloc)
+ local Garage = AddBlipForCoord(setloc.takeVehicle.x, setloc.takeVehicle.y, setloc.takeVehicle.z)
+ SetBlipSprite(Garage, setloc.blipNumber)
+ SetBlipDisplay(Garage, 4)
+ SetBlipScale(Garage, 0.60)
+ SetBlipAsShortRange(Garage, true)
+ SetBlipColour(Garage, setloc.blipColor)
+ BeginTextCommandSetBlipName('STRING')
+ AddTextComponentSubstringPlayerName(setloc.blipName)
+ EndTextCommandSetBlipName(Garage)
end
-local function CreateZone(type, garage, index)
- local size
- local coords
- local heading
- local minz
- local maxz
-
- if type == 'in' then
- size = 4
- coords = vector3(garage.putVehicle.x, garage.putVehicle.y, garage.putVehicle.z)
- heading = garage.spawnPoint.w
- minz = coords.z - 1.0
- maxz = coords.z + 2.0
- elseif type == 'out' then
- size = 2
- coords = vector3(garage.takeVehicle.x, garage.takeVehicle.y, garage.takeVehicle.z)
- heading = garage.spawnPoint.w
- minz = coords.z - 1.0
- maxz = coords.z + 2.0
- elseif type == 'marker' then
- size = 60
- coords = vector3(garage.takeVehicle.x, garage.takeVehicle.y, garage.takeVehicle.z)
- heading = garage.spawnPoint.w
- minz = coords.z - 7.5
- maxz = coords.z + 7.0
- elseif type == 'hmarker' then
- size = 20
- coords = vector3(garage.takeVehicle.x, garage.takeVehicle.y, garage.takeVehicle.z)
- heading = garage.takeVehicle.w
- minz = coords.z - 4.0
- maxz = coords.z + 2.0
- elseif type == 'house' then
- size = 2
- coords = vector3(garage.takeVehicle.x, garage.takeVehicle.y, garage.takeVehicle.z)
- heading = garage.takeVehicle.w
- minz = coords.z - 1.0
- maxz = coords.z + 2.0
- end
- garageZones[type .. "_" .. index] = {}
- garageZones[type .. "_" .. index].zone = BoxZone:Create(
- coords, size, size, {
- minZ = minz,
- maxZ = maxz,
- name = type,
+local function CreateZone(index, garage, zoneType)
+ local zone = CircleZone:Create(garage.takeVehicle, 10.0, {
+ name = zoneType .. '_' .. index,
debugPoly = false,
- heading = heading
+ data = {
+ indexgarage = index,
+ type = garage.type,
+ category = garage.category
+ }
})
- garageZones[type .. "_" .. index].zonecombo = ComboZone:Create({ garageZones[type .. "_" .. index].zone },
- { name = "box" .. type, debugPoly = false })
- garageZones[type .. "_" .. index].zonecombo:onPlayerInOut(function(isPointInside)
- if isPointInside then
- local text
- if type == "in" then
- if garage.type == "house" then
- text = Lang:t("info.park_e")
- else
- text = Lang:t("info.park_e") .. "
" .. garage.label
- end
- exports['qb-core']:DrawText(text, 'left')
- InputIn = true
- elseif type == "out" then
- if garage.type == "house" then
- text = Lang:t("info.car_e")
- else
- text = Lang:t("info." .. garage.vehicle .. "_e") .. "
" .. garage.label
- end
+ return zone
+end
- exports['qb-core']:DrawText(text, 'left')
- InputOut = true
- elseif type == "marker" then
- currentGarage = garage
- currentGarageIndex = index
- CreateZone("out", garage, index)
- if garage.type ~= "depot" then
- CreateZone("in", garage, index)
- Markers = true
- else
- HouseMarkers = true
- end
- elseif type == "hmarker" then
- currentGarage = garage
- currentGarage.type = "house"
- currentGarageIndex = index
- CreateZone("house", garage, index)
- HouseMarkers = true
- elseif type == "house" then
- if IsPedInAnyVehicle(PlayerPedId(), false) then
- exports['qb-core']:DrawText(Lang:t("info.park_e"), 'left')
- InputIn = true
- else
- exports['qb-core']:DrawText(Lang:t("info.car_e"), 'left')
- InputOut = true
- end
- end
- else
- if type == "marker" then
- if currentGarage == garage then
- if garage.type ~= "depot" then
- Markers = false
- else
- HouseMarkers = false
+local function CreateBlipsZones()
+ PlayerData = QBCore.Functions.GetPlayerData()
+ PlayerGang = PlayerData.gang
+ PlayerJob = PlayerData.job
+
+ for index, garage in pairs(Config.Garages) do
+ local zone
+ if garage.showBlip then
+ CreateBlips(garage)
+ end
+ if garage.type == 'job' and (PlayerJob.name == garage.job or PlayerJob.type == garage.jobType) then
+ zone = CreateZone(index, garage, 'job')
+ elseif garage.type == 'gang' and PlayerGang.name == garage.job then
+ zone = CreateZone(index, garage, 'gang')
+ elseif garage.type == 'depot' then
+ zone = CreateZone(index, garage, 'depot')
+ elseif garage.type == 'public' then
+ zone = CreateZone(index, garage, 'public')
+ end
+
+ if zone then
+ garageZones[#garageZones + 1] = zone
+ end
+ end
+
+ local comboZone = ComboZone:Create(garageZones, { name = 'garageCombo', debugPoly = false })
+
+ comboZone:onPlayerInOut(function(isPointInside, _, zone)
+ if isPointInside then
+ listenForKey = true
+ CreateThread(function()
+ while listenForKey do
+ Wait(0)
+ if IsControlJustReleased(0, 38) then
+ if GetVehiclePedIsUsing(PlayerPedId()) ~= 0 then
+ if zone.data.type == 'depot' then return end
+ local currentVehicle = GetVehiclePedIsUsing(PlayerPedId())
+ if not IsVehicleAllowed(zone.data.category, currentVehicle) then
+ QBCore.Functions.Notify(Lang:t('error.not_correct_type'), 'error', 3500)
+ return
+ end
+ DepositVehicle(currentVehicle, zone.data)
+ else
+ OpenGarageMenu(zone.data)
+ end
end
- DestroyZone("in", index)
- DestroyZone("out", index)
- currentGarage = nil
- currentGarageIndex = nil
end
- elseif type == "hmarker" then
- HouseMarkers = false
- DestroyZone("house", index)
- elseif type == "house" then
- exports['qb-core']:HideText()
- InputIn = false
- InputOut = false
- elseif type == "in" then
- exports['qb-core']:HideText()
- InputIn = false
- elseif type == "out" then
- closeMenuFull()
- exports['qb-core']:HideText()
- InputOut = false
+ end)
+
+ local displayText = Lang:t('info.car_e')
+ if zone.data.vehicle == 'sea' then
+ displayText = Lang:t('info.sea_e')
+ elseif zone.data.vehicle == 'air' then
+ displayText = Lang:t('info.air_e')
+ elseif zone.data.vehicle == 'rig' then
+ displayText = Lang:t('info.rig_e')
+ elseif zone.data.type == 'depot' then
+ displayText = Lang:t('info.depot_e')
end
+ exports['qb-core']:DrawText(displayText, 'left')
+ else
+ listenForKey = false
+ exports['qb-core']:HideText()
end
end)
end
-local function doCarDamage(currentVehicle, veh)
- local engine = veh.engine + 0.0
- local body = veh.body + 0.0
-
- if Config.VisuallyDamageCars then
- local data = json.decode(veh.mods)
-
- for k, v in pairs(data.doorStatus) do
- if v then
- SetVehicleDoorBroken(currentVehicle, tonumber(k), true)
- end
- end
- for k, v in pairs(data.tireBurstState) do
- if v then
- SetVehicleTyreBurst(currentVehicle, tonumber(k), true)
- end
- end
- for k, v in pairs(data.windowStatus) do
- if not v then
- SmashVehicleWindow(currentVehicle, tonumber(k))
- end
- end
+local function doCarDamage(currentVehicle, stats, props)
+ local engine = stats.engine + 0.0
+ local body = stats.body + 0.0
+ if not next(props) then return end
+ for k, v in pairs(props.doorStatus) do
+ if v then SetVehicleDoorBroken(currentVehicle, tonumber(k), true) end
+ end
+ for k, v in pairs(props.tireBurstState) do
+ if v then SetVehicleTyreBurst(currentVehicle, tonumber(k), true) end
+ end
+ for k, v in pairs(props.windowStatus) do
+ if not v then SmashVehicleWindow(currentVehicle, tonumber(k)) end
end
SetVehicleEngineHealth(currentVehicle, engine)
SetVehicleBodyHealth(currentVehicle, body)
end
-local function CheckPlayers(vehicle, garage)
- for i = -1, 5, 1 do
- local seat = GetPedInVehicleSeat(vehicle, i)
- if seat then
- TaskLeaveVehicle(seat, vehicle, 0)
- if garage then
- SetEntityCoords(seat, garage.takeVehicle.x, garage.takeVehicle.y, garage.takeVehicle.z)
+function GetSpawnPoint(garage)
+ local location = nil
+ if #garage.spawnPoint > 1 then
+ local maxTries = #garage.spawnPoint
+ for i = 1, maxTries do
+ local randomIndex = math.random(1, #garage.spawnPoint)
+ local chosenSpawnPoint = garage.spawnPoint[randomIndex]
+ local isOccupied = IsPositionOccupied(
+ chosenSpawnPoint.x,
+ chosenSpawnPoint.y,
+ chosenSpawnPoint.z,
+ 5.0, -- range
+ false,
+ true, -- checkVehicles
+ false, -- checkPeds
+ false,
+ false,
+ 0,
+ false
+ )
+ if not isOccupied then
+ location = chosenSpawnPoint
+ break
end
end
+ elseif #garage.spawnPoint == 1 then
+ location = garage.spawnPoint[1]
end
- SetVehicleDoorsLocked(vehicle)
- Wait(1500)
- QBCore.Functions.DeleteVehicle(vehicle)
+ if not location then
+ QBCore.Functions.Notify(Lang:t('error.vehicle_occupied'), 'error')
+ end
+ return location
end
--- Functions
-local function round(num, numDecimalPlaces)
- return tonumber(string.format("%." .. (numDecimalPlaces or 0) .. "f", num))
-end
+-- NUI Callbacks
-RegisterNetEvent("qb-garages:client:VehicleList", function(data)
- local type = data.type
- local garage = data.garage
- local indexgarage = data.index
- local header
- local leave
- if type == "house" then
- header = Lang:t("menu.header." .. type .. "_car", { value = garage.label })
- leave = Lang:t("menu.leave.car")
+RegisterNUICallback('closeGarage', function(_, cb)
+ SetNuiFocus(false, false)
+ cb('ok')
+end)
+
+RegisterNUICallback('takeOutVehicle', function(data, cb)
+ TriggerEvent('qb-garages:client:takeOutGarage', data)
+ cb('ok')
+end)
+
+RegisterNUICallback('trackVehicle', function(plate, cb)
+ TriggerServerEvent('qb-garages:server:trackVehicle', plate)
+ cb('ok')
+end)
+
+RegisterNUICallback('takeOutDepo', function(data, cb)
+ local depotPrice = data.depotPrice
+ if depotPrice ~= 0 then
+ TriggerServerEvent('qb-garages:server:PayDepotPrice', data)
else
- header = Lang:t("menu.header." .. type .. "_" .. garage.vehicle, { value = garage.label })
- leave = Lang:t("menu.leave." .. garage.vehicle)
+ TriggerEvent('qb-garages:client:takeOutGarage', data)
end
+ cb('ok')
+end)
- QBCore.Functions.TriggerCallback("qb-garage:server:GetGarageVehicles", function(result)
- if result == nil then
- QBCore.Functions.Notify(Lang:t("error.no_vehicles"), "error", 5000)
- else
- local MenuGarageOptions = {
- {
- header = header,
- isMenuHeader = true
- },
- }
- for _, v in pairs(result) do
- local enginePercent = round(v.engine / 10, 0)
- local bodyPercent = round(v.body / 10, 0)
- local currentFuel = v.fuel
- local vname = nil
- pcall(function ()
- vname = QBCore.Shared.Vehicles[v.vehicle].name
- end)
- if v.state == 0 then
- v.state = Lang:t("status.out")
- elseif v.state == 1 then
- v.state = Lang:t("status.garaged")
- elseif v.state == 2 then
- v.state = Lang:t("status.impound")
- end
- if type == "depot" and vname ~= nil then
- MenuGarageOptions[#MenuGarageOptions + 1] = {
- header = Lang:t('menu.header.depot', { value = vname, value2 = v.depotprice }),
- txt = Lang:t('menu.text.depot', { value = v.plate, value2 = currentFuel, value3 = enginePercent, value4 = bodyPercent }),
- params = {
- event = "qb-garages:client:TakeOutDepot",
- args = {
- vehicle = v,
- type = type,
- garage = garage,
- index = indexgarage,
- }
- }
- }
- else
- --
- local txt = Lang:t('menu.text.garage', { value = v.state, value2 = currentFuel, value3 = enginePercent, value4 = bodyPercent })
- local menuHeader = Lang:t('menu.header.garage', { value = vname, value2 = v.plate })
- if vname == nil then
- menuHeader = Lang:t('menu.header.unavailable_vehicle_model', { vehicle = string.upper(v.vehicle) })
- end
- MenuGarageOptions[#MenuGarageOptions + 1] = {
- header = menuHeader,
- txt = txt,
- disabled = vname == nil,
- params = {
- event = "qb-garages:client:takeOutGarage",
- args = {
- vehicle = v,
- type = type,
- garage = garage,
- index = indexgarage,
- }
- }
- }
- end
- end
+-- Events
- MenuGarageOptions[#MenuGarageOptions + 1] = {
- header = leave,
- txt = "",
- params = {
- event = "qb-menu:closeMenu",
- }
- }
- exports['qb-menu']:openMenu(MenuGarageOptions)
- end
- end, indexgarage, type, garage.vehicle)
+RegisterNetEvent('qb-garages:client:trackVehicle', function(coords)
+ SetNewWaypoint(coords.x, coords.y)
end)
RegisterNetEvent('qb-garages:client:takeOutGarage', function(data)
local type = data.type
local vehicle = data.vehicle
local garage = data.garage
- local index = data.index
- QBCore.Functions.TriggerCallback('qb-garage:server:IsSpawnOk', function(spawn)
+ local plate = data.plate
+ local stats = data.stats
+ QBCore.Functions.TriggerCallback('qb-garages:server:IsSpawnOk', function(spawn)
if spawn then
- local location
- if type == "house" then
- if garage.takeVehicle.h then garage.takeVehicle.w = garage.takeVehicle.h end -- backward compatibility
- location = garage.takeVehicle
- else
- location = garage.spawnPoint
- end
- QBCore.Functions.TriggerCallback('qb-garage:server:spawnvehicle', function(netId, properties)
+ local location = GetSpawnPoint(garage)
+ QBCore.Functions.TriggerCallback('qb-garages:server:spawnvehicle', function(netId, properties)
local veh = NetToVeh(netId)
QBCore.Functions.SetVehicleProperties(veh, properties)
- exports['LegacyFuel']:SetFuel(veh, vehicle.fuel)
- doCarDamage(veh, vehicle)
- TriggerServerEvent('qb-garage:server:updateVehicleState', 0, vehicle.plate, index)
- closeMenuFull()
- TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(veh))
+ exports[Config.FuelResource]:SetFuel(veh, vehicle.fuel)
+ TriggerServerEvent('qb-garages:server:updateVehicleState', 0, plate)
+ TriggerEvent('vehiclekeys:client:SetOwner', QBCore.Functions.GetPlate(veh))
+ if Config.VisuallyDamageCars then doCarDamage(veh, stats, properties) end
SetVehicleEngineOn(veh, true, true)
- if type == "house" then
- exports['qb-core']:DrawText(Lang:t("info.park_e"), 'left')
- InputOut = false
- InputIn = true
- end
- end, vehicle, location, true)
+ end, plate, vehicle, location, true)
else
- QBCore.Functions.Notify(Lang:t("error.not_impound"), "error", 5000)
+ QBCore.Functions.Notify(Lang:t('error.not_depot'), 'error', 5000)
end
- end, vehicle.plate, type)
+ end, plate, type)
end)
-local function enterVehicle(veh, indexgarage, type, garage)
- local plate = QBCore.Functions.GetPlate(veh)
- if GetVehicleNumberOfPassengers(veh) == 0 then
- QBCore.Functions.TriggerCallback('qb-garage:server:checkOwnership', function(owned)
- if owned then
- local bodyDamage = math.ceil(GetVehicleBodyHealth(veh))
- local engineDamage = math.ceil(GetVehicleEngineHealth(veh))
- local totalFuel = exports['LegacyFuel']:GetFuel(veh)
- TriggerServerEvent("qb-vehicletuning:server:SaveVehicleProps", QBCore.Functions.GetVehicleProperties(veh))
- TriggerServerEvent('qb-garage:server:updateVehicle', 1, totalFuel, engineDamage, bodyDamage, plate, indexgarage, type, PlayerGang.name)
- CheckPlayers(veh, garage)
- if type == "house" then
- exports['qb-core']:DrawText(Lang:t("info.car_e"), 'left')
- InputOut = true
- InputIn = false
- end
+-- Housing calls
+
+local houseGarageZones = {}
+local listenForKeyHouse = false
+local houseComboZones = nil
+
+local function CreateHouseZone(index, garage, zoneType)
+ local houseZone = CircleZone:Create(garage.takeVehicle, 5.0, {
+ name = zoneType .. '_' .. index,
+ debugPoly = false,
+ data = {
+ indexgarage = index,
+ type = zoneType,
+ }
+ })
- if plate then
- TriggerServerEvent('qb-garages:server:UpdateOutsideVehicle', plate, nil)
+ if houseZone then
+ houseGarageZones[#houseGarageZones + 1] = houseZone
+
+ if not houseComboZones then
+ houseComboZones = ComboZone:Create(houseGarageZones, { name = 'houseComboZones', debugPoly = true })
+ else
+ houseComboZones:AddZone(houseZone)
+ end
+ end
+
+ houseComboZones:onPlayerInOut(function(isPointInside, _, zone)
+ if isPointInside then
+ listenForKeyHouse = true
+ CreateThread(function()
+ while listenForKeyHouse do
+ Wait(0)
+ if IsControlJustReleased(0, 38) then
+ if GetVehiclePedIsUsing(PlayerPedId()) ~= 0 then
+ local currentVehicle = GetVehiclePedIsUsing(PlayerPedId())
+ DepositVehicle(currentVehicle, zone.data)
+ else
+ OpenGarageMenu(zone.data)
+ end
+ end
end
- QBCore.Functions.Notify(Lang:t("success.vehicle_parked"), "primary", 4500)
- else
- QBCore.Functions.Notify(Lang:t("error.not_owned"), "error", 3500)
- end
- end, plate, type, indexgarage, PlayerGang.name)
- else
- QBCore.Functions.Notify(Lang:t("error.vehicle_occupied"), "error", 5000)
+ end)
+ exports['qb-core']:DrawText(Lang:t('info.house_garage'), 'left')
+ else
+ listenForKeyHouse = false
+ exports['qb-core']:HideText()
+ end
+ end)
+end
+
+local function ZoneExists(zoneName)
+ for _, zone in ipairs(houseGarageZones) do
+ if zone.name == zoneName then
+ return true
+ end
end
+ return false
end
-local function CreateBlipsZones()
- if blipsZonesLoaded then return end
- PlayerData = QBCore.Functions.GetPlayerData()
- PlayerGang = PlayerData.gang
- PlayerJob = PlayerData.job
- local function blipZoneGen(setloc)
- local Garage = AddBlipForCoord(setloc.takeVehicle.x, setloc.takeVehicle.y, setloc.takeVehicle.z)
- SetBlipSprite(Garage, setloc.blipNumber)
- SetBlipDisplay(Garage, 4)
- SetBlipScale(Garage, 0.60)
- SetBlipAsShortRange(Garage, true)
- SetBlipColour(Garage, setloc.blipColor)
- BeginTextCommandSetBlipName("STRING")
- AddTextComponentSubstringPlayerName(setloc.blipName)
- EndTextCommandSetBlipName(Garage)
+
+local function RemoveHouseZone(zoneName)
+ local removedZone = houseComboZones:RemoveZone(zoneName)
+ if removedZone then
+ removedZone:destroy()
end
- for index, garage in pairs(Config.Garages) do
- if garage.showBlip then
- blipZoneGen(garage);
- end
- if garage.type == "job" then
- if PlayerJob.name == garage.job or PlayerJob.type == garage.jobType then
- CreateZone("marker", garage, index)
- end
- elseif garage.type == "gang" then
- if PlayerGang.name == garage.job then
- CreateZone("marker", garage, index)
- end
- else
- CreateZone("marker", garage, index)
+ for index, zone in ipairs(houseGarageZones) do
+ if zone.name == zoneName then
+ table.remove(houseGarageZones, index)
+ break
end
end
- blipsZonesLoaded = true
end
-RegisterNetEvent('qb-garages:client:setHouseGarage', function(house, hasKey)
- if Config.HouseGarages[house] then
- if lasthouse ~= house then
- if lasthouse then
- DestroyZone("hmarker", lasthouse)
- end
- if hasKey and Config.HouseGarages[house].takeVehicle.x then
- CreateZone("hmarker", Config.HouseGarages[house], house)
- lasthouse = house
- end
+RegisterNetEvent('qb-garages:client:setHouseGarage', function(house, hasKey) -- event sent periodically from housing
+ if not house then return end
+ local formattedHouseName = string.gsub(string.lower(house), ' ', '')
+ local zoneName = 'house_' .. formattedHouseName
+ if Config.Garages[formattedHouseName] then
+ if hasKey and not ZoneExists(zoneName) then
+ CreateHouseZone(formattedHouseName, Config.Garages[formattedHouseName], 'house')
+ elseif not hasKey and ZoneExists(zoneName) then
+ RemoveHouseZone(zoneName)
end
end
end)
-RegisterNetEvent('qb-garages:client:houseGarageConfig', function(garageConfig)
- Config.HouseGarages = garageConfig
+RegisterNetEvent('qb-garages:client:houseGarageConfig', function(houseGarages)
+ for _, garageConfig in pairs(houseGarages) do
+ local formattedHouseName = string.gsub(string.lower(garageConfig.label), ' ', '')
+ if garageConfig.takeVehicle and garageConfig.takeVehicle.x and garageConfig.takeVehicle.y and garageConfig.takeVehicle.z and garageConfig.takeVehicle.w then
+ Config.Garages[formattedHouseName] = {
+ takeVehicle = vector3(garageConfig.takeVehicle.x, garageConfig.takeVehicle.y, garageConfig.takeVehicle.z),
+ spawnPoint = {
+ vector4(garageConfig.takeVehicle.x, garageConfig.takeVehicle.y, garageConfig.takeVehicle.z, garageConfig.takeVehicle.w)
+ },
+ label = garageConfig.label,
+ type = 'house',
+ }
+ end
+ end
end)
-RegisterNetEvent('qb-garages:client:addHouseGarage', function(house, garageInfo)
- Config.HouseGarages[house] = garageInfo
+RegisterNetEvent('qb-garages:client:addHouseGarage', function(house, garageInfo) -- event from housing on garage creation
+ local formattedHouseName = string.gsub(string.lower(house), ' ', '')
+ Config.Garages[formattedHouseName] = {
+ takeVehicle = vector3(garageInfo.takeVehicle.x, garageInfo.takeVehicle.y, garageInfo.takeVehicle.z),
+ spawnPoint = {
+ vector4(garageInfo.takeVehicle.x, garageInfo.takeVehicle.y, garageInfo.takeVehicle.z, garageInfo.takeVehicle.w)
+ },
+ label = garageInfo.label,
+ type = 'house',
+ }
end)
+-- Handlers
+
AddEventHandler('QBCore:Client:OnPlayerLoaded', function()
CreateBlipsZones()
end)
-AddEventHandler("onResourceStart", function(res)
+AddEventHandler('onResourceStart', function(res)
if res ~= GetCurrentResourceName() then return end
CreateBlipsZones()
end)
@@ -468,122 +418,3 @@ end)
RegisterNetEvent('QBCore:Client:OnJobUpdate', function(job)
PlayerJob = job
end)
-
-RegisterNetEvent('qb-garages:client:TakeOutDepot', function(data)
- local vehicle = data.vehicle
-
- if vehicle.depotprice ~= 0 then
- TriggerServerEvent("qb-garage:server:PayDepotPrice", data)
- else
- TriggerEvent("qb-garages:client:takeOutGarage", data)
- end
-end)
-
--- Threads
-CreateThread(function()
- local sleep
- while true do
- sleep = 2000
- if currentGarage ~= nil then
- if Markers then
- if currentGarage.putVehicle then
- DrawMarker(2, currentGarage.putVehicle.x, currentGarage.putVehicle.y, currentGarage.putVehicle.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.2, 0.15, 255, 255, 255, 255, false, false, false, true, false, false, false)
- end
- DrawMarker(2, currentGarage.takeVehicle.x, currentGarage.takeVehicle.y, currentGarage.takeVehicle.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.2, 0.15, 200, 0, 0, 222, false, false, false, true, false, false, false)
- sleep = 0
- elseif HouseMarkers then
- DrawMarker(2, currentGarage.takeVehicle.x, currentGarage.takeVehicle.y, currentGarage.takeVehicle.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.2, 0.15, 200, 0, 0, 222, false, false, false, true, false, false, false)
- sleep = 0
- end
- if InputIn or InputOut then
- if IsControlJustReleased(0, 38) then
- if InputIn then
- local ped = PlayerPedId()
- local curVeh = GetVehiclePedIsIn(ped)
- local vehClass = GetVehicleClass(curVeh)
- --Check vehicle type for garage
- if currentGarage.vehicle == "car" or not currentGarage.vehicle then
- if vehClass ~= 10 and vehClass ~= 14 and vehClass ~= 15 and vehClass ~= 16 and vehClass ~= 20 then
- if currentGarage.type == "job" then
- if PlayerJob.name == currentGarage.job or PlayerJob.type == currentGarage.jobType then
- enterVehicle(curVeh, currentGarageIndex, currentGarage.type)
- end
- elseif currentGarage.type == "gang" then
- if PlayerGang.name == currentGarage.job or PlayerJob.type == currentGarage.jobType then
- enterVehicle(curVeh, currentGarageIndex, currentGarage.type)
- end
- else
- enterVehicle(curVeh, currentGarageIndex, currentGarage.type)
- end
- else
- QBCore.Functions.Notify(Lang:t("error.not_correct_type"), "error", 3500)
- end
- elseif currentGarage.vehicle == "air" then
- if vehClass == 15 or vehClass == 16 then
- if currentGarage.type == "job" then
- if PlayerJob.name == currentGarage.job or PlayerJob.type == currentGarage.jobType then
- enterVehicle(curVeh, currentGarageIndex, currentGarage.type)
- end
- elseif currentGarage.type == "gang" then
- if PlayerGang.name == currentGarage.job or PlayerJob.type == currentGarage.jobType then
- enterVehicle(curVeh, currentGarageIndex, currentGarage.type)
- end
- else
- enterVehicle(curVeh, currentGarageIndex, currentGarage.type)
- end
- else
- QBCore.Functions.Notify(Lang:t("error.not_correct_type"), "error", 3500)
- end
- elseif currentGarage.vehicle == "sea" then
- if vehClass == 14 then
- if currentGarage.type == "job" then
- if PlayerJob.name == currentGarage.job then
- enterVehicle(curVeh, currentGarageIndex, currentGarage.type, currentGarage)
- end
- elseif currentGarage.type == "gang" then
- if PlayerGang.name == currentGarage.job then
- enterVehicle(curVeh, currentGarageIndex, currentGarage.type, currentGarage)
- end
- else
- enterVehicle(curVeh, currentGarageIndex, currentGarage.type, currentGarage)
- end
- else
- QBCore.Functions.Notify(Lang:t("error.not_correct_type"), "error", 3500)
- end
- elseif currentGarage.vehicle == "rig" then
- if vehClass == 10 or vehClass == 11 or vehClass == 12 or vehClass == 20 then
- if currentGarage.type == "job" then
- if PlayerJob.name == currentGarage.job then
- enterVehicle(curVeh, currentGarageIndex, currentGarage.type, currentGarage)
- end
- elseif currentGarage.type == "gang" then
- if PlayerGang.name == currentGarage.job then
- enterVehicle(curVeh, currentGarageIndex, currentGarage.type, currentGarage)
- end
- else
- enterVehicle(curVeh, currentGarageIndex, currentGarage.type, currentGarage)
- end
- else
- QBCore.Functions.Notify(Lang:t("error.not_correct_type"), "error", 3500)
- end
- end
- elseif InputOut then
- if currentGarage.type == "job" then
- if PlayerJob.name == currentGarage.job then
- MenuGarage(currentGarage.type, currentGarage, currentGarageIndex)
- end
- elseif currentGarage.type == "gang" then
- if PlayerGang.name == currentGarage.job then
- MenuGarage(currentGarage.type, currentGarage, currentGarageIndex)
- end
- else
- MenuGarage(currentGarage.type, currentGarage, currentGarageIndex)
- end
- end
- end
- sleep = 0
- end
- end
- Wait(sleep)
- end
-end)
diff --git a/config.lua b/config.lua
index 9b48368..96cb7ad 100644
--- a/config.lua
+++ b/config.lua
@@ -1,446 +1,514 @@
-Config = Config or {}
-Config.AutoRespawn = false --True == auto respawn cars that are outside into your garage on script restart, false == does not put them into your garage and players have to go to the impound
-Config.SharedGarages = false --True == Gang and job garages are shared, false == Gang and Job garages are personal
-Config.VisuallyDamageCars = true --True == Visually damage cars that go out of the garage depending of body damage, false == Do not visually damage cars (damage is still applied to car values)
-Config.SharedPublicGarages = false --Ture All public garages can access all vehicle of player that parked in garage type "public", -- False player can't access another public garages from anywhere (this is original behavior of script)
+Config = {}
+Config.AutoRespawn = false -- true == stores cars in garage on restart | false == doesnt modify car states
+Config.VisuallyDamageCars = true -- true == damage car on spawn | false == no damage on spawn
+Config.SharedGarages = false -- true == take any car from any garage | false == only take car from garage stored in
+Config.ClassSystem = true -- true == restrict vehicles by class | false == any vehicle class in any garage
+Config.FuelResource = 'LegacyFuel' -- supports any that has a GetFuel() and SetFuel() export
+
+-- https://docs.fivem.net/natives/?_0x29439776AAA00A62
+Config.VehicleClass = {
+ all = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 },
+ car = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 18, 22 },
+ air = { 15, 16 },
+ sea = { 14 },
+ rig = { 10, 11, 17, 19, 20 }
+}
Config.Garages = {
- ["motelgarage"] = {
- ["label"] = "Motel Parking",
- ["takeVehicle"] = vector3(273.43, -343.99, 44.91),
- ["spawnPoint"] = vector4(270.94, -342.96, 43.97, 161.5),
- ["putVehicle"] = vector3(276.69, -339.85, 44.91),
- ["showBlip"] = true,
- ["blipName"] = "Public Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- ["casinogarage"] = {
- ["label"] = "Casino Parking",
- ["takeVehicle"] = vector3(925.3, 51.85, 81.11),
- ["spawnPoint"] = vector4(918.77, 51.73, 80.16, 329.43),
- ["putVehicle"] = vector3(914.92, 37.85, 80.07),
- ["showBlip"] = true,
- ["blipName"] = "Public Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- ["sapcounsel"] = {
- ["label"] = "San Andreas Parking",
- ["takeVehicle"] = vector3(-330.01, -780.33, 33.96),
- ["spawnPoint"] = vector4(-334.44, -780.75, 33.96, 137.5),
- ["putVehicle"] = vector3(-336.31, -774.93, 33.96),
- ["showBlip"] = true,
- ["blipName"] = "Public Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- ["spanishave"] = {
- ["label"] = "Spanish Ave Parking",
- ["takeVehicle"] = vector3(-1160.86, -741.41, 19.63),
- ["spawnPoint"] = vector4(-1163.88, -749.32, 18.42, 35.5),
- ["putVehicle"] = vector3(-1147.58, -738.11, 19.31),
- ["showBlip"] = true,
- ["blipName"] = "Public Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- ["caears24"] = {
- ["label"] = "Caears 24 Parking",
- ["takeVehicle"] = vector3(69.84, 12.6, 68.96),
- ["spawnPoint"] = vector4(73.21, 10.72, 68.83, 163.5),
- ["putVehicle"] = vector3(65.43, 21.19, 69.47),
- ["showBlip"] = true,
- ["blipName"] = "Public Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- ["caears242"] = {
- ["label"] = "Caears 24 Parking",
- ["takeVehicle"] = vector3(-475.31, -818.73, 30.46),
- ["spawnPoint"] = vector4(-472.03, -815.47, 30.5, 177.5),
- ["putVehicle"] = vector3(-453.6, -817.08, 30.61),
- ["showBlip"] = true,
- ["blipName"] = "Public Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- ["lagunapi"] = {
- ["label"] = "Laguna Parking",
- ["takeVehicle"] = vector3(364.37, 297.83, 103.49),
- ["spawnPoint"] = vector4(367.49, 297.71, 103.43, 340.5),
- ["putVehicle"] = vector3(363.04, 283.51, 103.38),
- ["showBlip"] = true,
- ["blipName"] = "Public Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- ["airportp"] = {
- ["label"] = "Airport Parking",
- ["takeVehicle"] = vector3(-796.86, -2024.85, 8.88),
- ["spawnPoint"] = vector4(-800.41, -2016.53, 9.32, 48.5),
- ["putVehicle"] = vector3(-804.84, -2023.21, 9.16),
- ["showBlip"] = true,
- ["blipName"] = "Public Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- ["beachp"] = {
- ["label"] = "Beach Parking",
- ["takeVehicle"] = vector3(-1183.1, -1511.11, 4.36),
- ["spawnPoint"] = vector4(-1181.0, -1505.98, 4.37, 214.5),
- ["putVehicle"] = vector3(-1176.81, -1498.63, 4.37),
- ["showBlip"] = true,
- ["blipName"] = "Public Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- ["themotorhotel"] = {
- ["label"] = "The Motor Hotel Parking",
- ["takeVehicle"] = vector3(1137.77, 2663.54, 37.9),
- ["spawnPoint"] = vector4(1137.69, 2673.61, 37.9, 359.5),
- ["putVehicle"] = vector3(1137.75, 2652.95, 37.9),
- ["showBlip"] = true,
- ["blipName"] = "Public Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- ["liqourparking"] = {
- ["label"] = "Liqour Parking",
- ["takeVehicle"] = vector3(934.95, 3606.59, 32.81),
- ["spawnPoint"] = vector4(941.57, 3619.99, 32.5, 141.5),
- ["putVehicle"] = vector3(939.37, 3612.25, 32.69),
- ["showBlip"] = true,
- ["blipName"] = "Public Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- ["shoreparking"] = {
- ["label"] = "Shore Parking",
- ["takeVehicle"] = vector3(1726.21, 3707.16, 34.17),
- ["spawnPoint"] = vector4(1730.31, 3711.07, 34.2, 20.5),
- ["putVehicle"] = vector3(1737.13, 3718.91, 34.04),
- ["showBlip"] = true,
- ["blipName"] = "Public Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- ["haanparking"] = {
- ["label"] = "Bell Farms Parking",
- ["takeVehicle"] = vector3(78.34, 6418.74, 31.28),
- ["spawnPoint"] = vector4(70.71, 6425.16, 30.92, 68.5),
- ["putVehicle"] = vector3(85.3, 6427.52, 31.33),
- ["showBlip"] = true,
- ["blipName"] = "Public Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- ["dumbogarage"] = {
- ["label"] = "Dumbo Private Parking",
- ["takeVehicle"] = vector3(157.26, -3240.00, 7.00),
- ["spawnPoint"] = vector4(165.32, -3236.10, 5.93, 268.5),
- ["putVehicle"] = vector3(165.32, -3230.00, 5.93),
- ["showBlip"] = true,
- ["blipName"] = "Public Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- ["pillboxgarage"] = {
- ["label"] = "Pillbox Garage Parking",
- ["takeVehicle"] = vector3(215.9499, -809.698, 30.731),
- ["spawnPoint"] = vector4(234.1942, -787.066, 30.193, 159.6),
- ["putVehicle"] = vector3(218.0894, -781.370, 30.389),
- ["showBlip"] = true,
- ["blipName"] = "Public Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- --[[ ["hayesdepot"] = {
- ["label"] = "Hayes Depot",
- ["takeVehicle"] = vector3(491.0, -1314.69, 29.25),
- ["spawnPoint"] = vector4(491.0, -1314.69, 29.25, 304.5),
- ["showBlip"] = true,
- ["blipName"] = "Hayes Depot",
- ["blipNumber"] = 68,
- ["blipColor"] = 3,
- ["type"] = "depot", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- }, --]]
- ["impoundlot"] = {
- ["label"] = "Impound Lot",
- ["takeVehicle"] = vector3(409.89, -1623.51, 29.29),
- ["spawnPoint"] = vector4(407.92, -1646.29, 29.29, 226.39),
- ["showBlip"] = true,
- ["blipName"] = "Impound Lot",
- ["blipNumber"] = 68,
- ["blipColor"] = 3,
- ["type"] = "depot", --public, job, gang, depot
- ["vehicle"] = "car" --car, air, sea, rig
- },
- ["ballas"] = {
- ["label"] = "Ballas",
- ["takeVehicle"] = vector3(98.50, -1954.49, 20.84),
- ["spawnPoint"] = vector4(98.50, -1954.49, 20.75, 335.73),
- ["putVehicle"] = vector3(94.75, -1959.93, 20.84),
- ["showBlip"] = false,
- ["blipName"] = "Ballas",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "gang", --public, job, gang, depot
- ["vehicle"] = "car", --car, air, sea, rig
- ["job"] = "ballas",
- ["jobType"] = "ballas"
- },
- ["families"] = {
- ["label"] = "La Familia",
- ["takeVehicle"] = vector3(-811.65, 187.49, 72.48),
- ["spawnPoint"] = vector4(-818.43, 184.97, 72.28, 107.85),
- ["putVehicle"] = vector3(-811.65, 187.49, 72.48),
- ["showBlip"] = false,
- ["blipName"] = "La Familia",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "gang", --public, job, gang, depot
- ["vehicle"] = "car", --car, air, sea, rig
- ["job"] = "families",
- ["jobType"] = "families"
- },
- ["lostmc"] = {
- ["label"] = "Lost MC",
- ["takeVehicle"] = vector3(957.25, -129.63, 74.39),
- ["spawnPoint"] = vector4(957.25, -129.63, 74.39, 199.21),
- ["putVehicle"] = vector3(950.47, -122.05, 74.36),
- ["showBlip"] = false,
- ["blipName"] = "Lost MC",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "gang", --public, job, gang, depot
- ["vehicle"] = "car", --car, air, sea, rig
- ["job"] = "lostmc",
- ["jobType"] = "lostmc"
- },
- ["cartel"] = {
- ["label"] = "Cartel",
- ["takeVehicle"] = vector3(1407.18, 1118.04, 114.84),
- ["spawnPoint"] = vector4(1407.18, 1118.04, 114.84, 88.34),
- ["putVehicle"] = vector3(1407.18, 1118.04, 114.84),
- ["showBlip"] = false,
- ["blipName"] = "Cartel",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "gang", --public, job, gang, depot
- ["vehicle"] = "car", --car, air, sea, rig
- ["job"] = "cartel",
- ["jobType"] = "cartel"
- },
- ["police"] = {
- ["label"] = "Police",
- ["takeVehicle"] = vector3(454.6, -1017.4, 28.4),
- ["spawnPoint"] = vector4(438.4, -1018.3, 27.7, 90.0),
- ["putVehicle"] = vector3(452.88, -1006.98, 27.5),
- ["showBlip"] = false,
- ["blipName"] = "Police",
- ["blipNumber"] = 357,
- ["blipColor"] = 3,
- ["type"] = "job", --public, job, gang, depot
- ["vehicle"] = "car", --car, air, sea, rig
- ["job"] = "police",
- ["jobType"] = "leo"
- },
- ["intairport"] = {
- ["label"] = "Airport Hangar",
- ["takeVehicle"] = vector3(-1025.92, -3017.86, 13.95),
- ["spawnPoint"] = vector4(-979.2, -2995.51, 13.95, 52.19),
- ["putVehicle"] = vector3(-1003.38, -3008.87, 13.95),
- ["showBlip"] = true,
- ["blipName"] = "Hangar",
- ["blipNumber"] = 360,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "air" --car, air, sea, rig
- },
- ["higginsheli"] = {
- ["label"] = "Higgins Helitours",
- ["takeVehicle"] = vector3(-722.15, -1472.79, 5.0),
- ["spawnPoint"] = vector4(-724.83, -1443.89, 5.0, 140.1),
- ["putVehicle"] = vector3(-745.48, -1468.46, 5.0),
- ["showBlip"] = true,
- ["blipName"] = "Hangar",
- ["blipNumber"] = 360,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "air" --car, air, sea, rig
- },
- ["airsshores"] = {
- ["label"] = "Sandy Shores Hangar",
- ["takeVehicle"] = vector3(1758.19, 3296.66, 41.14),
- ["spawnPoint"] = vector4(1740.98, 3279.08, 41.75, 106.77),
- ["putVehicle"] = vector3(1740.4, 3283.92, 41.1),
- ["showBlip"] = true,
- ["blipName"] = "Hangar",
- ["blipNumber"] = 360,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "air" --car, air, sea, rig
- },
- ["airdepot"] = {
- ["label"] = "Air Depot",
- ["takeVehicle"] = vector3(-1243.29, -3392.3, 13.94),
- ["spawnPoint"] = vector4(-1269.67, -3377.74, 13.94, 327.88),
- ["showBlip"] = true,
- ["blipName"] = "Air Depot",
- ["blipNumber"] = 359,
- ["blipColor"] = 3,
- ["type"] = "depot", --public, job, gang, depot
- ["vehicle"] = "air" --car, air, sea, rig
- },
- ["lsymc"] = {
- ["label"] = "LSYMC Boathouse",
- ["takeVehicle"] = vector3(-794.66, -1510.83, 1.59),
- ["spawnPoint"] = vector4(-793.58, -1501.4, 0.12, 111.5),
- ["putVehicle"] = vector3(-793.58, -1501.4, 0.12),
- ["showBlip"] = true,
- ["blipName"] = "Boathouse",
- ["blipNumber"] = 356,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "sea" --car, air, sea, rig
- },
- ["paleto"] = {
- ["label"] = "Paleto Boathouse",
- ["takeVehicle"] = vector3(-277.46, 6637.2, 7.48),
- ["spawnPoint"] = vector4(-289.2, 6637.96, 1.01, 45.5),
- ["putVehicle"] = vector3(-289.2, 6637.96, 1.01),
- ["showBlip"] = true,
- ["blipName"] = "Boathouse",
- ["blipNumber"] = 356,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "sea" --car, air, sea, rig
- },
- ["millars"] = {
- ["label"] = "Millars Boathouse",
- ["takeVehicle"] = vector3(1299.24, 4216.69, 33.9),
- ["spawnPoint"] = vector4(1297.82, 4209.61, 30.12, 253.5),
- ["putVehicle"] = vector3(1297.82, 4209.61, 30.12),
- ["showBlip"] = true,
- ["blipName"] = "Boathouse",
- ["blipNumber"] = 356,
- ["blipColor"] = 3,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "sea" --car, air, sea, rig
- },
- ["seadepot"] = {
- ["label"] = "LSYMC Depot",
- ["takeVehicle"] = vector3(-772.98, -1430.76, 1.59),
- ["spawnPoint"] = vector4(-729.77, -1355.49, 1.19, 142.5),
- ["showBlip"] = true,
- ["blipName"] = "LSYMC Depot",
- ["blipNumber"] = 356,
- ["blipColor"] = 3,
- ["type"] = "depot", --public, job, gang, depot
- ["vehicle"] = "sea" --car, air, sea, rig
- },
- ["rigdepot"] = {
- ["label"] = "Big Rig Depot",
- ["takeVehicle"] = vector3(2373.64, 3104.58, 48.05),
- ["spawnPoint"] = vector4(2373.63, 3110.19, 48.12, 123.26),
- ["showBlip"] = true,
- ["blipName"] = "Big Rig Depot",
- ["blipNumber"] = 68,
- ["blipColor"] = 2,
- ["type"] = "depot", --public, job, gang, depot
- ["vehicle"] = "rig" --car, air, sea, rig
- },
- ["dumborigparking"] = {
- ["label"] = "Dumbo Big Rig Parking",
- ["takeVehicle"] = vector3(161.23, -3188.73, 5.97),
- ["spawnPoint"] = vector4(172.59, -3178.28, 5.79, 269.66),
- ["putVehicle"] =vector3(172.64, -3182.48, 5.79),
- ["showBlip"] = true,
- ["blipName"] = "Big Rig Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 2,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "rig" --car, air, sea, rig
- },
- ["popsrigparking"] = {
- ["label"] = "Pop's Big Rig Parking",
- ["takeVehicle"] = vector3(121.05, 6587.59, 32.09),
- ["spawnPoint"] = vector4(131.08, 6589.77, 31.99, 272.9),
- ["putVehicle"] = vector3(126.08, 6595.23, 31.95),
- ["showBlip"] = true,
- ["blipName"] = "Big Rig Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 2,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "rig" --car, air, sea, rig
- },
- ["ronsrigparking"] = {
- ["label"] = "Ron's Big Rig Parking",
- ["takeVehicle"] = vector3(-2523.99, 2319.13, 33.22),
- ["spawnPoint"] = vector4(-2531.0, 2335.86, 33.13, 210.88),
- ["putVehicle"] = vector3(-2526.56, 2335.61, 33.06),
- ["showBlip"] = true,
- ["blipName"] = "Big Rig Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 2,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "rig" --car, air, sea, rig
- },
- ["ronsrigparking2"] = {
- ["label"] = "Ron's Big Rig Parking",
- ["takeVehicle"] = vector3(2567.7, 463.03, 108.6),
- ["spawnPoint"] = vector4(2555.24, 446.92, 108.52, 314.79),
- ["putVehicle"] = vector3(2558.69, 425.04, 108.52),
- ["showBlip"] = true,
- ["blipName"] = "Big Rig Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 2,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "rig" --car, air, sea, rig
- },
- ["ronsrigparking3"] = {
- ["label"] = "Ron's Big Rig Parking",
- ["takeVehicle"] = vector3(-23.63, -2551.7, 6.14),
- ["spawnPoint"] = vector4(-32.81, -2536.0, 6.07, 53.26),
- ["putVehicle"] = vector3(-36.32, -2541.84, 6.07),
- ["showBlip"] = true,
- ["blipName"] = "Big Rig Parking",
- ["blipNumber"] = 357,
- ["blipColor"] = 2,
- ["type"] = "public", --public, job, gang, depot
- ["vehicle"] = "rig" --car, air, sea, rig
+ motelgarage = {
+ label = 'Motel Parking',
+ takeVehicle = vector3(274.29, -334.15, 44.92),
+ spawnPoint = {
+ vector4(265.96, -332.3, 44.51, 250.68)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public', -- public, gang, job, depot
+ category = Config.VehicleClass['car']
+ },
+ casinogarage = {
+ label = 'Casino Parking',
+ takeVehicle = vector3(883.96, -4.71, 78.76),
+ spawnPoint = {
+ vector4(895.39, -4.75, 78.35, 146.85)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['car']
+ },
+ sapcounsel = {
+ label = 'San Andreas Parking',
+ takeVehicle = vector3(-330.01, -780.33, 33.96),
+ spawnPoint = {
+ vector4(-341.57, -767.45, 33.56, 92.61)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['car']
+ },
+ spanishave = {
+ label = 'Spanish Ave Parking',
+ takeVehicle = vector3(-1160.86, -741.41, 19.63),
+ spawnPoint = {
+ vector4(-1145.2, -745.42, 19.26, 108.22)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['car']
+ },
+ caears24 = {
+ label = 'Caears 24 Parking',
+ takeVehicle = vector3(69.84, 12.6, 68.96),
+ spawnPoint = {
+ vector4(60.8, 17.54, 68.82, 339.7)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['car']
+ },
+ caears242 = {
+ label = 'Caears 24 Parking',
+ takeVehicle = vector3(-453.7, -786.78, 30.56),
+ spawnPoint = {
+ vector4(-472.39, -787.71, 30.14, 180.52)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['car']
+ },
+ lagunapi = {
+ label = 'Laguna Parking',
+ takeVehicle = vector3(364.37, 297.83, 103.49),
+ spawnPoint = {
+ vector4(375.09, 294.66, 102.86, 164.04)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['car']
+ },
+ airportp = {
+ label = 'Airport Parking',
+ takeVehicle = vector3(-773.12, -2033.04, 8.88),
+ spawnPoint = {
+ vector4(-779.77, -2040.18, 8.47, 315.34)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['car']
+ },
+ beachp = {
+ label = 'Beach Parking',
+ takeVehicle = vector3(-1185.32, -1500.64, 4.38),
+ spawnPoint = {
+ vector4(-1188.14, -1487.95, 3.97, 124.06)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['car']
+ },
+ themotorhotel = {
+ label = 'The Motor Hotel Parking',
+ takeVehicle = vector3(1137.77, 2663.54, 37.9),
+ spawnPoint = {
+ vector4(1127.7, 2647.84, 37.58, 1.41)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['car']
+ },
+ liqourparking = {
+ label = 'Liqour Parking',
+ takeVehicle = vector3(883.99, 3649.67, 32.87),
+ spawnPoint = {
+ vector4(898.38, 3649.41, 32.36, 90.75)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['car']
+ },
+ shoreparking = {
+ label = 'Shore Parking',
+ takeVehicle = vector3(1737.03, 3718.88, 34.05),
+ spawnPoint = {
+ vector4(1725.4, 3716.78, 34.15, 20.54)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['car']
+ },
+ haanparking = {
+ label = 'Bell Farms Parking',
+ takeVehicle = vector3(76.88, 6397.3, 31.23),
+ spawnPoint = {
+ vector4(62.15, 6403.41, 30.81, 211.38)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['car']
+ },
+ dumbogarage = {
+ label = 'Dumbo Private Parking',
+ takeVehicle = vector3(165.75, -3227.2, 5.89),
+ spawnPoint = {
+ vector4(168.34, -3236.1, 5.43, 272.05)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['car']
+ },
+ pillboxgarage = {
+ label = 'Pillbox Garage Parking',
+ takeVehicle = vector3(213.2, -796.05, 30.86),
+ spawnPoint = {
+ vector4(222.02, -804.19, 30.26, 248.19),
+ vector4(223.93, -799.11, 30.25, 248.53),
+ vector4(226.46, -794.33, 30.24, 248.29),
+ vector4(232.33, -807.97, 30.02, 69.17),
+ vector4(234.42, -802.76, 30.04, 67.2)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['car']
+ },
+ grapeseedgarage = {
+ label = 'Grapeseed Parking',
+ takeVehicle = vector3(2552.68, 4671.8, 33.95),
+ spawnPoint = {
+ vector4(2550.17, 4681.96, 33.81, 17.05)
+ },
+ showBlip = true,
+ blipName = 'Public Parking',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['car']
+ },
+ depotLot = {
+ label = 'Depot Lot',
+ takeVehicle = vector3(401.76, -1632.57, 29.29),
+ spawnPoint = {
+ vector4(396.55, -1643.93, 28.88, 321.91)
+ },
+ showBlip = true,
+ blipName = 'Depot Lot',
+ blipNumber = 68,
+ blipColor = 3,
+ type = 'depot',
+ category = Config.VehicleClass['car']
+ },
+ ballas = {
+ label = 'Ballas',
+ takeVehicle = vector3(87.51, -1969.1, 20.75),
+ spawnPoint = {
+ vector4(93.78, -1961.73, 20.34, 319.11)
+ },
+ showBlip = false,
+ blipName = 'Ballas',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'gang',
+ category = Config.VehicleClass['car'], --car, air, sea, rig
+ job = 'ballas',
+ jobType = 'ballas'
+ },
+ families = {
+ label = 'Families',
+ takeVehicle = vector3(-23.89, -1436.03, 30.65),
+ spawnPoint = {
+ vector4(-25.47, -1445.76, 30.24, 178.5)
+ },
+ showBlip = false,
+ blipName = 'Families',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'gang',
+ category = Config.VehicleClass['car'], --car, air, sea, rig
+ job = 'families',
+ jobType = 'families'
+ },
+ lostmc = {
+ label = 'Lost MC',
+ takeVehicle = vector3(985.83, -138.14, 73.09),
+ spawnPoint = {
+ vector4(977.65, -133.02, 73.34, 59.39)
+ },
+ showBlip = false,
+ blipName = 'Lost MC',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'gang',
+ category = Config.VehicleClass['car'], --car, air, sea, rig
+ job = 'lostmc',
+ jobType = 'lostmc'
+ },
+ cartel = {
+ label = 'Cartel',
+ takeVehicle = vector3(1411.67, 1117.8, 114.84),
+ spawnPoint = {
+ vector4(1403.01, 1118.25, 114.84, 88.69)
+ },
+ showBlip = false,
+ blipName = 'Cartel',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'gang',
+ category = Config.VehicleClass['car'],
+ job = 'cartel',
+ jobType = 'cartel'
+ },
+ police = {
+ label = 'Police',
+ takeVehicle = vector3(462.83, -1019.52, 28.1),
+ spawnPoint = {
+ vector4(446.16, -1025.79, 28.23, 6.59)
+ },
+ showBlip = false,
+ blipName = 'Police',
+ blipNumber = 357,
+ blipColor = 3,
+ type = 'job',
+ category = Config.VehicleClass['car'], --car, air, sea, rig
+ job = 'police',
+ jobType = 'leo'
+ },
+ intairport = {
+ label = 'Airport Hangar',
+ takeVehicle = vector3(-979.06, -2995.48, 13.95),
+ spawnPoint = {
+ vector4(-998.37, -2985.01, 13.95, 61.09)
+ },
+ showBlip = true,
+ blipName = 'Hangar',
+ blipNumber = 360,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['air']
+ },
+ higginsheli = {
+ label = 'Higgins Helitours',
+ takeVehicle = vector3(-722.15, -1472.79, 5.0),
+ spawnPoint = {
+ vector4(-745.22, -1468.72, 5.39, 319.84),
+ vector4(-724.36, -1443.61, 5.39, 135.78)
+ },
+ showBlip = true,
+ blipName = 'Hangar',
+ blipNumber = 360,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['air']
+ },
+ airsshores = {
+ label = 'Sandy Shores Hangar',
+ takeVehicle = vector3(1737.89, 3288.13, 41.14),
+ spawnPoint = {
+ vector4(1742.83, 3266.83, 41.24, 102.64)
+ },
+ showBlip = true,
+ blipName = 'Hangar',
+ blipNumber = 360,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['air']
+ },
+ airzancudo = {
+ label = 'Fort Zancudo Hangar',
+ takeVehicle = vector3(-1828.25, 2975.44, 32.81),
+ spawnPoint = {
+ vector4(-1828.25, 2975.44, 32.81, 57.24)
+ },
+ showBlip = true,
+ blipName = 'Hangar',
+ blipNumber = 360,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['air']
+ },
+ airdepot = {
+ label = 'Air Depot',
+ takeVehicle = vector3(-1270.01, -3377.53, 14.33),
+ spawnPoint = {
+ vector4(-1270.01, -3377.53, 14.33, 329.25)
+ },
+ showBlip = true,
+ blipName = 'Air Depot',
+ blipNumber = 359,
+ blipColor = 3,
+ type = 'depot',
+ category = Config.VehicleClass['air']
+ },
+ lsymc = {
+ label = 'LSYMC Boathouse',
+ takeVehicle = vector3(-785.95, -1497.84, -0.09),
+ spawnPoint = {
+ vector4(-796.64, -1502.6, -0.09, 111.49)
+ },
+ showBlip = true,
+ blipName = 'Boathouse',
+ blipNumber = 356,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['sea']
+ },
+ paleto = {
+ label = 'Paleto Boathouse',
+ takeVehicle = vector3(-278.21, 6638.13, 7.55),
+ spawnPoint = {
+ vector4(-289.2, 6637.96, 1.01, 45.5)
+ },
+ showBlip = true,
+ blipName = 'Boathouse',
+ blipNumber = 356,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['sea']
+ },
+ millars = {
+ label = 'Millars Boathouse',
+ takeVehicle = vector3(1298.56, 4212.42, 33.25),
+ spawnPoint = {
+ vector4(1297.82, 4209.61, 30.12, 253.5)
+ },
+ showBlip = true,
+ blipName = 'Boathouse',
+ blipNumber = 356,
+ blipColor = 3,
+ type = 'public',
+ category = Config.VehicleClass['sea']
+ },
+ seadepot = {
+ label = 'LSYMC Depot',
+ takeVehicle = vector3(-742.95, -1407.58, 5.5),
+ spawnPoint = {
+ vector4(-729.77, -1355.49, 1.19, 142.5)
+ },
+ showBlip = true,
+ blipName = 'LSYMC Depot',
+ blipNumber = 356,
+ blipColor = 3,
+ type = 'depot',
+ category = Config.VehicleClass['sea']
+ },
+ rigdepot = {
+ label = 'Big Rig Depot',
+ takeVehicle = vector3(2334.42, 3118.62, 48.2),
+ spawnPoint = {
+ vector4(2324.57, 3117.79, 48.21, 4.05)
+ },
+ showBlip = true,
+ blipName = 'Big Rig Depot',
+ blipNumber = 68,
+ blipColor = 2,
+ type = 'depot',
+ category = Config.VehicleClass['rig']
+ },
+ dumborigparking = {
+ label = 'Dumbo Big Rig Parking',
+ takeVehicle = vector3(161.23, -3188.73, 5.97),
+ spawnPoint = {
+ vector4(167.0, -3203.89, 5.94, 271.27)
+ },
+ showBlip = true,
+ blipName = 'Big Rig Parking',
+ blipNumber = 357,
+ blipColor = 2,
+ type = 'public',
+ category = Config.VehicleClass['rig']
+ },
+ popsrigparking = {
+ label = 'Pop\'s Big Rig Parking',
+ takeVehicle = vector3(137.67, 6632.99, 31.67),
+ spawnPoint = {
+ vector4(127.69, 6605.84, 31.93, 223.67)
+ },
+ showBlip = true,
+ blipName = 'Big Rig Parking',
+ blipNumber = 357,
+ blipColor = 2,
+ type = 'public',
+ category = Config.VehicleClass['rig']
+ },
+ ronsrigparking = {
+ label = 'Ron\'s Big Rig Parking',
+ takeVehicle = vector3(-2529.37, 2342.67, 33.06),
+ spawnPoint = {
+ vector4(-2521.61, 2326.45, 33.13, 88.7)
+ },
+ showBlip = true,
+ blipName = 'Big Rig Parking',
+ blipNumber = 357,
+ blipColor = 2,
+ type = 'public',
+ category = Config.VehicleClass['rig']
+ },
+ ronsrigparking2 = {
+ label = 'Ron\'s Big Rig Parking',
+ takeVehicle = vector3(2561.67, 476.68, 108.49),
+ spawnPoint = {
+ vector4(2561.67, 476.68, 108.49, 177.86)
+ },
+ showBlip = true,
+ blipName = 'Big Rig Parking',
+ blipNumber = 357,
+ blipColor = 2,
+ type = 'public',
+ category = Config.VehicleClass['rig']
+ },
+ ronsrigparking3 = {
+ label = 'Ron\'s Big Rig Parking',
+ takeVehicle = vector3(-41.24, -2550.63, 6.01),
+ spawnPoint = {
+ vector4(-39.39, -2527.81, 6.08, 326.18)
+ },
+ showBlip = true,
+ blipName = 'Big Rig Parking',
+ blipNumber = 357,
+ blipColor = 2,
+ type = 'public',
+ category = Config.VehicleClass['rig']
},
}
-Config.HouseGarages = {}
diff --git a/database.sql b/database.sql
deleted file mode 100644
index e00946c..0000000
--- a/database.sql
+++ /dev/null
@@ -1,29 +0,0 @@
-CREATE TABLE IF NOT EXISTS `player_vehicles` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `license` varchar(50) DEFAULT NULL,
- `citizenid` varchar(50) DEFAULT NULL,
- `vehicle` varchar(50) DEFAULT NULL,
- `hash` varchar(50) DEFAULT NULL,
- `mods` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
- `plate` varchar(15) NOT NULL,
- `fakeplate` varchar(50) DEFAULT NULL,
- `garage` varchar(50) DEFAULT 'pillboxgarage',
- `fuel` int(11) DEFAULT 100,
- `engine` float DEFAULT 1000,
- `body` float DEFAULT 1000,
- `state` int(11) DEFAULT 1,
- `depotprice` int(11) NOT NULL DEFAULT 0,
- `drivingdistance` int(50) DEFAULT NULL,
- `status` text DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `plate` (`plate`),
- KEY `citizenid` (`citizenid`),
- KEY `license` (`license`)
-) ENGINE=InnoDB AUTO_INCREMENT=1;
-
-ALTER TABLE `player_vehicles`
-ADD UNIQUE INDEX UK_playervehicles_plate (plate);
-
-ALTER TABLE `player_vehicles`
-ADD CONSTRAINT FK_playervehicles_players FOREIGN KEY (citizenid)
-REFERENCES `players` (citizenid) ON DELETE CASCADE ON UPDATE CASCADE;
diff --git a/fxmanifest.lua b/fxmanifest.lua
index 8fba40b..8dd7523 100644
--- a/fxmanifest.lua
+++ b/fxmanifest.lua
@@ -1,8 +1,8 @@
fx_version 'cerulean'
game 'gta5'
-
+lua54 'yes'
description 'QB-Garages'
-version '1.2.1'
+version '2.0.0'
shared_scripts {
'config.lua',
@@ -13,7 +13,7 @@ shared_scripts {
client_scripts {
'@PolyZone/client.lua',
- '@PolyZone/BoxZone.lua',
+ '@PolyZone/CircleZone.lua',
'@PolyZone/ComboZone.lua',
'client/main.lua',
}
@@ -23,4 +23,11 @@ server_scripts {
'server/main.lua'
}
-lua54 'yes'
+ui_page 'html/index.html'
+
+files {
+ 'html/index.html',
+ 'html/script.js',
+ 'html/style.css',
+ 'html/logo.png',
+}
diff --git a/html/index.html b/html/index.html
new file mode 100644
index 0000000..00e8b93
--- /dev/null
+++ b/html/index.html
@@ -0,0 +1,19 @@
+
+
+