housing und dj

This commit is contained in:
Nordi98 2025-06-09 23:54:46 +02:00
parent 112c7b1761
commit 10a5d168d4
731 changed files with 506993 additions and 0 deletions

View file

@ -0,0 +1,48 @@
if Config.Garage ~= 'RxGarages' then
return
end

function TriggerHouseUpdateGarage() end

function StoreVehicle(UniqueHouseId)
exports['RxGarages']:ParkVehicle("House Garage ("..tostring(UniqueHouseId)..")", 'garage', 'car')
end

function OpenGarage(UniqueHouseId, coords)
exports['RxGarages']:OpenGarage("House Garage ("..tostring(UniqueHouseId)..")", 'garage', 'car', coords)
end

CreateThread(function()
while true do
Wait(0)
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)

if CurrentHouse ~= nil and (CurrentHouseData.haskey or not Config.Houses[CurrentHouse].locked) and Config.Houses and Config.Houses[CurrentHouse] and Config.Houses[CurrentHouse].garage then
local garage = Config.Houses[CurrentHouse].garage
local dist = GetDistanceBetweenCoords(pos, garage.x, garage.y, garage.z, true)

if dist < 5.0 then
DrawMarker(20, garage.x, garage.y, garage.z + 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.15, 120, 10, 20, 155, false, false, false, 1, false, false, false)

if dist < 2.0 then
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)

if vehicle and vehicle ~= 0 then
DrawText3D(garage.x, garage.y, garage.z + 0.3, 'GARAGE', 'open_garage1', 'E')
if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
StoreVehicle(CurrentHouse)
end
else
DrawText3D(garage.x, garage.y, garage.z + 0.3, 'GARAGE', 'open_garage2', 'E')
if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
OpenGarage(CurrentHouse, vector3(garage.x, garage.y, garage.z))
end
end
end
else
Wait(1000)
end
end
end
end)

View file

@ -0,0 +1,51 @@
if Config.Garage ~= 'ak47_garage' then
return
end

function TriggerHouseUpdateGarage() end

function StoreVehicle(UniqueHouseId)
TriggerEvent('ak47_garage:housing:storevehicle', UniqueHouseId, 'car') -- car, boat, heli, plane
end

function OpenGarage(UniqueHouseId)
TriggerEvent('ak47_garage:housing:takevehicle', UniqueHouseId, 'car') -- car, boat, heli, plane
end

CreateThread(function()
while true do
Wait(0)
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)

if CurrentHouse ~= nil and (CurrentHouseData.haskey or not Config.Houses[CurrentHouse].locked) and Config.Houses and Config.Houses[CurrentHouse] and Config.Houses[CurrentHouse].garage then
local dist = GetDistanceBetweenCoords(pos, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z, true)

if dist < 5.0 then
DrawMarker(20, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.15, 120, 10, 20, 155, false, false, false, 1, false, false, false)

if dist < 2.0 then
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if Config.Houses[CurrentHouse].garage and Config.Houses[CurrentHouse].garage.x and Config.Houses[CurrentHouse].garage.y and Config.Houses[CurrentHouse].garage.z then
if vehicle and vehicle ~= 0 then
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'GARAGE', 'open_garage1', 'E')

if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not StoreVehicle then return print('Your client/custom/garages/*.lua is not correctly configured') end
StoreVehicle(CurrentHouse)
end
else
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'GARAGE', 'open_garage2', 'E')
if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not OpenGarage then return print('Your client/custom/garages/*.lua is not correctly configured') end
OpenGarage(CurrentHouse)
end
end
end
end
else
Wait(1000)
end
end
end
end)

View file

@ -0,0 +1,56 @@
if Config.Garage ~= 'ak47_qb_garage' then
return
end

function TriggerHouseUpdateGarage() end

