# Integration

## Enter House

{% tabs %}
{% tab title="Client" %}

```lua
TriggerEvent('ak47_housing:enterhouse', houseid)
```

{% endtab %}

{% tab title="Server" %}

```lua
TriggerClientEvent('ak47_housing:enterhouse', source, houseid)
```

{% endtab %}
{% endtabs %}

## Set Vehicle Fuel

<figure><img src="/files/OgP1BzxUHDtEKFtWsfBI" alt=""><figcaption></figcaption></figure>

## Give Key

Path: ak47\_housing/modules/garage/client/customizable.lua\
Set your export or trigger here to give vehicle key

<figure><img src="/files/NANKmqyt5pR8PlVPllvy" alt=""><figcaption></figcaption></figure>

## Garage Triggers

Path: ak47\_housing/modules/garage/client/customizable.lua

<figure><img src="/files/5rUGcSSm0DGNPamdFQYL" alt=""><figcaption></figcaption></figure>

### ZSX\_Multicharacter

```lua
-- add inside Characters.ConvertProperties function
if GetResourceState('ak47_housing') == 'started' then
        local identifier = Config.Prefix..''..charId..':'..identifier
        local query = "SELECT * FROM `ak47_housing` WHERE `owner` = ?"
        local response = MySQL.query.await(query, {identifier})
        
        if response and response[1] then
            for k,v in ipairs(response) do
                local coords = json.decode(v.enter)
                properties['house_'..v.id] = {
                    name = 'house_'..v.id,
                    type = "property",
                    label = 'House:'..v.id,
                    coords = vector3(coords.x, coords.y, coords.z),
                }
            end
        end
    end
```


---

# Agent Instructions: 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.menanak47.com/esx/ak47_housing/integration.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.
