Setting up cinema

1

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.

2

Create cinema

To start creating a new cinema, you need to go to the file brnx-cinemasystem/modules/config/config.lua, and after that, follow the instructions below.

  1. To begin, you need to create an ID to serve as your cinema's identifier, as well as the cinema's name. Follow the example below.

brnx-cinemasystem/modules/config/config.lua
config.cinemas = {
    { id = 'newcinema', name = 'New Cinemaa' }
}
  1. It is necessary to configure your cinema screen. You need to get the screen prop’s hash and its replace-texture and set it up exactly like in the example below. If you don’t do this correctly, the movie videos will not work.

brnx-cinemasystem/modules/config/config.lua
config.screens = {
    ['newcinema'] = {
        hash = modelHash,
        replace = replaceName
    }
}
  1. After completing all the steps above, you need to create the sessions, meaning the rooms where the movies will play. To do this, PolyZone is required. Check the example below and follow the instruction video.

brnx-cinemasystem/modules/config/rooms.lua
Rooms = {
    --[[ EXAMPLE
        ['TEN01'] = PolyZone:Create(
        {
            -- Right 1
            vector2(431.3143, -736.444),
            vector2(431.011, -736.6022),
            vector2(430.8264, -736.9187),

            -- Left 1
            vector2(408.7516, -736.9187),
            vector2(408.6461, -736.6154),
            vector2(408.2769, -736.444),

            -- Left 2
            vector2(408.9758, -691.8198),
            
            -- Right 2
            vector2(430.7473, -691.3318)
        }, 
        {
            debugGrid=config.debug,
            minZ = 0.0,
            maxZ = 28.0,
            data = {}
        }
    ),]]
    ['NEWCINEMA01'] = PolyZone:Create({
            vector2(0.0,0.0),
            vector2(0.0,0.0)
        }, 
        {
            debugGrid=config.debug,
            minZ = 0.0,
            maxZ = 0.0,
            data = {}
        }
    ),
}

Exits = {
    ['NEWCINEMA01'] = vector4(0, 0, 0, 0) -- REQUIRED
}

Cinemas = {
    ['NEWCINEMA01'] = 'newcinema'
}

The Rooms variable is used to identify the room.

The Exit variable is used to determine where the player should go if they are removed from the session.

The Cinemas variable is used to identify which cinema this room belongs to.

How to create a polyzone?

-- 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)
  1. Now it is necessary to create the totems, so that players can buy movie tickets.

brnx-cinemasystem/modules/config/config.lua
config.totems = {
    enabled = true,
    locations = {
        { coords = vector3(0.0, 0.0, 0.0), distance = 1.2, config = 'newcinema' },
    }
}
  1. This isn't mandatory, but you can also add your cinema to the game map.

brnx-cinemasystem/modules/config/config.lua
config.blips = {
    { 
        coord = vector3(0.0,0.0,0.0),
        sprite = 135, 
        color = 29, 
        scale = 0.7, 
        name = 'Cinema | New Cinema'
    }
}
3

Create films

First, add your license to the tablet's permissions to gain access, or remove the permissions and leave it completely open.

brnx-cinemasystem/modules/server/custom/frameworks/yourframework.lua
-- This way you allow anyone to tamper with the control panel.
canAcessThePanel = function(source)
    return true
end

Last updated