# Setting up cinema

{% stepper %}
{% step %}

#### Go to config.lua

You can easily configure or add a new cinema to our script by accessing the following directory: `brnx-cinemasystem/modules/shared/config.lua`. This file provides all the necessary options for customization, ensuring a seamless integration tailored to your needs.
{% endstep %}

{% step %}

#### Create cinema

To add a cinema, navigate to the `brnx-cinemasystem/modules/shared/config.lua` file and follow the instructions below for seamless customization.

{% hint style="danger" %}
If you don't have the [Ten Cent](https://store.brunxmods.com/package/6555960) or [Cinema Doppler ](https://store.brunxmods.com/package/5041285)maps, you will need to configure the entire script manually. However, if you do have these maps, there's no need to worry, as both are already pre-configured. You can still edit them if needed. Follow the examples below to create a new cinema.
{% endhint %}

{% code title="brnx-cinemasystem/modules/shared/config.lua" fullWidth="true" %}

```lua

-- Add film
config.films = {
    ['standalone'] = {
        { 
            name = 'Bluen The Return',
            minutes = '15',
            img = 'url',
            synopsis = [[
                The best shop
            ]],
            schedules = {
                ['STANDALONE01'] = { { hour = '12:00' } }, -- [ROOM]
            },
            price = 5000,
            
            url = 'url', -- YOUTUBE LINK
            volume = 50.0
        },    
    }
}

-- Add blip in map
config.blips = {
    { 
        coord = vector3(0,0,0),
        sprite = 135, 
        color = 1, 
        scale = 0.7, 
        name = 'Cinema Bluen' 
    },
}

-- Create totem
config.totems = {
    { coord = vector3(0,0,0), method = 'film', cinema = 'standalone' },
}
```

{% endcode %}

{% hint style="danger" %}
The movie schedules follow real-world time, not in-game time.
{% endhint %}

{% hint style="info" %}
After following the steps above, you will also need to configure the cinema room in the `brnx-cinemasystem/modules/shared/rooms.lua` file. Without this step, the script will not function properly.
{% endhint %}

<pre class="language-lua" data-title="brnx-cinemasystem/modules/shared/rooms.lua" data-full-width="true"><code class="lang-lua"><strong>Rooms = {
</strong>    ['STANDALONE01'] = PolyZone:Create({
            vector2(0,0),
            vector2(0,0)
        }, 
        {
            debugGrid=config.debug,
            --minZ = 0.0,
            --maxZ = 0.0,
            data = {}
        }
    ),
}

Exits = {
    ['STANDALONE01'] = vector4(0, 0, 0, 0) -- REQUIRED
}
</code></pre>

### How to create a polyzone?

{% embed url="<https://youtu.be/VSxAMPqCh00>" %}

{% code fullWidth="true" %}

```lua
-- Command used in the video
RegisterCommand('vec2', function(source)
    local coords = GetEntityCoords( GetPlayerPed(source) )
    local writeVec2 = tostring( vec2(coords.x,coords.y) )
    print(writeVec2)
end)
```

{% endcode %}

{% hint style="warning" %}
To ensure the screen works correctly, you need to define the screen's hash and its YTD replacement file in the script's configuration file, located at `brnx-cinemasystem/modules/shared/config.lua`. Additionally, make sure the screen is inside the Polyzone, as the script won't be able to find it otherwise.
{% endhint %}

{% code title="brnx-cinemasystem/shared/config.lua" fullWidth="true" %}

```lua
config.screen = {
    hash = GetHashKey('v_ilev_cin_screen'),
    replace = 'cinscreen'
}
```

{% endcode %}
{% endstep %}
{% endstepper %}
