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 = "Duty System"                   -- The name of the system in the header
}

Config.Options = {
    Language = 'en',                       -- Default language for the system (can be changed to other language codes like 'de', 'fr', etc.)
    UseOldEsx = false,                     -- Set to true if you are using the old ESX export method
    SharedObject = {                       -- Define the shared object for ESX, depending on the client and server side
        ["client"] = "esx:getSharedObject", -- Client-side ESX shared object
        ["server"] = "esx:getSharedObject", -- Server-side ESX shared object
    }
}

Config.Duty = {
    CreateJobsOnStartUp = false,           -- If true, off duty jobs will be created automatically on server startup
    CreateWaitTime = 200,                  -- Wait time (in milliseconds) before creating jobs on startup
    OffDutySalery = 500,                   -- Salary amount when players are off duty
    OffDutyPrefix = "off-",                -- Prefix added to the job name to indicate off-duty status (e.g., "off-police")
    OffDutyName = "Off-Duty"               -- Default off-duty name
}

Config.Blip = {
    enabled = true,                        -- Enable/disable blips on the map for duty locations
    id = 408,                              -- Blip icon ID
    scale = 1.0,                           -- Scale of the blip
    color = 75,                            -- Color of the blip on the map
    Name = "Dutysystem",                   -- Name of the blip on the map
}

Config.Marker = {
    Type = 21,                             -- Marker type (21 is the standard 3D marker)
    Size = vector3(1.0, 1.0, 1.0),         -- Marker size (x, y, z)
    Color = { r = 255, g = 0, b = 0, a = 144 },  -- Marker color in RGBA format (red in this case)
    BobUpAndDown = false,                 -- If true, marker will bob up and down
    FaceCamera = true,                    -- If true, marker will always face the player's camera
    Rotate = false,                       -- If true, marker will rotate
    TextureDict = nil,                    -- Custom texture dictionary (if applicable, otherwise nil)
    TextureName = nil,                    -- Custom texture name (if applicable, otherwise nil)
    DrawOnEntities = false                -- If true, marker will be drawn on entities
}

Config.Jobs = {
    ["police"] = {                         -- Police duty station coordinates
        {x = 645.87, y = 7.67, z = 82.79}
    },
    ["ambulance"] = {                      -- Ambulance/EMS duty station coordinates
        {x = 299.88, y = -573.51, z = 43.26}
    },
    ["mechanic"] = {                       -- Mechanic duty station coordinates
        {x = -356.81, y = -108.61, z = 38.7}
    }
}

function SendNotification(msg)
    TriggerEvent('esx:showNotification', msg)
    -- TriggerEvent('rs_notify', 'Dutysystem', msg , 'info', 5000)
end

function Helpnotify(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)

CFG = {}

CFG.Webhooks = {
    Color = "16777215",
    Author = "ResmonStudio",
    AuthorURL = "https://cdn.discordapp.com/attachments/1115190062653640707/1224363148065374248/avatar.png?ex=661d380a&is=660ac30a&hm=5e7415d1f27e134352a3b2f46de4a0d0284569998c5852f6ca187569a842336e&",
    ThumbURL = "https://cdn.discordapp.com/attachments/1115190062653640707/1224363148065374248/avatar.png?ex=661d380a&is=660ac30a&hm=5e7415d1f27e134352a3b2f46de4a0d0284569998c5852f6ca187569a842336e&",
    Username = "RS | Logs",
    Webhooks = {
        jobchange = {'PUT_YOUR_WEBHOOK_HERE'},
    }
}

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
        ["GotOnDuty"] = "Entered service.",
        ["GotOffDuty"] = "Went off-duty.",
        ["HelpNotify"] = "Press ~INPUT_CONTEXT~ to interact",
    },

    ['de'] = {  -- German
        ["GotOnDuty"] = "Dienst angetreten.",
        ["GotOffDuty"] = "Dienst beendet.",
        ["HelpNotify"] = "Drücke ~INPUT_CONTEXT~, um zu interagieren",
    },

    ['cs'] = {  -- Czech
        ["GotOnDuty"] = "Vstoupil do služby.",
        ["GotOffDuty"] = "Šel z služby.",
        ["HelpNotify"] = "Stiskněte ~INPUT_CONTEXT~ pro interakci",
    },

    ['fr'] = {  -- French
        ["GotOnDuty"] = "Entré en service.",
        ["GotOffDuty"] = "Sorti du service.",
        ["HelpNotify"] = "Appuyez sur ~INPUT_CONTEXT~ pour interagir",
    },

    ['es'] = {  -- Spanish
        ["GotOnDuty"] = "Entró en servicio.",
        ["GotOffDuty"] = "Salió del servicio.",
        ["HelpNotify"] = "Presiona ~INPUT_CONTEXT~ para interactuar",
    },

    ['pt'] = {  -- Portuguese
        ["GotOnDuty"] = "Entrou em serviço.",
        ["GotOffDuty"] = "Saiu de serviço.",
        ["HelpNotify"] = "Pressione ~INPUT_CONTEXT~ para interagir",
    },

    ['pl'] = {  -- Polish
        ["GotOnDuty"] = "Wszedł na służbę.",
        ["GotOffDuty"] = "Zszedł ze służby.",
        ["HelpNotify"] = "Naciśnij ~INPUT_CONTEXT~, aby interagować",
    },

    ['it'] = {  -- Italian
        ["GotOnDuty"] = "Entrato in servizio.",
        ["GotOffDuty"] = "Uscito dal servizio.",
        ["HelpNotify"] = "Premi ~INPUT_CONTEXT~ per interagire",
    },

    ['tr'] = {  -- Turkish
        ["GotOnDuty"] = "Göreve başladı.",
        ["GotOffDuty"] = "Görevden çıktı.",
        ["HelpNotify"] = "~INPUT_CONTEXT~ ile etkileşime geçin",
    }
}

Last updated