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
endbuyItem
This is the store's purchase function
data:
price:
numberitem:
stringlabel:
stringimage:
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