Configuration


1. Configure cl_config.lua

In this section, you will configure the client-side configuration file cl_config.lua. Follow the instructions below to set it up according to your framework (ESX or QBcore).

Config = {}

Config.Header = {
    title = "RESMONSTUDIO",          -- Title displayed in the header of the UI.                      
    name = "Vehinspect"              -- The name of the system (used for identification within the header).
}

Config.Options = {
    Language = 'en',                 -- The default language for all messages and notifications. 'en' stands for English.
    UseNewEsx = true,                -- Whether to use the newer version of ESX (EssentialMode). Set to `true` to enable.
    UseVersionCheck = true,          -- Whether to perform version checks for resource compatibility (set to `true` to enable).
    
    Overextended = {
        Enabled = false,              -- Enable or disable Overextended support for features like OxTarget.
        UseOXInventory = false,       -- Enable integration with OX Inventory system for interactions.
        UseOxTarget = false,          -- Enable or disable OxTarget integration for interactive elements.
        TargetIcon = "fa-solid fa-wrench",  -- The icon shown when interacting with vehicles or objects.
        TargetText = "Inspect Vehicle",    -- The text shown during interaction with a vehicle.
    },
    
    SharedObject = {
        client = "esx:getSharedObject",  -- The shared object used for client-side communication with ESX.
        server = "esx:getSharedObject"   -- The shared object used for server-side communication with ESX.
    },

    TUV = {                           -- Configuration settings related to the Technical Vehicle Inspection (TUV).
        MinDays = 1,                  -- The minimum number of days a vehicle can have before needing inspection.
        MaxDays = 30,                 -- The maximum number of days a vehicle’s inspection is valid.
        Givetuv = {                   -- Settings for giving a vehicle TUV (inspection certificate).
            allowed = { ["police"] = true, ["mechanic"] = true },  -- Jobs allowed to issue TUV (e.g., police and mechanic).
            UseMoney = { enabled = true, cost = 500 }   -- Whether giving TUV requires a monetary fee. If enabled, the cost is 500.
        },
        Removetuv = {                 -- Settings for removing a vehicle’s TUV (inspection certificate).
            allowed = { ["police"] = true, ["mechanic"] = true },  -- Jobs allowed to remove TUV (e.g., police and mechanic).
            UseMoney = { enabled = true, cost = 1500 }  -- Whether removing TUV requires a monetary fee. If enabled, the cost is 1500.
        },
        Locktuv = {                   -- Settings for locking a vehicle’s TUV (making it unchangeable).
            allowed = { ["police"] = true },  -- Only 'police' job can lock the TUV.
            UseMoney = { enabled = true, cost = 5000 }  -- Whether locking the TUV requires a fee. If enabled, the cost is 5000.
        },
        Relocktuv = {                 -- Settings for relocking a vehicle’s TUV (preventing changes again).
            allowed = { ["police"] = true },  -- Only 'police' job can relock the TUV.
            UseMoney = { enabled = true, cost = 10000 }  -- Whether relocking the TUV requires a fee. If enabled, the cost is 10000.
        }
    },
    
    UseItem = {
        enabled = true,                -- Enable or disable the item-based interaction for vehicle inspection.
        item = 'inspect',              -- The name of the item that triggers the inspection action when used.
        allowed = {                    -- Job restrictions for using the item to inspect vehicles.
            enabled = true,            -- Whether job-based restrictions are enabled.
            ["police"] = true,         -- Allow police job to use the inspection item.
            ["mechanic"] = true        -- Allow mechanic job to use the inspection item.
        },
    },

    Command = {
        enabled = true,                -- Enable or disable the command-based interaction for vehicle inspection.
        command = "inspect",           -- The command that triggers vehicle inspection when typed in chat.
        key = "F9",                    -- The keyboard key binding to trigger the inspection command.
        allowed = {                    -- Job-based restrictions for using the command.
            enabled = true,            -- Whether job restrictions are enabled for the command.
            ["police"] = true,         -- Allow the police job to use the command.
            ["mechanic"] = true        -- Allow the mechanic job to use the command.
        }
    },
    
    Positions = {
        [1] = {
            enabled = true,             -- Enable or disable the position for vehicle inspection.
            coords = vector3(-68.24, -1333.27, 29.28),  -- Coordinates in the game world where the inspection position is located.
            allowed = {                 -- Job restrictions for interacting at this position.
                enabled = true,         -- Whether job-based restrictions apply to this position.
                Useallowjob = { ["police"] = true, ["mechanic"] = true }  -- Which jobs are allowed to interact at this position.
            },

            ped = { 
                enabled = false,         -- Set to true if a ped (NPC) should be spawned at this position.
                model = "a_m_m_hasjew_01", -- The model (character) of the ped to spawn at this position.
                heading = 186.21          -- The heading (direction) the ped will face.
            },
    
            entity = {
                enabled = false,         -- Set to true if an object (prop) should be spawned at this position.
                object = "prop_office_desk_01", -- The model of the object (prop) to spawn at this position.
            },
            
            marker = {                   -- Settings for a marker that appears at the position.
                enabled = true,          -- Whether the marker is visible at this position.
                type = 21,               -- The type of marker (ID).
                drawDistance = 15.0,     -- The distance at which the marker will be visible to the player.
                scale = vector3(1.0, 1.0, 1.0),  -- The scale (size) of the marker.
                color = { red = 255, green = 0, blue = 0, alpha = 100 },  -- The color and transparency of the marker.
                moveUpAndDown = false,   -- Whether the marker should move up and down.
                rotate = true            -- Whether the marker should rotate.
            },
            blip = {                     -- Settings for the blip on the map at this position.
                enabled = true,          -- Whether the blip is visible on the map.
                sprite = 446,            -- The sprite ID for the blip icon.
                scale = 0.7,             -- The size of the blip on the map.
                color = 27,              -- The color of the blip.
                display = 4,             -- The display mode of the blip (e.g., when in range).
                shortRange = true,       -- Whether the blip is visible only when close to the player.
                text = 'TüV Inspection'  -- The text label for the blip.
            }
        },
    }
}

