Bablo ResourcesDocs

Staff Tablet

The staff tablet is an inventory item that opens part of the Management Panel anywhere inside the dealership, so staff can sell on the showroom floor instead of at the desk. It opens two tabs: Stock and Showroom floor.

Tablets exist at player-owned dealerships only. Taking and using one needs the permission in Config.Tablet.Permission, which is sell by default. The item has to be added to your inventory once, see Adding the item.


Taking a tablet

  1. Open the management panel at the desk.
  2. Click Tablet at the top of the panel. The Dealership tablet window shows what the tablet opens and its Cost.
  3. Click Take tablet. The window confirms with The tablet is in your inventory.
RuleDetail
One eachYou can carry one tablet per dealership. While you carry one, the Tablet button is not shown.
CostConfig.Tablet.Price is charged to the dealership account, not to you, and listed there as Tablet. At 0 the window says Free.
Short accountIf the account cannot cover the price, you get The dealership account cannot cover the $ 500 for a tablet.
Full inventoryThe tablet could not be added to your inventory. Make room and try again. Nothing is charged.
AdminsA server admin who manages the dealership as admin does not get the button.

Every tablet belongs to the dealership it was taken from. The name of the dealership is saved on the item.


Using the tablet

Use the item from your inventory. Your character holds a tablet, and the panel opens in a tablet frame with the caption Dealership tablet.

TabNeedsWhat you can do
StocksellSell a vehicle to a customer and start test drives. See Staff Sales and Test Drives.
Showroom floorinventoryAdd, change and remove display vehicles. See Showroom Floor.

The tablet is put away when you close the panel, when you die, or when you walk out of the dealership: You left Premium Deluxe Motorsport, so the tablet was put away.

IfYou get
You no longer work at the dealership, your rank lacks the permission, or the dealership is disabledThis tablet only opens for staff of Premium Deluxe Motorsport.
You stand outside the dealershipThe tablet only works inside Premium Deluxe Motorsport.
Another window of the script is openClose what you have open first.
The item was not taken from a management panel, or its dealership was deletedThis tablet does not belong to a dealership. Take one from the management panel.

Where it works

  • Inside the dealership area that was drawn in the Dealership Creator.
  • If the dealership has no area, within Config.Tablet.Radius metres of one of its management desks or showroom entrances, 60 by default.

Settings

LUA
Config.Tablet = {
    Enabled = true,
    Item = 'bdealer_tablet',
    Price = 0,
    Permission = 'sell',
    Radius = 60.0,
    Prop = 'prop_cs_tablet',
    Animation = { dict = 'amb@code_human_in_bus_passenger_idles@female@tablet@base', clip = 'base' },
    Bone = 60309,
    Offset = vector3(0.03, 0.002, 0.0),
    Rotation = vector3(10.0, 160.0, 0.0),
}
KeyDefaultMeaning
Enabledtruefalse removes the Tablet button and stops the item from opening anything.
Itembdealer_tabletThe inventory item name.
Price0Charged to the dealership account for each tablet. 0 is free.
PermissionsellThe staff permission needed to take and use a tablet.
Radius60.0Metres around the desk and the showroom entrance in which the tablet works when a dealership has no area. At least 5.
Propprop_cs_tabletThe prop the character holds.
AnimationTablet idleThe animation played while the tablet is open.
Bone60309The hand bone the prop is attached to. 60309 is the left hand, 28422 the right hand.
Offset, RotationPosition and rotation of the prop in the hand.

Adding the item

The item has to exist in your inventory before a tablet can be handed out. Add it once and restart the inventory or the server. The script makes the item usable by itself. If you rename the item, change Config.Tablet.Item too.

For qb-inventory and ps-inventory, add this line to qb-core/shared/items.lua:

LUA
bdealer_tablet = { name = 'bdealer_tablet', label = 'Dealership tablet', weight = 500, type = 'item', image = 'bdealer_tablet.png', unique = true, useable = true, shouldClose = true, description = 'Sell vehicles and run the showroom floor inside your dealership.' },

Item picture

Copy bdealer_tablet.png from the inventoryImages folder of the script into the image folder of your inventory:

InventoryFolder
qb-inventoryqb-inventory/html/images/
ps-inventoryps-inventory/html/images/
ox_inventoryox_inventory/web/images/

If no supported inventory is running, the Tablet button is not shown at all. Which inventory the script uses is set with Config.Inventory, see Configuration.