> For the complete documentation index, see [llms.txt](https://docs.otherplanet.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otherplanet.dev/scripts/op-garages-v2/script-integrations/sn_properties.md).

# 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.otherplanet.dev/scripts/op-garages-v2/script-integrations/sn_properties.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
