bcs_housing
Find the garage.lua file in your bcs_housing
Paste the following code into the garage.lua file
function GaragePrompt(data, identifier)
CreateThread(function()
local home = Homes[identifier]
if home.properties.complex ~= 'Apartment' then
debugPrint("[GaragePrompt]", "Garage of owned house " .. home.properties.owner)
end
if home.keys:HasKey(GetIdentifier(), 'Garage') then
if IsPedInAnyVehicle(PlayerPedId(), false) then
HelpText(true, Locale["prompt_store_vehicle"])
else
HelpText(true, Locale["prompt_open_garage"])
end
while inZone do
Wait(2)
if IsControlJustReleased(0, 38) then
HelpText(false)
if IsResourceStarted('vms_garagesv2') then
exports['vms_garagesv2']:enterHouseGarage()
end
break
end
end
while IsNuiFocused() do Wait(100) end
Wait(1000)
if inZone then
local updatedData = GetHomeObject(identifier)
GaragePrompt(updatedData, identifier)
end
end
end)
end
Last updated