[FREE] [ESX] [OpenSource] BMW_CarGarage

BMW_Cargarage
This is now the official release of BMW_Cargarage. its easily to use but its only for esx legacy.
its open source and easily to configure the garages etc in the configuration.lua. Here, is a example snippet from the configuration.lua
it haves an ingame admin menu to add vehicles to other players and remove them. you can open it with the command /editgarage.

Config = {}

Config.Garages = {
    ['MeetingPoint'] = {
        Pos = vector3(215.800, -810.057, 30.727),
        SpawnPoint = vector3(229.700, -800.114, 30.572),
        DeletePoint = vector3(215.124, -791.377, 30.646),
    },
    ['Garage2'] = {
        Pos = vector3(-334.685, 289.773, 84.705),
        SpawnPoint = vector3(-341.685, 285.773, 84.705),
        DeletePoint = vector3(-342.685, 283.773, 84.705),
    }
}

:dart:Informations

Code is accessible Yes
Subscription-based No
Lines (approximately) N/A
Requirements ESX (Legacy), ESX_Menu_Default, OX_Lib (Latest)
Support Yes

:framed_picture:Preview
Preview: Video unavailable for a short time.!

:arrow_down:How to Download
First Step: · Download the file via Github oder direct download at the bottom.
2. Step · Drag and drop the Script in your “resources” folder.
3. Step · Insert the insert.sql file to your database.
4. Step · Add to your server.cfg file: start bmw_cargarage
5. Step · Now Restart the server and just have fun!

❌💸Download

bmw_cargarage.rar (6.3 KB)
:arrow_down: Github Download

3 Likes

Nice Work good Garage

1 Like

thank you❤️

Gute Abeit aber wäre noch cool webn die garagen mit blips gekennzeichnet werden falls du es mal updaten tust als idee :+1:

1 Like

please update your Preview or add some pictures of the mlo or script what this resource is that people can see how the Resource looks like.

Hey! Ersetze dafür einfach die Zeile 132 - 166 in der client/main.lua.
Ersetze also dies:

CreateThread(function()
    for garageName, garage in pairs(Config.Garages) do
        local pos = garage.Pos
        local delete = garage.DeletePoint

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

                if #(playerCoords - pos) < 30.0 then
                    DrawMarker(36, pos.x, pos.y, pos.z + 0.0, 0, 0, 0, 0, 0, 0, 0.7, 0.5, 0.7, 0, 255, 0, 150, false, true, 2, false, false, false, false, false, false, false)
                    if #(playerCoords - pos) < 5.0 then
                    ESX.ShowHelpNotification('Drücke ~INPUT_CONTEXT~ um die Garage zu öffnen')

                    if IsControlJustReleased(0, 38) then
                        OpenGarageMenu(garageName, garage)
                    end
                end

                if #(playerCoords - delete) < 30.0 then
                    DrawMarker(24, delete.x, delete.y, delete.z + 1.0, 0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.0, 255, 0, 0, 150, false, true, 2, false, false, false, false, false, false, false)
                if #(playerCoords - delete) < 5.0 then
                    ESX.ShowHelpNotification('Drücke ~INPUT_CONTEXT~ um das Fahrzeug einzuparken')

                    if IsControlJustReleased(0, 38) then
                        ParkVehicle()
                            end
                        end
                    end
                end
            end
        end)
    end
end)

Mit diesem Code:

CreateThread(function()
    for garageName, garage in pairs(Config.Garages) do
        local pos = garage.Pos
        local delete = garage.DeletePoint
        local shownGarageHelp = false
        local shownDeleteHelp = false
        local blip = AddBlipForCoord(pos.x, pos.y, pos.z)
        SetBlipSprite(blip, 357)
        SetBlipDisplay(blip, 4)
        SetBlipScale(blip, 0.8)
        SetBlipColour(blip, 3)
        SetBlipAsShortRange(blip, true)
        BeginTextCommandSetBlipName("STRING")
        AddTextComponentSubstringPlayerName("Garage")
        EndTextCommandSetBlipName(blip)

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

                if #(playerCoords - pos) < 30.0 then
                    DrawMarker(36, pos.x, pos.y, pos.z + 0.0, 0, 0, 0, 0, 0, 0, 0.7, 0.5, 0.7, 0, 255, 0, 150, false, true, 2, false, false, false, false, false, false, false)
                    if #(playerCoords - pos) < 5.0 then
                        if not shownGarageHelp then
                            ESX.ShowHelpNotification('Drücke ~INPUT_CONTEXT~ um die Garage zu öffnen')
                            shownGarageHelp = true
                        end
                        if IsControlJustReleased(0, 38) then
                            OpenGarageMenu(garageName, garage)
                        end
                    else
                        shownGarageHelp = false
                    end
                end

                if #(playerCoords - delete) < 30.0 then
                    DrawMarker(24, delete.x, delete.y, delete.z + 1.0, 0, 0, 0, 0, 0, 0, 1.5, 1.5, 1.0, 255, 0, 0, 150, false, true, 2, false, false, false, false, false, false, false)
                    if #(playerCoords - delete) < 5.0 then
                        if not shownDeleteHelp then
                            ESX.ShowHelpNotification('Drücke ~INPUT_CONTEXT~ um das Fahrzeug einzuparken')
                            shownDeleteHelp = true
                        end
                        if IsControlJustReleased(0, 38) then
                            ParkVehicle()
                        end
                    else
                        shownDeleteHelp = false
                    end
                end
            end
        end)
    end
end)