-- Function to show a help notification
function ShowHelpNotify(msg, E)
    ESX.ShowHelpNotification(msg, E)
    -- exports["rs_hud"]:HelpNotify(msg, E)
end  

-- Function to show a notification
function Notify(msg)
    TriggerEvent('esx:showNotification', msg)
    -- TriggerEvent('rs_notify', 'Vehicle - Inspection', msg , 'info', 5000)
end

2. Configure sv_config.lua

In this section, you will configure the server-side configuration file sv_config.lua. Follow the instructions below to set it up according to your framework (ESX or QBcore)

CFG = {}

CFG.Webhooks = {
    Color = "16777215",  -- White color (hexadecimal value for white is 16777215)
    Author = "ResmonStudio",  -- This is the author name displayed in the webhook message
    AuthorURL = "https://i.ibb.co/PZDN7K4/logo.png",  -- Link to the logo image of ResmonStudio
    ThumbURL = "https://i.ibb.co/PZDN7K4/logo.png",  -- The logo is used as the thumbnail in the webhook
    Username = "RS | Logs",  -- This name will appear as the username of the webhook sender
    Webhooks = {
        inspection = {'PUT_YOUR_WEBHOOK_HERE'},  -- Replace this with your actual inspection webhook URL
    }
}

-- Function to remove a specified amount of money from a player's account
function xPlayerRemoveMoney(xPlayer, amount)
    xPlayer.removeMoney(amount)
end

-- Function to get the current money balance of a player
function xPlayerGetMoney(xPlayer)
    return xPlayer.getMoney()
end

3. Select Languages in sh_languages.lua

In the sh_languages.lua file, you can manage all available language options. To set your preferred language and its corresponding translations, navigate to cl_config.lua and specify your desired locale. This allows you to customize the different languages.

