Server guide

Framework functions

tryPayment


This function is to execute a payment

-- This is an example from the brnx-iceorinksystem qb.lua file

-- @param player: number | string
-- @param value: number
local function tryPayment(player, value)
    if (value) and value >= 0 then
        if (player?.Functions.GetMoney('cash') >= value) then
            player?.Functions.RemoveMoney('cash', value, 'Ice O Rink - Store')
            return true
        else
            if (player?.Functions.GetMoney('bank') >= value) then
                player?.Functions.RemoveMoney('bank', value, 'Ice O Rink - Store')
                return true
            end
        end
    end
    return false
end

buyItem


This is the store's purchase function

data:

  • price: number

  • item: string

  • label: string

  • image: string

hasTicket


This function checks if you have a ticket to access the arena.

canAcessTablet


This function is used to check if the player can open the music tablet

Last updated