KUB Chop Shop

Import & overrides

In kub_chop root directory create a file called imports.lua, in which copy-paste the following code:

local isServer = IsDuplicityVersion()
local appId = 'kub_chop'

if isServer then
    CreateThread(function()
        while GetResourceState("fd_laptop") ~= "started" do
            Wait(500)
        end

        local added, errorMessage = exports.fd_laptop:addCustomApp({
            id = appId,
            name = "Chop Shop",
            isDefaultApp = true,
            needsUpdate = false,
            icon = 'chop.svg',
            ui = ("https://cfx-nui-%s/web/index.html"):format(GetCurrentResourceName()),
            deviceId = 'usb_chop',
            isAlpine = true,
            keepAlive = true,
            overrides = {
                ("https://cfx-nui-%s/web/dist/kubOverrides.js"):format('fd_laptop'),
            },
            windowDimensions = {
                width = 1280,
                height = 820,
            },
            windowActions = {
                isResizable = false,
                isMaximizable = false,
                isClosable = true,
                isMinimizable = false,
                isDraggable = false
            },
            windowDefaultStates = {
                isMaximized = true,
                isMinimized = false
            },
            onUseServer = function(source)
                SetTimeout(1000, function()
                    TriggerClientEvent("kub_chop:client:openTablet", source)
                end)
            end,
        })

        if not added then
            print("Could not add app:", errorMessage)
        end
    end)
end

if not isServer then
    local OriginalSendNUIMessage = SendNUIMessage

    function SetNuiFocus(hasCursor, disableInput) end

    function SendNUIMessage(data)
        if data.type == 'setVisibility' then
            exports.fd_laptop:sendAppMessage(appId, data)
            return
        end

        exports.fd_laptop:sendAppMessage(appId, data)
        OriginalSendNUIMessage(data)
    end
end

Edit fxmanifest.lua

At the root of kub_chop directory open fxmanifest.lua file with your preferred file editor and add imports.lua to shared_scripts block. After edit, shared_scripts block should look like this:

    shared_scripts {
        '@ox_lib/init.lua',
        'imports.lua',
        'public/config/shared/**/*',
        'shared/**/*',
    }

Restart / Start server

Once you completed steps above, restart or start your server and enjoy KUB Trucking while using our laptop.

Copyright © 2025 Felis Development