sn_properties
Integration for OP-GARAGES with sn_properties
IMPORTANT: This integration works only above Version 2.5.0 of OP Garages Script
3
Paste Code
Paste this code inside created file:
if Config.garage ~= 'op-garages' then return end
function onGarageEnter(property)
if IsPedInAnyVehicle(PlayerPedId(), true) then
SNLib.showTextUI('[E] Park vehicle in the garage')
else
SNLib.showTextUI('[E] Open garage')
end
end
function onGarageExit(property)
SNLib.hideTextUI()
end
function insideGarage(property)
if IsControlJustReleased(0, 38) then
Wait(100)
local coords = vec4(property.garage_zone.x, property.garage_zone.y, property.garage_zone.z, property.garage_zone.w)
exports['op-garages']:OpenGarageHere(coords, true)
end
end4
Find Config
Go to the config file of sn_properties and replace:
This:
garageScripts = {
'ak47_garage',
'cd_garage',
'codem_garage',
'jg-advancedgarages',
'okokGarage',
'qb-garages',
'qbx_garages',
'qs-advancedgarages',
'rcore_garage',
'zerio-garage',
--'sn_garages',
'mythic-vehicles',
}
if Config.garage == 'auto' then
for _, resource in ipairs(garageScripts) do
if GetResourceState(resource):find('start') then
Config.garage = resource
break
end
end
endWith This:
garageScripts = {
'ak47_garage',
'cd_garage',
'codem_garage',
'jg-advancedgarages',
'okokGarage',
'qb-garages',
'qbx_garages',
'qs-advancedgarages',
'rcore_garage',
'zerio-garage',
--'sn_garages',
'mythic-vehicles',
'op-garages',
}
if Config.garage == 'auto' then
for _, resource in ipairs(garageScripts) do
if GetResourceState(resource):find('start') then
Config.garage = resource
break
end
end
endLast updated