Documentation › Hunting System › Integrations › Remote Tablet

Remote Tablet

Open the hunting tablet from a command, key, item, phone or radial menu.

By default the tablet opens at the hunter NPC. You can also let players open it anywhere. The remote tablet shows the tabs from remoteTabs; the shop, selling and butcher always stay NPC-only.

lua
Config.Commands.tablet = 'hunttablet' -- chat command (false = off)

Config.Tablet = {
    remoteKey  = 'F7',             -- players can rebind it in GTA settings (false = off)
    remoteItem = 'hunting_tablet', -- usable item (false = off)
    remoteTabs = {
        'dashboard', 'party', 'trapper', 'map', 'traps', 'quests', 'trophies',
        'animals', 'stats', 'leaderboard', 'history', 'guide',
    },
}

From a phone, radial menu or other resource

lua
exports.smilescripts_hunting:OpenHuntingTablet('dashboard') -- any tab from remoteTabs
exports.smilescripts_hunting:CloseHuntingTablet()
lua
lib.addRadialItem({
    id = 'hunting_tablet',
    icon = 'paw',
    label = 'Hunting',
    onSelect = function() exports.smilescripts_hunting:OpenHuntingTablet('dashboard') end,
})
lua
exports['qb-radialmenu']:AddOption({
    id = 'hunting_tablet',
    title = 'Hunting',
    icon = 'paw',
    type = 'client',
    event = 'smilescripts_hunting:client:openRemoteTablet',
    shouldClose = true,
})

Blocking the tablet

Bridge.CanOpenTablet in bridge/client/tablet.lua blocks opening while the player is dead or cuffed. Add your own conditions there (in a vehicle, in jail, ...).