Server
useCityTourBoard (ox_inventory)
Primary entry for ox_inventory usable items.
Item setup:
['citytour_board'] = {
label = 'City Tour Board',
weight = 500,
stack = false,
close = true,
consume = 0,
description = 'Place a City Tour table in the world',
server = {
export = 'cdev_citytour.useCityTourBoard',
},
},exports('useCityTourBoard', function(event, item, inventory, slot, data)
-- ox_inventory usable-item callback
-- Triggers client placement when event == 'usingItem'
end)Always keep consume = 0. The resource removes the item when placement starts and returns it on cancel.
Public server API (public/server/api.lua)
Buyer-editable helpers used by core (do not remove; you may adapt bridges behind them):
Api.IsAdmin(source)
ACE check (CityTourConfig.ACE.Admin)
Api.GetCitizenId(source)
Persistent character id
Api.GetCash / Api.GetBank / Api.GetVip
Balances
Api.GetBalance(source, account)
cash / bank / vip
Api.AddMoney / Api.RemoveMoney
Economy (vip goes through the VIP bridge)
Api.Notify(source, message, type)
Single notify path to client bridge
VIP bridge (public/bridge/vip/server.lua)
Required API used by Real-mode vip account:
Vip.GetBalance(source)
number
Vip.Remove(source, amount, reason)
boolean
Vip.Add(source, amount, reason)
boolean
Default mode is qbox_crypto (QB/Qbox players.money JSON key, usually crypto). Switch VIP_CFG.Mode to "export" or "custom" for another economy.
Last updated