AV Scripts
StoreDiscord
  • Documentation
  • Guides
    • Dealerships
      • Installation
      • Admin Panel
        • Permissions
        • Creator
        • Import Vehicles
        • Warehouse
      • Dealership Panel
        • Dealership Blip
        • Overview
        • Auctions
        • Bank
        • Employees
        • Orders
        • Financing
        • Rentals
        • Showroom
        • Warehouse
        • Pre Owned
        • Settings
      • Showroom
      • 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

Custom APPs

Last updated 10 months ago

Custom APPs are only available for customers who bought the complete laptop bundle, if you don't own it please ignore this guide.

Startup order
## Make sure to start ox_lib and your framework first.
ensure ox_lib
ensure your_framework

ensure av_laptop
ensure av_apps
## your custom app(s):
ensure app_template
Restart Order
## When testing in game you probably will need to restart your custom app
## To do this you will need to restart the scripts in the following order:
ensure av_laptop
ensure av_apps
ensure your_custom_app
Other Info
# Plase DON'T try to register a custom APP using av_laptop files
# You need to create your own resource folder and register the app from there,
# that's why a template exists so u can copy/paste and add all the apps u want
  • Navigate to app_template/ui folder using your terminal.

  • Run command yarn to install dependencies.

  • Once all dependencies are fully loaded run yarn dev to start the project.

  • To build just run command yarn build or yarn build --w

  • If you don't want to build an APP but just to trigger a website to be shown in the laptop window, make sure to follow the template from config/_config.lua:

local resourceName = GetCurrentResourceName()
Config = {}
Config.App = { -- This config will open a website, you don't need the UI folder at all
    name = "template", -- You can modify this just make sure don't use duplicated app names
    label = "App Template", -- You can modify this
    resource = resourceName, -- don't modify this
    icon = resourceName..'/icon.png', -- don't modify this?
    website = "https://uwucatcafe.com/", -- custom website
    isEnabled = function()
        -- this check runs when the player opens the laptop, return true/false to enable/disable app
        return true
    end
}
  • If you don't want to open any window in laptop but you want to trigger an event from an external resource you can trigger a NUI Callback, check the config from config/_config.lua:

local resourceName = GetCurrentResourceName()
Config = {}
Config.App = { -- This config will trigger a NUIEvent (check client/nui/example)
    name = "template", -- You can modify this just make sure don't use duplicated app names
    label = "App Template", -- You can modify this
    resource = resourceName, -- don't modify this
    icon = resourceName..'/icon.png', -- don't modify this?
    event = "doSomething", -- trigger a nui event
    isEnabled = function()
        -- this check runs when the player opens the laptop, return true/false to enable/disable app
        return true
    end
}
  • This will trigger the NUI Callback from client/nui/example.lua

RegisterNUICallback("doSomething", function(data,cb)
    TriggerEvent("av_laptop:notification", Config['app_title'], "Event triggered from laptop", "success")
    cb("ok")
end)
  • The resource where the NUI callback is located needs to be the same resource that is used to register the APP using the registerApp export from client/editable/app.lua

Note: If you choose to just trigger a nui event you can delete the UI folder and all ui references from fxmanifest.lua

I don't provide any support for custom APPs, if you don't know how React works please hire a dev from Fiverr or any other platform, I won't do any custom commission at all, refrain from opening a ticket about custom apps.

1MB
app_template.zip
archive
unzip and install like any other resource