-- Se asume que estas funciones están definidas previamente
function StoreVehicle(UniqueHouseId)
TriggerEvent('ak47_qb_garage:housing:storevehicle', UniqueHouseId, 'car') -- car, boat, heli, plane
end

function OpenGarage(UniqueHouseId)
TriggerEvent('ak47_qb_garage:housing:takevehicle', UniqueHouseId, 'car') -- car, boat, heli, plane
end

CreateThread(function()
while true do
Wait(0)
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)

if CurrentHouse ~= nil and (CurrentHouseData.haskey or not Config.Houses[CurrentHouse].locked) and Config.Houses and Config.Houses[CurrentHouse] and Config.Houses[CurrentHouse].garage then
local dist = GetDistanceBetweenCoords(pos, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z, true)

if dist < 5.0 then
DrawMarker(20, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.15, 120, 10, 20, 155, false, false, false, 1, false, false, false)

if dist < 2.0 then
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if Config.Houses[CurrentHouse].garage and Config.Houses[CurrentHouse].garage.x and Config.Houses[CurrentHouse].garage.y and Config.Houses[CurrentHouse].garage.z then
if vehicle and vehicle ~= 0 then
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'GARAGE', 'open_garage1', 'E')

if IsControlJustPressed(0, Keys['E']) then
if not StoreVehicle then
return print('Your client/custom/garages/*.lua is not correctly configured')
end
StoreVehicle(CurrentHouse)
end
else
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'GARAGE', 'open_garage2', 'E')
if IsControlJustPressed(0, Keys['E']) then
if not OpenGarage then
return print('Your client/custom/garages/*.lua is not correctly configured')
end
OpenGarage(CurrentHouse)
end
end
end
end
else
Wait(1000)
end
end
end
end)

View file

@ -0,0 +1,57 @@
--[[
In this section you will find the configuration of the garage that you have selected, in
case your system is not found here, you can ask the creator of your garage to add its exports
in any of these files, or use these files to create your own, that would help our community!
]]

if Config.Garage ~= 'cd_garage' then
return
end

function TriggerHouseUpdateGarage() end

function StoreVehicle(house)
TriggerEvent('cd_garage:StoreVehicle_Main', 1, false, false)
end

function OpenGarage(house)
TriggerEvent('cd_garage:PropertyGarage', 'quick', nil)
end

CreateThread(function()
while true do
Wait(0)
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)

if CurrentHouse ~= nil and (CurrentHouseData.haskey or not Config.Houses[CurrentHouse].locked) and Config.Houses and Config.Houses[CurrentHouse] and Config.Houses[CurrentHouse].garage then
local dist = GetDistanceBetweenCoords(pos, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z, true)

if dist < 5.0 then
DrawMarker(20, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.15, 120, 10, 20, 155, false, false, false, 1, false, false, false)

if dist < 2.0 then
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if Config.Houses[CurrentHouse].garage and Config.Houses[CurrentHouse].garage.x and Config.Houses[CurrentHouse].garage.y and Config.Houses[CurrentHouse].garage.z then
if vehicle and vehicle ~= 0 then
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'Store', 'open_garage1', 'E')

if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not StoreVehicle then return print('Your client/custom/garages/*.lua is not correctly configured') end
StoreVehicle(CurrentHouse)
end
else
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'Store', 'open_garage2', 'E')
if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not OpenGarage then return print('Your client/custom/garages/*.lua is not correctly configured') end
OpenGarage(CurrentHouse)
end
end
end
end
else
Wait(1000)
end
end
end
end)

View file

@ -0,0 +1,59 @@
--[[
In this section you will find the configuration of the garage that you have selected, in
case your system is not found here, you can ask the creator of your garage to add its exports
in any of these files, or use these files to create your own, that would help our community!
]]

if Config.Garage ~= 'codem-garage' then
return
end

function TriggerHouseUpdateGarage() end

function StoreVehicle(house)
print(house)
TriggerEvent('codem-garage:storeVehicle', 'House Garage')
end

