Skip to content

Client Exports ​

Call these from any client script.

OpenDealership / CloseDealership

Opens a dealership's shop for this player, or closes any dealership menu. The server checks the shop as when the player walks up to it: they must be at that dealership (and a member for society shops).

OpenDealership returns true when the shop opened, false when another menu is open or the server said no (the player is told why).

lua
exports.fwb_dealerships:OpenDealership('pdm')
exports.fwb_dealerships:CloseDealership()
IsMenuOpen

Is a dealership menu open (shop, display card, boss menu, employee menu, admin)? Phones and other menus can wait until it closes.

lua
if exports.fwb_dealerships:IsMenuOpen() then return end
IsTestDriving / IsTestDriveVehicle

Is this player in a test drive, and is this vehicle (entity or net id) the car of that drive?

lua
exports.fwb_dealerships:IsTestDriving()
exports.fwb_dealerships:IsTestDriveVehicle(vehicle)
IsDeliveryVehicle

Is this vehicle this player's delivery truck or its trailer?

lua
exports.fwb_dealerships:IsDeliveryVehicle(vehicle)
GetDealerships

The dealerships of the world, sorted by name.

lua
local list = exports.fwb_dealerships:GetDealerships()
-- { { id, label, kind = 'server' | 'job' | 'player', enabled, closed, coords }, ... }

FWB Studio documentation.