AV Scripts
StoreDiscord
  • Documentation
  • Guides
    • Dealerships
      • Installation
      • Admin Panel
        • All Vehicles
        • Dealerships
        • Auctions
      • Dealership Panel
        • Overview
        • Auctions
        • Employees
        • Orders
        • Payments
        • Showroom
        • Warehouse
        • Pre Owned
        • Settings
      • Buy/Sell Vehicles
      • Catalogue
      • Exports
      • FAQ
    • House Robbery
      • Installation
      • Add Shells
      • Dispatch
      • Exports
      • Weather
      • Minigames
      • Notifications
      • New Houses
      • Object Types
      • Sell Items
    • Illegal Runs
      • Installation
      • Customization
      • Ox Inventory
      • QB Inventory
    • Multicharacter
      • Installation
      • Character Slots
      • Clothes
      • Scenes
        • Previews
      • Exports
      • Weather
    • Paleto Heist
      • Buy here
    • Refund System
      • Installation
        • Inventories
    • Tuning Script
      • Installation
      • Events and Controls
      • Exports
      • Price Multiplier
    • Vehicleshop
      • Installation
      • Admin Panel
      • Addon Vehicles
      • Functions
        • Fuel
        • Keys
        • VIP
        • Weather
      • Garages
      • HUD
      • Society
    • Weather Script
      • Installation
      • Breath Condensation
      • Fog
      • Real Time Sync
      • Exports
    • VIP Script
      • Installation
      • Exports
      • Categories
      • Admin
      • Tebex
      • Free Tokens
  • LAPTOP PACK V3
    • Laptop v3
      • Installation
        • Inventory
        • Cosmo
        • Permissions
        • QBCore
        • Custom Framework/Inventory
        • Phone
        • Translate
      • Browser
      • Terminal
      • Documents
      • APPs Config
      • Exports
    • Boosting
      • Create Profile
      • APP
      • Contracts
      • Dispatch
      • Lockpick Export
      • VIN Export
    • Business
      • Installation
        • Inventories
          • Origen Inventory
            • ESX
            • QBCore
          • OX Inventory
          • QB/PS/LJ Inventory
          • Quasar Inventory
            • ESX
            • QBCore
          • Codem Inventory
          • Tgiann Inventory
        • ESX
      • Admin Panel
        • Create Zones
        • Edit Zones
      • Config
        • Animations
        • Blips
        • Buttons
        • Crafting
        • Effects
        • Events
          • Items
          • Zones
        • Logs
          • Custom Logs
        • Permissions
      • Exports
      • Banking Scripts
      • Multijobs
    • Cameras
      • Installation
        • Vehicle Cameras
      • Place Camera
      • Job Cameras
    • Drugs
      • Installation
      • Admin Panel
      • APP
      • Tables
      • Labs
        • PC
        • Raids
      • Alert Cops
      • Shells
      • Exports
    • Gangs
      • Installation
      • Admin Panel
        • Gangs
        • Whitelist
      • Properties
      • Register Gang
      • APP
        • Members
        • Settings
        • Missions
        • Blackmarket
        • Properties
      • Graffitis
      • Missions
      • Gang NPC
      • Shells
      • Exports
      • Labs
    • Groups
      • Events
      • Exports
    • Music
      • Installation
      • Music Labels
      • APP
        • Search Music
        • Playlists
        • Headphones
      • CDs
    • Racing
      • Installation
        • Permissions
        • Discord Logs
        • Addon Vehicles
      • Admin Panel
      • Categories
      • Events
      • Exports
      • Personal Settings
      • The Underground
    • Custom APPs
    • Discord Support
Powered by GitBook
On this page
  1. LAPTOP PACK V3
  2. Laptop v3

APPs Config

All APPs comes enabled by default, is important that if you want to restrict the access to an APP you add your own check by using your own exports or one of the ones provided here.

This is how the config for an APP looks like by default, you can find this code in every config.lua.

Config.App = {
    name = "boosting",
    label = "Boosting", -- You can rename the app by editing this field
    isEnabled = function()
        return true
    end
}

The following snippets are just examples for most common cases, add your own checks or use other scripts exports for this.

If you want to restrict an APP so only players with X item(s) can access it, you can use the following export:

Config.App = {
    name = "boosting",
    label = "Boosting",
    isEnabled = function()
        return exports['av_laptop']:hasItem('water')
    end
}

The export hasItem also support a table of items for situations where you want to verify if the player owns more than 1 item at the same time:

Config.App = {
    name = "boosting",
    label = "Boosting",
    isEnabled = function()
        return exports['av_laptop']:hasItem({"water", "sandwich"})
    end
}

The following example will block players with leo job type from accessing this app and will only allow people with X item:

Config.App = {
    name = "boosting",
    label = "Boosting", -- You can rename the app by editing this field
    isEnabled = function()
        if exports['av_laptop']:hasJob("leo") then -- u can use job name or job type
            return false
        end
        return exports['av_laptop']:hasItem("water")
    end
}

With the following example only the players with ambulance job can access the app:

Config.App = {
    name = "boosting",
    label = "Boosting", -- You can rename the app by editing this field
    isEnabled = function()
        return exports['av_laptop']:hasJob("ambulance")
    end
}

We can enable APPs if the laptop is connected to a specific hotspot, in this example if the player is connected to the uwucafe hotspot the boosting APP will be enabled, this APP will be removed as soon as the player gets disconnected from the hotspot.

Config.App = {
    name = "boosting",
    label = "Boosting", -- You can rename the app by editing this field
    isEnabled = function()
        return (exports['av_laptop']:WiFi() == "uwucafe")
    end
}

Last updated 9 months ago