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

Exports

Last updated 3 months ago

In this page you will find some exports and events you can use from your external scripts to interact with av_laptop.

showLaptop(tablet,itemCheck)

Use this export to open the laptop and set it as background while you run some other UI in front.

params:

  • tablet? boolean: Enable the tablet prop and animation.

  • itemCheck? boolean: It will check if the player has the laptop item in their inventory and use the wallpaper for the interface. If the player does not have the item, it will return false and cancel the animation.

-- Example using bl_ui minigames:
RegisterCommand("minigame", function()
    local hasLaptop = exports['av_laptop']:showLaptop(true,true)
    if hasLaptop then
        local success = exports.bl_ui:DigitDazzle(3, {
            length = 4,
            duration = 5000,
        })
        exports['av_laptop']:hideLaptop()
    else
        print("Player doesn't have laptop item")
    end
end)

Note: Your minigame UI should have a z-index of 100 otherwise it will be hidden behind laptop UI.

hideLaptop()

Use it to close laptop when opened using showLaptop() export.

exports['av_laptop']:hideLaptop()

getSerial()

Use this export to retrieve the current laptop serial.

params:

  • none

returns:

  • string or false

local serial = exports['av_laptop']:getSerial()
print(serial) -- false or string

Wifi()

Use this export to get the current WiFi network the laptop is connected to.

returns:

  • string or nil

local WiFi = exports['av_laptop']:WiFi()
print(WiFi)

Wifi Event

  • The following event gets triggered when the player connects/disconnects from a hotspot, you can use it in your own resource:

RegisterNetEvent('av_laptop:WiFi', function(hotspot, state)
    print(hotspot, state)
    -- hotspot: string
    -- state: boolean
end)

av_laptop:closeApp

Use the following event to close a specific APP in player laptop.

params:

  • name string: APP name.

local appName = "boosting"
TriggerEvent("av_laptop:closeApp", appName)

av_laptop:close

Use this event to close laptop UI.

TriggerEvent('av_laptop:close')

isReady()

Returns true if av_laptop is loaded and ready to be used.

returns:

  • boolean

CreateThread(function()
    while not exports['av_laptop']:isReady() do Wait(500) end
    print("av_laptop is ready")
end