function OpenGarage(house)
print(house)
TriggerEvent('codem-garage:openHouseGarage', 'House Garage')
end

CreateThread(function()
while true do
Wait(0)
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)

if CurrentHouse ~= nil and (CurrentHouseData.haskey or not Config.Houses[CurrentHouse].locked) and Config.Houses and Config.Houses[CurrentHouse] and Config.Houses[CurrentHouse].garage then
local dist = GetDistanceBetweenCoords(pos, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z, true)

if dist < 5.0 then
DrawMarker(20, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.15, 120, 10, 20, 155, false, false, false, 1, false, false, false)

if dist < 2.0 then
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if Config.Houses[CurrentHouse].garage and Config.Houses[CurrentHouse].garage.x and Config.Houses[CurrentHouse].garage.y and Config.Houses[CurrentHouse].garage.z then
if vehicle and vehicle ~= 0 then
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'Store', 'open_garage1', 'E')

if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not StoreVehicle then return print('Your client/custom/garages/*.lua is not correctly configured') end
StoreVehicle(CurrentHouse)
end
else
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'Store', 'open_garage2', 'E')
if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not OpenGarage then return print('Your client/custom/garages/*.lua is not correctly configured') end
OpenGarage(CurrentHouse)
end
end
end
end
else
Wait(1000)
end
end
end
end)

View file

@ -0,0 +1,141 @@
--[[

qs-housing custom garage integration with cs-garages
Make sure your Config.Garage = 'cs-garages' in qs-housing config

This ensures qs-housing loads this file instead of others.

]]

if Config.Garage ~= 'cs-garages' then
return
end

local Keys = {
['E'] = 38
}

function TriggerHouseUpdateGarage() end

local function canUseGarage()
return exports['cs-garages']:canOpenGarage()
end

local function setGarageCooldown()
exports['cs-garages']:setGarageCooldown()
end

function StoreVehicle(houseId)
local hData = Config.Houses[houseId]
if not hData or not hData.garage then return end

local gx, gy, gz, gh = hData.garage.x, hData.garage.y, hData.garage.z, (hData.garage.h or 0.0)

TriggerEvent('cs-garages:client:StoreHouseVehicle', houseId, 'car', gx, gy, gz, gh)

setGarageCooldown()
end

function OpenGarage(houseId)
local hData = Config.Houses[houseId]
if not hData or not hData.garage then return end

local gx, gy, gz, gh = hData.garage.x, hData.garage.y, hData.garage.z, (hData.garage.h or 0.0)

TriggerEvent('cs-garages:client:OpenHouseGarage', houseId, 'car', gx, gy, gz, gh)
end

CreateThread(function()
while true do
Wait(0)
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)

if CurrentHouse ~= nil
and (CurrentHouseData.haskey or not Config.Houses[CurrentHouse].locked)
and Config.Houses
and Config.Houses[CurrentHouse]
and Config.Houses[CurrentHouse].garage then
local g = Config.Houses[CurrentHouse].garage
local dist = #(pos - vector3(g.x, g.y, g.z))

if dist < 5.0 then
local veh = GetVehiclePedIsIn(ped, false)

if veh ~= 0 then
DrawMarker(
20,
g.x, g.y, g.z + 0.3,
0, 0, 0, 0, 0, 0,
0.6, 0.4, 0.3,
255, 0, 0, 122,
false, false, 0, true, false, false, false
)
else
DrawMarker(
20,
g.x, g.y, g.z + 0.3,
0, 0, 0, 0, 0, 0,
0.6, 0.4, 0.3,
30, 150, 30, 122,
false, false, 0, true, false, false, false
)
end

