Server guide

Make sure to check the qb.lua and esx.lua files for examples on how to implement the script for your framework. They are always up to date with the latest changes.

Framework functions

getIdentifier

This function is used to retrieve a player's identifier to manage and verify tickets.


-- This is an example from the brnx-cinemasystem esx.lua file

-- @param source: number
getIdentifier = function(source)
    return GetPlayerIdentifierByType(source, 'license')
end

canAcessThePanel


This function is used to check who can access the tablet.

-- This is an example from the brnx-cinemasystem esx.lua file

-- @param source: number
canAcessThePanel = function(source)
    local license <const> = GetPlayerIdentifierByType(source, 'license')
    if not license then return false end
    local licenses <const> = {
        ['license:xxxxxxxxxxxxxxxxxxxxxxxx'] = true
    }
    return licenses[license]
end

tryPayment


This function is used to attempt to process the payment.

buyTicket


This function is used to buy the tickets

data:

  • cinema: string

  • id: number

  • room: string

  • time: string

filmData:

  • name: string

  • minutes: string

  • img: string

  • synopsis: string

  • schedules: table

  • price: number

buyItem


This function is used to purchase items from the cinema store.

itemData:

  • item: string

  • label: string

  • image: string

  • price: number

Last updated