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
        • Inventories
      • Add Shells
      • Dispatch
      • Exports
      • Weather
      • Minigames
      • Notifications
      • New Houses
      • Object Types
    • 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
        • Roxwood Map
      • 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
    • Contacts
      • Exports
    • 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. Business

Multijobs

For servers using multi job scripts who wants to avoid players from losing their permissions, you need to go to av_business/server/editable/job.lua and do the following modifications:

  • Delete from line 9 to line 20, it should look something like this:

RegisterNetEvent("QBCore:Server:OnJobUpdate", function(source,job)
    if source and job then
        local jobName = job.name
        local identifier = exports['av_laptop']:getIdentifier(source)
        if allBusiness[jobName] then
            allBusiness[jobName]['employees'] = allBusiness[jobName]['employees'] or {}
            if not allBusiness[jobName]['employees'][identifier] then
                allBusiness[jobName]['employees'][identifier] = {
                    identifier = identifier,
                    name = exports["av_laptop"]:getName(source),
                    image = "",
                    phone = "",
                    generated = 0,
                    lastSeen = "",
                    hours = 0,
                    permissions = {}
                }
                save("business")
            end
        end
    end
end)
  • Remove from line 45-57, should look something like this:

RegisterNetEvent("esx:setJob", function(source,job)
    local src = source
    if src and job then
        local jobName = job.name
        local identifier = exports['av_laptop']:getIdentifier(src)
        if allBusiness[jobName] then
            allBusiness[jobName]['employees'] = allBusiness[jobName]['employees'] or {}
            if not allBusiness[jobName]['employees'][identifier] then
                allBusiness[jobName]['employees'][identifier] = {
                    identifier = identifier,
                    name = exports["av_laptop"]:getName(src),
                    image = "",
                    phone = "",
                    generated = 0,
                    lastSeen = "",
                    hours = 0,
                    permissions = {}
                }
                save("business")
            end
        end
        exports['av_laptop']:savePlayer(src)
    end
end)

Last updated 9 months ago