if dist < 2.0 then
if veh ~= 0 then
DrawText3D(g.x, g.y, g.z + 0.3, '[E] Store Vehicle')
if IsControlJustPressed(0, Keys['E']) then
if not canUseGarage() then
lib.notify({
title = 'Garage',
description = 'You recently stored a vehicle in the garage, please wait a moment.',
position = 'bottom-center',
type = 'inform',
style = {
borderRadius = 16,
backgroundColor = '#0f172a',
color = '#f8fafc',
border = '1px solid #334155',
padding = '12px 20px',
fontFamily = 'Inter, sans-serif'
},
icon = 'info',
iconColor = '#053BFB'
})
else
StoreVehicle(CurrentHouse)
end
end
else
DrawText3D(g.x, g.y, g.z + 0.3, '[E] Open Garage')
if IsControlJustPressed(0, Keys['E']) then
if not canUseGarage() then
lib.notify({
title = 'Garage',
description = 'You recently opened the garage, please wait a moment.',
position = 'bottom-center',
type = 'inform',
style = {
borderRadius = 16,
backgroundColor = '#0f172a',
color = '#f8fafc',
border = '1px solid #334155',
padding = '12px 20px',
fontFamily = 'Inter, sans-serif'
},
icon = 'info',
iconColor = '#053BFB'
})
else
OpenGarage(CurrentHouse)
end
end
end
end
else
Wait(1000)
end
end
end
end)

View file

@ -0,0 +1,57 @@
--[[
In this section you will find the configuration of the garage that you have selected, in
case your system is not found here, you can ask the creator of your garage to add its exports
in any of these files, or use these files to create your own, that would help our community!
]]

if Config.Garage ~= 'jg-advancedgarages' then
return
end

function TriggerHouseUpdateGarage() end

function StoreVehicle(house)
TriggerEvent('jg-advancedgarages:client:InsertVehicle', house, true)
end

function OpenGarage(house)
TriggerEvent('jg-advancedgarages:client:ShowHouseGarage:qs-housing', house)
end

CreateThread(function()
while true do
Wait(0)
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)

if CurrentHouse ~= nil and (CurrentHouseData.haskey or not Config.Houses[CurrentHouse].locked) and Config.Houses and Config.Houses[CurrentHouse] and Config.Houses[CurrentHouse].garage then
local dist = GetDistanceBetweenCoords(pos, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z, true)

if dist < 5.0 then
DrawMarker(20, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.15, 120, 10, 20, 155, false, false, false, 1, false, false, false)

if dist < 2.0 then
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if Config.Houses[CurrentHouse].garage and Config.Houses[CurrentHouse].garage.x and Config.Houses[CurrentHouse].garage.y and Config.Houses[CurrentHouse].garage.z then
if vehicle and vehicle ~= 0 then
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'Store', 'open_garage1', 'E')

if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not StoreVehicle then return print('Your client/custom/garages/*.lua is not correctly configured') end
StoreVehicle(CurrentHouse)
end
else
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'Store', 'open_garage2', 'E')
if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not OpenGarage then return print('Your client/custom/garages/*.lua is not correctly configured') end
OpenGarage(CurrentHouse)
end
end
end
end
else
Wait(1000)
end
end
end
end)

View file

@ -0,0 +1,68 @@
--[[
In this section you will find the configuration of the garage that you have selected, in
case your system is not found here, you can ask the creator of your garage to add its exports
in any of these files, or use these files to create your own, that would help our community!
]]

if Config.Garage ~= 'loaf_garage' then
return
end

function TriggerHouseUpdateGarage() end

function StoreVehicle(house)
local garage = house
local vehicle = GetVehiclePedIsUsing(PlayerPedId())
if DoesEntityExist(vehicle) and garage then
local vehprops = GetVehicleProperties(vehicle)
local damages = {}
TriggerServerEvent('loaf_garage:storeVehicle', garage, damages, vehprops)
DeleteVehicle(vehicle)
TriggerEvent('loaf_garage:deleteStoredVehicle', GetVehicleNumberPlateText(vehicle))
FreezeEntityPosition(PlayerPedId(-1), false)
end
end

