Public Garages

If you are going to add more garages to your map, we recommend that you have a trusted developer help you with integrations and config.lua edits.

The garage can create different types of public garages using the in-game creator specified in the previous document, but the simple way is through config.lua, where we will see the complete integration of public garages and their general configurations.

When creating a new garage I receive ox_lib zones errors

This is because ox_lib will ask you for the polyzone > points to be all with the same z coord. Simply give all the z coordinates the same number.


Examples of the original configuration

Make use of the current garages already created to create new ones, this way you will have a guide to follow within config.lua. You can help yourself by using Config.Debug or Config.ZoneDebug.

['Pinkie Pie Garage'] = { -- Garage name (blip, sql, etc)
    owner = false, -- If it is public, put false
    available = true, -- If it is public, set true
    isImpound = false, -- If it is an impound, set it to false (Only for impound zone)
    job = false, -- You can give it a job by simply adding 'police' for example
    type = 'vehicle', -- Use: vehicle (car), boat or plane
    shell = {
        shell = 1 -- Shell numbers, you can see them in interiors.lua
    },
    coords = {
        menuCoords = vec3(483.75, -1312.29, 29.21), -- Menu coords
        spawnCoords = vec4(488.68, -1313.91, 29.26, 294.49), -- Spawn vehicle coords
        polyzone = {
            points = {
                vec3(398.86, -1278.41, 25.0), -- Structure of the polyzone (corners forming a box)
                vec3(482.58, -1341.67, 25.0), -- Structure of the polyzone (corners forming a box)
                vec3(514.39, -1331.06, 25.0), -- Structure of the polyzone (corners forming a box)
                vec3(491.67, -1268.94, 25.0) -- Structure of the polyzone (corners forming a box)
            },
            thickness = 25.0
        }
    },
    vehicleCamera = { -- Camera and position configuration (you can remove this)
        vehicleCoords = vec4(492.857147, -1317.085693, 28.824951, 260.787415),
        camera = {
            coords = vec3(494.162628, -1320.975830, 29.195557),
            rotation = vec3(-2.0, 2.0, 28.0),
            ped = vec4(494.729675, -1315.925293, 29.246094, 170.259842)
        }
    },
    cinematicCams = { -- Cinematic camera afk, set it near the vehicle or have fun
        vec3(495.230774, -1318.892334, 29.246094),
        vec3(492.065948, -1318.852783, 29.229248)
    }
}

Last updated