# sn\_properties

{% hint style="warning" %}
IMPORTANT: This integration works only above Version 2.5.0 of OP Garages Script&#x20;
{% endhint %}

{% stepper %}
{% step %}

### Find Garages Folder

Go to `sn_properties/client/framework/garages/`
{% endstep %}

{% step %}

### Create New File

create file named `op-garages.lua`
{% endstep %}

{% step %}

### Paste Code

Paste this code inside created file:

```lua
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
end
```

{% endstep %}

{% step %}

### Find Config

Go to the config file of sn\_properties and replace:

This:

```lua
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
end
```

With This:

```lua
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
end
```

{% endstep %}

{% step %}

### All Done!

Everything is ready!
{% endstep %}
{% endstepper %}
