# Client-Side

{% tabs %}
{% tab title="vms\_garagesV2" %}

```lua
if Config.Garages ~= 'vms_garagesv2' then
    return
end

function OpenGarage(propertyId, propertyData)
    exports['vms_garagesv2']:enterHouseGarage()
end
```

{% endtab %}

{% tab title="rcore\_garage" %}
{% code expandable="true" %}

```lua
if Config.Garages ~= 'rcore_garage' then
    return
end

function OpenGarage(propertyId, propertyData)
    local myPed = PlayerPedId()
    local myVehicle = GetVehiclePedIsIn(myPed, false)
    local isInVehicle = myVehicle and myVehicle ~= 0 and GetPedInVehicleSeat(myVehicle, -1) == myPed
    if isInVehicle then
        TriggerEvent("rcore_garage:StoreMyVehicle", "car")
    else
        TriggerEvent("rcore_garage:OpenGarageOnSpot", "car", "civ")
    end
end
```

{% endcode %}
{% endtab %}
{% endtabs %}