function OpenGarage(house)
TriggerEvent('loaf_garage:viewVehicles', house, GetEntityCoords(GetPlayerPed(-1)), GetEntityHeading(GetPlayerPed(-1)), function()
FreezeEntityPosition(PlayerPedId(-1), false)
end, false)
end

CreateThread(function()
while true do
Wait(0)
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)

if CurrentHouse ~= nil and (CurrentHouseData.haskey or not Config.Houses[CurrentHouse].locked) and Config.Houses and Config.Houses[CurrentHouse] and Config.Houses[CurrentHouse].garage then
local dist = GetDistanceBetweenCoords(pos, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z, true)

if dist < 5.0 then
DrawMarker(20, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.15, 120, 10, 20, 155, false, false, false, 1, false, false, false)

if dist < 2.0 then
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if Config.Houses[CurrentHouse].garage and Config.Houses[CurrentHouse].garage.x and Config.Houses[CurrentHouse].garage.y and Config.Houses[CurrentHouse].garage.z then
if vehicle and vehicle ~= 0 then
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'Store', 'open_garage1', 'E')

if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not StoreVehicle then return print('Your client/custom/garages/*.lua is not correctly configured') end
StoreVehicle(CurrentHouse)
end
else
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'Store', 'open_garage2', 'E')
if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not OpenGarage then return print('Your client/custom/garages/*.lua is not correctly configured') end
OpenGarage(CurrentHouse)
end
end
end
end
else
Wait(1000)
end
end
end
end)

View file

@ -0,0 +1,57 @@
if Config.Garage ~= 'msk_garage' then
return
end

function TriggerHouseUpdateGarage()
return
end

function OpenGarage(house)
local coords = GetEntityCoords(PlayerPedId())
local heading = GetEntityHeading(PlayerPedId())
exports.msk_garage:openGarage({
label = house,
garageId = house,
parkInCoords = coords,
parkOutCoords = {
vec4(coords.x, coords.y, coords.z, heading)
},
distance = 20.0, -- Park In Radius
warp = false, -- Teleport into vehicle
type = { 'car', 'truck' } -- 'car', 'truck', 'airplane', ...
})
end

CreateThread(function()
while true do
Wait(0)
local ped = PlayerPedId()
local pos = GetEntityCoords(PlayerPedId())
if ped and CurrentHouse ~= nil and (CurrentHouseData.haskey or not Config.Houses[CurrentHouse].locked) and Config.Houses and Config.Houses[CurrentHouse] and Config.Houses[CurrentHouse].garage and Config.Houses[CurrentHouse].garage.x then
local dist = #(pos - vector3(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z))
if dist < 5.0 then
DrawMarker(20, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.15, 120, 10, 20, 155, false, false, false, 1, false, false, false)
if dist < 2.0 then
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if Config.Houses[CurrentHouse].garage and Config.Houses[CurrentHouse].garage.x and Config.Houses[CurrentHouse].garage.y and Config.Houses[CurrentHouse].garage.z then
if vehicle and vehicle ~= 0 then
DrawText3Ds(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, Lang('HOUSING_DRAWTEXT_GARAGE_STORE'), 'open_garage1', 'E')

if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
--OpenGarage(CurrentHouse)
end
else
DrawText3Ds(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, Lang('HOUSING_DRAWTEXT_GARAGE_STORE'), 'open_garage2', 'E')

if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
OpenGarage(CurrentHouse)
end
end
end
end
else
Wait(1000)
end
end
end
end)

View file

@ -0,0 +1,57 @@
--[[
In this section you will find the configuration of the garage that you have selected, in
case your system is not found here, you can ask the creator of your garage to add its exports
in any of these files, or use these files to create your own, that would help our community!
]]

if Config.Garage ~= 'okokGarage' then
return
end

function TriggerHouseUpdateGarage() end

function StoreVehicle(house)
TriggerEvent('okokGarage:StoreVehiclePrivate')
end

