nolag-properties
nolag-properties integration.
2
Open Created file and put this code inside:
--[[
Within this section, you'll discover the setup details for the chosen garage.
If your system isn't listed here, feel free to reach out to the garage creator
and request the inclusion of its exports in any of these files. Alternatively,
you can utilize these files to generate your own configuration, which would greatly
benefit our community.
]]
if Config.Garage ~= "op-garages" then
return
end
local garagesIndex = {}
Config.Functions["OpenGarageMenu"] = {
type = "outside", -- inside or outside
zone = true,
maxPerProperty = 1, -- The maximum amount of garage menu's per property
radius = 2.0, -- The radius of the interaction
requireKeys = true, -- If the player needs to have keys to interact with the interaction
label = "Garage Menu",
icon = "fas fa-car",
onCreate = function(property, coords)
local Coords = {
CenterOfZone = vec4(coords.x, coords.y, coords.z, coords.w and coords.w or 0.0),
AccessPoint = vec4(0.0, 0.0, 0.0, 0.0)
}
local PrivatePlayersList = GetPlayerServerId(PlayerId())
exports['op-garages']:ClientaddTempPrivateGarage("House " .. property.id, "car", Coords, 5, PrivatePlayersList, function(garageId)
garagesIndex[property.id] = garageId
end)
end,
onRemove = function (property)
if garagesIndex[property.id] then
exports['op-garages']:ClientremoveTempPrivateGarage(garagesIndex[property.id])
end
end
}
Last updated