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",        -- The title displayed in the header
    name = "Car Wash"               -- The name of the system in the header
}

Config.Options = {
    Language = 'en',                          -- Default language for the system (e.g., 'en', 'de', 'fr', etc.)
    UseOldEsx = false,                        -- Use the old ESX export method or the new one
    SharedObject = {
        ["client"] = "esx:getSharedObject",   -- Client-side shared object for ESX
        ["server"] = "esx:getSharedObject",   -- Server-side shared object for ESX
    },

    Packages = {
        [1] = { 
            Name = "Basic",                   -- Name of the package
            Price = 1500,                     -- Price for the Basic car wash package
            WashDuration = 5                  -- Duration (in seconds) for the Basic wash
        },
        [2] = { 
            Name = "Standard",                -- Name of the package
            Price = 3000,                     -- Price for the Standard car wash package
            WashDuration = 10                 -- Duration (in seconds) for the Standard wash
        },
        [3] = { 
            Name = "Premium",                 -- Name of the package
            Price = 5000,                     -- Price for the Premium car wash package
            WashDuration = 20                 -- Duration (in seconds) for the Premium wash
        },
    },

    Positions = {
        vector3(24.81, -1391.95, 28.32),      -- Location 1: Carwash position coordinates
        vector3(-699.87, -933.48, 18.01),     -- Location 2: Carwash position coordinates
    },
}

Config.Blip = {
    enabled = true,    -- Enable or disable the blip on the map
    sprite = 100,      -- Blip sprite ID for the car wash icon
    display = 4,       -- Display type (whether the blip is visible on the minimap, main map, etc.)
    scale = 0.8,       -- Scale of the blip icon
    color = 1,         -- Blip color ID (defines the color of the icon)
    shortrange = true, -- Should the blip only show when close by?
    text = "Carwash",  -- Blip name displayed on the map
}

Config.Marker = {
    Type = 1,                         -- Marker type (game-defined)
    Size = vector3(5.0, 5.0, 0.2),    -- Size of the marker (width, depth, height)
    Color = { r = 255, g = 255, b = 255, a = 155 }, -- Color of the marker (RGBA values) [White]
    BobUpAndDown = false,             -- Should the marker bob up and down?
    FaceCamera = false,               -- Should the marker face the player's camera?
    Rotate = 2,                       -- Marker rotation type (game-defined)
    TextureDict = false,              -- Texture dictionary for custom textures (nil for default)
    TextureName = false,              -- Texture name to apply to the marker (nil for default)
    DrawOnEntities = false            -- Should the marker be drawn on entities?
}

Config.Progressbar = {
    Enabled = false,                  -- Enable or disable the progress bar

    func = function(message, duration)
        if Config.Progressbar.Enabled then
            exports["rs_hud"]:Progressbar(true, message, duration * 1000)
        end
    end
}

-- Function to send a notification to the player
function SendNotification(message)
    TriggerEvent('esx:showNotification', message)
    -- TriggerEvent('rs_notify', 'Carwash', message , 'info', 5000)
end

-- Function to show a help notification
function ShowHelpNotify(msg, E)
    ESX.ShowHelpNotification(msg, E)
    -- exports["rs_hud"]:HelpNotify(msg, E)
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)


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.

Last updated