function OpenGarage(house)
TriggerEvent('okokGarage:OpenPrivateGarageMenu', GetEntityCoords(PlayerPedId()), GetEntityHeading(PlayerPedId()))
end

CreateThread(function()
while true do
Wait(0)
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)

if CurrentHouse ~= nil and (CurrentHouseData.haskey or not Config.Houses[CurrentHouse].locked) and Config.Houses and Config.Houses[CurrentHouse] and Config.Houses[CurrentHouse].garage then
local dist = GetDistanceBetweenCoords(pos, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z, true)

if dist < 5.0 then
DrawMarker(20, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.15, 120, 10, 20, 155, false, false, false, 1, false, false, false)

if dist < 2.0 then
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if Config.Houses[CurrentHouse].garage and Config.Houses[CurrentHouse].garage.x and Config.Houses[CurrentHouse].garage.y and Config.Houses[CurrentHouse].garage.z then
if vehicle and vehicle ~= 0 then
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'Store', 'open_garage1', 'E')

if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not StoreVehicle then return print('Your client/custom/garages/*.lua is not correctly configured') end
StoreVehicle(CurrentHouse)
end
else
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'Store', 'open_garage2', 'E')
if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not OpenGarage then return print('Your client/custom/garages/*.lua is not correctly configured') end
OpenGarage(CurrentHouse)
end
end
end
end
else
Wait(1000)
end
end
end
end)

View file

@ -0,0 +1,14 @@
if Config.Garage ~= 'qb-garages' then
return
end

function TriggerHouseUpdateGarage()
if not Config.Houses[CurrentHouse] then
return
end
local garage = Config.Houses[CurrentHouse].garage
if not garage then
return
end
TriggerEvent('qb-garages:client:setHouseGarage', CurrentHouse, CurrentHouseData.haskey)
end

View file

@ -0,0 +1,8 @@
if Config.Garage ~= 'qs-advancedgarages' then
return
end

function TriggerHouseUpdateGarage()
print('TriggerHouseUpdateGarage', CurrentHouse, 'haskey', CurrentHouseData.haskey)
TriggerEvent('advancedgarages:SetShellGarageData', CurrentHouse, CurrentHouseData.haskey)
end

View file

@ -0,0 +1,57 @@
--[[
In this section you will find the configuration of the garage that you have selected, in
case your system is not found here, you can ask the creator of your garage to add its exports
in any of these files, or use these files to create your own, that would help our community!
]]

if Config.Garage ~= 'rcore_garage' then
return
end

function TriggerHouseUpdateGarage() end

function StoreVehicle(house)
TriggerEvent('rcore_garage:StoreMyVehicle', 'car')
end

function OpenGarage(house)
TriggerEvent('rcore_garage:OpenGarageOnSpot', 'car', 'civ')
end

CreateThread(function()
while true do
Wait(0)
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)

if CurrentHouse ~= nil and (CurrentHouseData.haskey or not Config.Houses[CurrentHouse].locked) and Config.Houses and Config.Houses[CurrentHouse] and Config.Houses[CurrentHouse].garage then
local dist = GetDistanceBetweenCoords(pos, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z, true)

if dist < 5.0 then
DrawMarker(20, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.15, 120, 10, 20, 155, false, false, false, 1, false, false, false)

if dist < 2.0 then
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if Config.Houses[CurrentHouse].garage and Config.Houses[CurrentHouse].garage.x and Config.Houses[CurrentHouse].garage.y and Config.Houses[CurrentHouse].garage.z then
if vehicle and vehicle ~= 0 then
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'Store', 'open_garage1', 'E')

if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not StoreVehicle then return print('Your client/custom/garages/*.lua is not correctly configured') end
StoreVehicle(CurrentHouse)
end
else
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'Store', 'open_garage2', 'E')
if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not OpenGarage then return print('Your client/custom/garages/*.lua is not correctly configured') end
OpenGarage(CurrentHouse)
end
end
end
end
else
Wait(1000)
end
end
end
end)