Config.Languages = {
    ["en"] = { -- English
        ["HelpNotify"] = "Press [E] to interact",
        ["AccessDenied"] = "You are not allowed to access this position.",
        ["JobDenied"] = "Your job cannot perform this action.",
        ["InvalidTuvDays"] = "Please enter a valid number of days (%d-%d).",
        ["MissingAdditionalInfo"] = "Please provide a reason in the Additional Info field.",
        ["NoVehiclesSelected"] = "No vehicle selected.",
        ["ActionSuccess"] = "You have successfully made the %s action for vehicle %s and paid %d.",
        ["ActionSuccessNoMoney"] = "You have successfully made the %s action for vehicle %s.",
        ["NotEnoughMoney"] = "You don't have enough money for this action. You need %d.",
        ["VehicleLocked"] = "Vehicle is locked and cannot be given TÜV.",
        ["Givetuv"] = "Your vehicle with plate %s has been given TÜV certification.",
        ["Removetuv"] = "The TÜV certification for your vehicle with plate %s has been removed.",
        ["Locktuv"] = "The TÜV status of your vehicle with plate %s has been locked.",
        ["Relocktuv"] = "The TÜV status of your vehicle with plate %s has been relocked.",
        ["Reason"] = "Reason",
        ["InspectionDate"] = "Inspection Date"
    },
    ["de"] = { -- German
        ["HelpNotify"] = "Drücke [E] um zu interagieren",
        ["AccessDenied"] = "Du darfst diesen Standort nicht betreten.",
        ["JobDenied"] = "Dein Job kann diese Aktion nicht durchführen.",
        ["InvalidTuvDays"] = "Bitte geben Sie eine gültige Anzahl an Tagen (%d-%d) ein.",
        ["MissingAdditionalInfo"] = "Bitte geben Sie einen Grund im Feld 'Zusätzliche Info' an.",
        ["NoVehiclesSelected"] = "Kein Fahrzeug ausgewählt.",
        ["ActionSuccess"] = "Du hast die %s Aktion für Fahrzeug %s erfolgreich durchgeführt und %d bezahlt.",
        ["ActionSuccessNoMoney"] = "Du hast die %s Aktion für Fahrzeug %s erfolgreich durchgeführt.",
        ["NotEnoughMoney"] = "Du hast nicht genug Geld für diese Aktion. Du benötigst %d.",
        ["VehicleLocked"] = "Das Fahrzeug ist gesperrt und kann nicht mit TÜV versehen werden.",
        ["Givetuv"] = "Ihr Fahrzeug mit Kennzeichen %s hat eine TÜV-Zertifizierung erhalten.",
        ["Removetuv"] = "Die TÜV-Zertifizierung für Ihr Fahrzeug mit Kennzeichen %s wurde entfernt.",
        ["Locktuv"] = "Der TÜV-Status Ihres Fahrzeugs mit Kennzeichen %s wurde gesperrt.",
        ["Relocktuv"] = "Der TÜV-Status Ihres Fahrzeugs mit Kennzeichen %s wurde entsperrt.",
        ["Reason"] = "Grund",
        ["InspectionDate"] = "Prüfungsdatum"
    },
    ["cz"] = { -- Czech
        ["HelpNotify"] = "Stiskněte [E] pro interakci",
        ["AccessDenied"] = "Nemáte přístup na tuto pozici.",
        ["JobDenied"] = "Vaše práce tuto akci nemůže provést.",
        ["InvalidTuvDays"] = "Zadejte platný počet dní (%d-%d).",
        ["MissingAdditionalInfo"] = "Uveďte důvod v poli Další informace.",
        ["NoVehiclesSelected"] = "Nebylo vybráno žádné vozidlo.",
        ["ActionSuccess"] = "Úspěšně jste provedli akci %s pro vozidlo %s a zaplatili %d.",
        ["ActionSuccessNoMoney"] = "Úspěšně jste provedli akci %s pro vozidlo %s.",
        ["NotEnoughMoney"] = "Nemáte dostatek peněz pro tuto akci. Potřebujete %d.",
        ["VehicleLocked"] = "Vozidlo je zamčeno a nelze mu přiřadit TÜV.",
        ["Givetuv"] = "Vaše vozidlo s SPZ %s získalo TÜV certifikaci.",
        ["Removetuv"] = "Certifikace TÜV vašeho vozidla s SPZ %s byla odstraněna.",
        ["Locktuv"] = "TÜV status vašeho vozidla s SPZ %s byl uzamčen.",
        ["Relocktuv"] = "TÜV status vašeho vozidla s SPZ %s byl znovu odemknut.",
        ["Reason"] = "Důvod",
        ["InspectionDate"] = "Datum kontroly"
    },
    ["fr"] = { -- French
        ["HelpNotify"] = "Appuyez sur [E] pour interagir",
        ["AccessDenied"] = "Vous n'êtes pas autorisé à accéder à cet emplacement.",
        ["JobDenied"] = "Votre emploi ne peut pas effectuer cette action.",
        ["InvalidTuvDays"] = "Veuillez entrer un nombre valide de jours (%d-%d).",
        ["MissingAdditionalInfo"] = "Veuillez fournir une raison dans le champ Informations supplémentaires.",
        ["NoVehiclesSelected"] = "Aucun véhicule sélectionné.",
        ["ActionSuccess"] = "Vous avez réussi à effectuer l'action %s pour le véhicule %s et payé %d.",
        ["ActionSuccessNoMoney"] = "Vous avez réussi à effectuer l'action %s pour le véhicule %s.",
        ["NotEnoughMoney"] = "Vous n'avez pas assez d'argent pour cette action. Vous avez besoin de %d.",
        ["VehicleLocked"] = "Le véhicule est verrouillé et ne peut pas recevoir le TÜV.",
        ["Givetuv"] = "Votre véhicule avec la plaque %s a reçu la certification TÜV.",
        ["Removetuv"] = "La certification TÜV de votre véhicule avec la plaque %s a été retirée.",
        ["Locktuv"] = "Le statut TÜV de votre véhicule avec la plaque %s a été verrouillé.",
        ["Relocktuv"] = "Le statut TÜV de votre véhicule avec la plaque %s a été reverrouillé.",
        ["Reason"] = "Raison",
        ["InspectionDate"] = "Date d'inspection"
    },
    ["es"] = { -- Spanish
        ["HelpNotify"] = "Presiona [E] para interactuar",
        ["AccessDenied"] = "No tienes permiso para acceder a esta ubicación.",
        ["JobDenied"] = "Tu trabajo no puede realizar esta acción.",
        ["InvalidTuvDays"] = "Por favor, ingresa un número válido de días (%d-%d).",
        ["MissingAdditionalInfo"] = "Por favor, proporciona una razón en el campo Información Adicional.",
        ["NoVehiclesSelected"] = "No se seleccionó ningún vehículo.",
        ["ActionSuccess"] = "Has realizado con éxito la acción %s para el vehículo %s y pagado %d.",
        ["ActionSuccessNoMoney"] = "Has realizado con éxito la acción %s para el vehículo %s.",
        ["NotEnoughMoney"] = "No tienes suficiente dinero para esta acción. Necesitas %d.",
        ["VehicleLocked"] = "El vehículo está bloqueado y no puede recibir TÜV.",
        ["Givetuv"] = "Tu vehículo con matrícula %s ha recibido la certificación TÜV.",
        ["Removetuv"] = "Se ha eliminado la certificación TÜV de tu vehículo con matrícula %s.",
        ["Locktuv"] = "El estado TÜV de tu vehículo con matrícula %s ha sido bloqueado.",
        ["Relocktuv"] = "El estado TÜV de tu vehículo con matrícula %s ha sido re-bloqueado.",
        ["Reason"] = "Razón",
        ["InspectionDate"] = "Fecha de inspección"
    },
    ["pt"] = { -- Portuguese
        ["HelpNotify"] = "Pressione [E] para interagir",
        ["AccessDenied"] = "Você não tem permissão para acessar esta posição.",
        ["JobDenied"] = "Seu trabalho não pode executar esta ação.",
        ["InvalidTuvDays"] = "Por favor, insira um número válido de dias (%d-%d).",
        ["MissingAdditionalInfo"] = "Por favor, forneça um motivo no campo Informações Adicionais.",
        ["NoVehiclesSelected"] = "Nenhum veículo selecionado.",
        ["ActionSuccess"] = "Você realizou com sucesso a ação %s para o veículo %s e pagou %d.",
        ["ActionSuccessNoMoney"] = "Você realizou com sucesso a ação %s para o veículo %s.",
        ["NotEnoughMoney"] = "Você não tem dinheiro suficiente para esta ação. Você precisa de %d.",
        ["VehicleLocked"] = "O veículo está trancado e não pode receber TÜV.",
        ["Givetuv"] = "Seu veículo com placa %s recebeu a certificação TÜV.",
        ["Removetuv"] = "A certificação TÜV do seu veículo com placa %s foi removida.",
        ["Locktuv"] = "O status TÜV do seu veículo com placa %s foi bloqueado.",
        ["Relocktuv"] = "O status TÜV do seu veículo com placa %s foi re-bloqueado.",
        ["Reason"] = "Razão",
        ["InspectionDate"] = "Data de inspeção"
    },
    ["pl"] = { -- Polish
        ["HelpNotify"] = "Naciśnij [E], aby się interaktywnie",
        ["AccessDenied"] = "Nie masz dostępu do tej pozycji.",
        ["JobDenied"] = "Twoja praca nie może wykonać tej akcji.",
        ["InvalidTuvDays"] = "Proszę podać prawidłową liczbę dni (%d-%d).",
        ["MissingAdditionalInfo"] = "Proszę podać powód w polu Dodatkowe Informacje.",
        ["NoVehiclesSelected"] = "Nie wybrano żadnego pojazdu.",
        ["ActionSuccess"] = "Pomyślnie wykonano akcję %s dla pojazdu %s i zapłacono %d.",
        ["ActionSuccessNoMoney"] = "Pomyślnie wykonano akcję %s dla pojazdu %s.",
        ["NotEnoughMoney"] = "Nie masz wystarczająco dużo pieniędzy na tę akcję. Potrzebujesz %d.",
        ["VehicleLocked"] = "Pojazd jest zablokowany i nie może otrzymać TÜV.",
        ["Givetuv"] = "Twój pojazd z rejestracją %s otrzymał certyfikat TÜV.",
        ["Removetuv"] = "Certyfikat TÜV dla twojego pojazdu z rejestracją %s został usunięty.",
        ["Locktuv"] = "Status TÜV twojego pojazdu z rejestracją %s został zablokowany.",
        ["Relocktuv"] = "Status TÜV twojego pojazdu z rejestracją %s został ponownie zablokowany.",
        ["Reason"] = "Powód",
        ["InspectionDate"] = "Data inspekcji"
    },
    ["tr"] = { -- Turkish
        ["HelpNotify"] = "Etkileşim için [E] tuşuna basın",
        ["AccessDenied"] = "Bu konuma erişiminiz yok.",
        ["JobDenied"] = "Mesleğiniz bu işlemi gerçekleştiremez.",
        ["InvalidTuvDays"] = "Lütfen geçerli bir gün sayısı girin (%d-%d).",
        ["MissingAdditionalInfo"] = "Lütfen Ek Bilgi alanına bir neden girin.",
        ["NoVehiclesSelected"] = "Hiçbir araç seçilmedi.",
        ["ActionSuccess"] = "%s işlemini araç %s için başarıyla gerçekleştirdiniz ve %d ödediniz.",
        ["ActionSuccessNoMoney"] = "%s işlemini araç %s için başarıyla gerçekleştirdiniz.",
        ["NotEnoughMoney"] = "Bu işlem için yeterli paranız yok. %d gerekiyor.",
        ["VehicleLocked"] = "Araç kilitli ve TÜV verilemez.",
        ["Givetuv"] = "Plakası %s olan aracınıza TÜV sertifikası verildi.",
        ["Removetuv"] = "Plakası %s olan aracınızın TÜV sertifikası kaldırıldı.",
        ["Locktuv"] = "Plakası %s olan aracınızın TÜV durumu kilitlendi.",
        ["Relocktuv"] = "Plakası %s olan aracınızın TÜV durumu tekrar kilitlendi.",
        ["Reason"] = "Sebep",
        ["InspectionDate"] = "Muayene Tarihi"
    }
}

Last updated