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).

RESMON = {}

RESMON.Options = {
    EnableDebug = false,           -- Enabled debug mode. DONT USE IN PRODUCTION
    UseOldEsx = false,            -- Option to use the old ESX method (true) or the new ESX export method (false)
    UseOneSyncSpawn = true,       -- Set to `true` for server-side spawning, `false` for client-side.
    SetPedInCar = true,           -- Spawn the player inside the car 
    StoreVehicles = true,         -- Store all vehicles in the garage after a server restart / false if u use AdvancedParking
    Impoundprice = 500,           -- Price to pay to retrieve a vehicle from the impound lot
    SharedObject = {
        client = "esx:getSharedObject", -- Event to get the ESX object on the client-side
        server = "esx:getSharedObject", -- Event to get the ESX object on the server-side
    }
}

RESMON.Marker = {
    Type = 21, -- Type of the marker (21 is a specific type used in FiveM)
    Scale = vector3(1.0, 1.0, 1.0), -- Size of the marker in 3D space
    Color = { r = 187, g = 0, b = 0, alpha = 140 }, -- Color of the marker in RGBA format
    BobUpAndDown = false, -- Determines if the marker should bob up and down
    FaceCamera = false, -- Determines if the marker should always face the camera
    Rotate = false, -- Determines if the marker should rotate
    DrawOnEnts = false -- Determines if the marker should be drawn on entities
}

RESMON.Blips = {
    ["car"] = {
        ["sprite"] = 524,    -- Sprite ID for car garage blip
        ["scale"] = 0.8,     -- Scale of the blip
        ["color"] = 1,       -- Color of the blip
        ["display"] = 4,     -- Display type of the blip
        ["shortrange"] = true, -- Whether the blip should only be visible at short range
        ["text"] = "Garage", -- Text label for the blip
    },
    ["boat"] = {
        ["sprite"] = 410,    -- Sprite ID for boat garage blip
        ["scale"] = 0.8,     -- Scale of the blip
        ["color"] = 1,       -- Color of the blip
        ["display"] = 4,     -- Display type of the blip
        ["shortrange"] = true, -- Whether the blip should only be visible at short range
        ["text"] = "Boat-Garage", -- Text label for the blip
    },
    ["airplane"] = {
        ["sprite"] = 307,    -- Sprite ID for airplane garage blip
        ["scale"] = 0.8,     -- Scale of the blip
        ["color"] = 1,       -- Color of the blip
        ["display"] = 4,     -- Display type of the blip
        ["shortrange"] = true, -- Whether the blip should only be visible at short range
        ["text"] = "Airplane-Garage", -- Text label for the blip
    },
    ["impound"] = {
        ["sprite"] = 67,     -- Sprite ID for impound blip
        ["scale"] = 0.8,     -- Scale of the blip
        ["color"] = 1,       -- Color of the blip
        ["display"] = 4,     -- Display type of the blip
        ["shortrange"] = true, -- Whether the blip should only be visible at short range
        ["text"] = "Impound", -- Text label for the blip
    }
}

RESMON.Locations = {
    -- Car garages
    {
        type = "car",
        sort = "garage",
        coords = vector3(214.74, -806.28, 30.8135),
        blip = "enabled",
        ped = { 
            enabled = "false", 
            model = "s_m_m_security_01", 
            heading = 343.66 
        },
        spawns = {
            {coords = vector3(217.1925, -799.3695, 30.7825), heading = 68.1446, radius = 1.0},
            {coords = vector3(218.45, -793.9484, 30.7726), heading = 63.1923, radius = 1.0},
            {coords = vector3(221.4974, -786.6737, 30.7739), heading = 73.1179, radius = 1.0}
        }
    },
    {
        type = "car",
        sort = "garage",
        coords = vector3(-1686.5045, 56.0113, 64.1332),
        blip = "enabled",
        ped = { 
            enabled = "false", 
            model = "s_m_m_security_01", 
            heading = 147.53 
        },
        spawns = {
            {coords = vector3(-1691.4906, 55.2479, 64.3073), heading = 341.64, radius = 1.0},
            {coords = vector3(-1694.0277, 57.8321, 64.4827), heading = 341.64, radius = 1.0},
            {coords = vector3(-1696.6637, 60.2889, 64.6753), heading = 341.64, radius = 1.0}
        }
    },
    {
        type = "car",
        sort = "garage",
        coords = vector3(122.6262, 6406.2378, 31.3621),
        blip = "enabled",
        ped = { 
            enabled = "false", 
            model = "s_m_m_security_01", 
            heading = 310.51 
        },
        spawns = {
            {coords = vector3(137.9854, 6413.0479, 31.2735), heading = 248.6428, radius = 1.0},
            {coords = vector3(146.3082, 6414.3169, 31.2445), heading = 257.0422, radius = 1.0}
        }
    },
    -- Boat garages
    {
        type = "boat",
        sort = "garage",
        coords = vector3(-730.9018, -1318.7852, 1.5955),
        blip = "enabled",
        ped = { 
            enabled = "false", 
            model = "s_m_m_security_01", 
            heading = 229.19 
        },
        spawns = {
            {coords = vector3(-724.5194, -1329.3491, 1.4425), heading = 229.546, radius = 1.0},
            {coords = vector3(-729.8666, -1335.2825, 2.2986), heading = 222.205, radius = 1.0},
            {coords = vector3(-736.9506, -1342.4745, 1.5329), heading = 218.135, radius = 1.0}
        }
    },
    -- Plane garages
    {
        type = "airplane",
        sort = "garage",
        coords = vector3(-1012.6478, -3025.9807, 13.9451),
        blip = "enabled",
        ped = { 
            enabled = "false", 
            model = "s_m_m_security_01", 
            heading = 338.37 
        },
        spawns = {
            {coords = vector3(-1000.6839, -3000.1526, 13.9451), heading = 57.5092, radius = 1.0}
        }
    },
    -- Impound
    {
        type = "car",
        sort = "impound",
        coords = vector3(407.35, -1626.23, 29.29),
        blip = "enabled",
        ped = { 
            enabled = "false", 
            model = "s_m_m_security_01", 
            heading = 232.82
        },
        spawns = {
            {coords = vector3(412.17, -1629.12, 29.29), heading = 140.5186, radius = 1.0}
        }
    }
}