View file

@ -0,0 +1,7 @@
if Config.Garage ~= 'standalone' then
return
end

function TriggerHouseUpdateGarage()
return
end

View file

@ -0,0 +1,41 @@
if Config.Garage ~= 'vms_garagesv2' then
return
end

function TriggerHouseUpdateGarage()
return
end

CreateThread(function()
while true do
Wait(0)
local ped = PlayerPedId()
local pos = GetEntityCoords(PlayerPedId())
if ped and CurrentHouse ~= nil and (CurrentHouseData.haskey or not Config.Houses[CurrentHouse].locked) and Config.Houses and Config.Houses[CurrentHouse] and Config.Houses[CurrentHouse].garage and Config.Houses[CurrentHouse].garage.x then
local dist = #(pos - vector3(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z))
if dist < 5.0 then
DrawMarker(20, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.15, 120, 10, 20, 155, false, false, false, 1, false, false, false)
if dist < 2.0 then
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if Config.Houses[CurrentHouse].garage and Config.Houses[CurrentHouse].garage.x and Config.Houses[CurrentHouse].garage.y and Config.Houses[CurrentHouse].garage.z then
if vehicle and vehicle ~= 0 then
DrawText3Ds(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, Lang('HOUSING_DRAWTEXT_GARAGE_STORE'), 'open_garage1', 'E')

if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
exports['vms_garagesv2']:enterHouseGarage()
end
else
DrawText3Ds(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, Lang('HOUSING_DRAWTEXT_GARAGE_STORE'), 'open_garage2', 'E')

if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
exports['vms_garagesv2']:enterHouseGarage()
end
end
end
end
else
Wait(1000)
end
end
end
end)

View file

@ -0,0 +1,57 @@
--[[
In this section you will find the configuration of the garage that you have selected, in
case your system is not found here, you can ask the creator of your garage to add its exports
in any of these files, or use these files to create your own, that would help our community!
]]

if Config.Garage ~= 'zerio-garage' then
return
end

function TriggerHouseUpdateGarage() end

function StoreVehicle(house)
TriggerEvent('zerio-garage:client:PutBackHouseVehicle', house, 'qs-housing')
end

function OpenGarage(house)
TriggerEvent('zerio-garage:client:OpenHousingGarage', house, 'qs-housing')
end

CreateThread(function()
while true do
Wait(0)
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)

if CurrentHouse ~= nil and CurrentHouseData.haskey and Config.Houses and Config.Houses[CurrentHouse] and Config.Houses[CurrentHouse].garage then
local dist = GetDistanceBetweenCoords(pos, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z, true)

if dist < 5.0 then
DrawMarker(20, Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.15, 120, 10, 20, 155, false, false, false, 1, false, false, false)

if dist < 2.0 then
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
if Config.Houses[CurrentHouse].garage and Config.Houses[CurrentHouse].garage.x and Config.Houses[CurrentHouse].garage.y and Config.Houses[CurrentHouse].garage.z then
if vehicle and vehicle ~= 0 then
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'Store', 'open_garage1', 'E')

if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not StoreVehicle then return print('Your client/custom/garages/*.lua is not correctly configured') end
StoreVehicle(CurrentHouse)
end
else
DrawText3D(Config.Houses[CurrentHouse].garage.x, Config.Houses[CurrentHouse].garage.y, Config.Houses[CurrentHouse].garage.z + 0.3, 'Store', 'open_garage2', 'E')
if IsControlJustPressed(0, Keys['E']) or IsDisabledControlJustPressed(0, Keys['E']) then
if not OpenGarage then return print('Your client/custom/garages/*.lua is not correctly configured') end
OpenGarage(CurrentHouse)
end
end
end
end
else
Wait(1000)
end
end
end
end)