RESMON.Messages = {
    PressToInteract = "Press ~INPUT_CONTEXT~ to open your Garage",
    NoVehicles = "You don't have any vehicles.",
    ParkedOut = "You have parked out the vehicle %s.",
    ParkedIn = "You have parked in the vehicle %s.",
    NotOwner = "You are not the owner of this vehicle.",
    NotEnoughMoney = "You don't have enough money.",
    BoughtOut = "You have released the vehicle %s from impound for %s$.",
    VehicleRenamed = "You have renamed the vehicle with the license plate %s to %s.",
    NoFreeSpawn = "No free spawn point found.",
    AlreadyBoughtOut = "You have already bought out this vehicle.",
    AlreadyParkedIn = "This vehicle has already been parked in.",
    NoNickname = "You must specify a nickname.",
    NoVehiclesFavorited = "You haven't favorited any vehicles.",
    NoVehiclesImpounded = "No vehicles have been impounded by you.",
    VehicleAddedToFavorites = "You have added the vehicle with the license plate %s to your favorites.",
    VehicleRemovedFromFavorites = "You have removed the vehicle with the license plate %s from your favorites.",
    NoVehiclesAround = "No vehicles found nearby."
}

RESMON.SaveFuel = {
    enabled = true,
    getFuel = function(vehicle, cb)
        local fuel = exports["LegacyFuel"]:GetFuel(vehicle)
        cb(fuel)
    end,
    setFuel = function(vehicle, amount)
        exports["LegacyFuel"]:SetFuel(vehicle, amount)
    end
}

RESMON.SaveDamage = {
    enabled = true,
    getDamage = function(vehicle, cb)
        local engineHealth = GetVehicleEngineHealth(vehicle)
        local bodyHealth = GetEntityHealth(vehicle)
        cb(engineHealth, bodyHealth)
    end,
    setDamage = function(vehicle, engineHealth, bodyHealth)
        SetVehicleEngineHealth(vehicle, engineHealth)
        SetEntityHealth(vehicle, bodyHealth)
    end
}

function HelpNotify(msg, E)
    ESX.ShowHelpNotification(msg, E)
    -- exports["rs_hud"]:HelpNotify(msg, E)
end

function Notify(msg)
    TriggerEvent('esx:showNotification', msg)
    -- TriggerEvent("rs_notify", "Garage - System", 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",
    Author = "ResmonStudio",
    AuthorURL = "https://i.ibb.co/PZDN7K4/logo.png",
    ThumbURL = "https://i.ibb.co/PZDN7K4/logo.png",
    Username = "RS | Logs",
    Webhooks = {
        garage = {'PUT_YOUR_WEBHOOK_HERE'},
    }
}

3. Configure cl_names.lua

In the cl_names.lua file, you can manage all imported car name options to set your preferred names. This allows you to customize the names for different cars.

Citizen.CreateThread(function()
    -- Adds a custom name entry for the vehicle with the identifier 'gt3hycade'
    -- The name displayed in the game will be 'Porsche GT3 RS'
    AddTextEntry('gt3hycade', 'Porsche GT3 RS')    
    AddTextEntry('gt63beast', 'Mercedes GT63s')
end)

Last updated