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 main title displayed in the header.
    name = "FFASystem"       -- The name of the FFA system shown in the header.
}

Config.Options = {
    Language = 'en',                    -- Language used for system messages and UI. Change this to your preferred language.
    UseNewEsx = true,                   -- Use the new ESX framework (true) or the old one (false).
    UseVersionCheck = true,             -- Enable automatic version checking for the system.
    UseDeathScreen = true,              -- Display a death screen when the player dies during FFA.
    UseStatsIngame = true,              -- Show in-game statistics like kills, deaths, etc.
    UseKillFeed = true,                 -- Display a feed showing who killed whom during the match.
    UseKillNotify = true,               -- Notify players when they kill someone.
    UseOwnWeapons = false,              -- Allow players to use their own weapons (true) or provide predefined weapons (false).
    UseUnlimitedAmmo = true,            -- Give players unlimited ammunition during the match.
    RespawnTime = 3,                    -- Time (in seconds) before a player respawns after dying.
    SpawnProtection = 3,                -- Time (in seconds) of invulnerability after respawning.
    TickTime = 1500,                    -- Frequency (in milliseconds) for system checks (e.g., position updates).
    quitcommand = "quitffa",            -- Command for players to leave the FFA lobby.
    DimensionCommand = "getdim",        -- Command to retrieve the player's current dimension.
    OnLeaveStatus = "bodyshot",         -- Hit type used when leaving: "headshot" or "bodyshot".
    
    Exports = {
        OnPlayerDeath = 'esx:onPlayerDeath',   -- Event to handle player death.
        Revive = 'esx_ambulancejob:revive'     -- Event to revive players.
    },

    SharedObject = {                    -- ESX shared object configuration.
        client = "esx:getSharedObject", -- Client event to fetch the shared ESX object.
        server = "esx:getSharedObject", -- Server event to fetch the shared ESX object.
    },

    Overextended = {
        Enabled = false,                -- Enable Overextended support for advanced features.
        UseOXInventory = false,         -- Enable OX Inventory integration.
        UseOxTarget = false,            -- Use OxTarget for interactions (requires ped or entity positions, not markers).
        TargetIcon = "fa-solid fa-droplet", -- Icon displayed when interacting with OxTarget.
        TargetText = "Open FFA",        -- Text displayed when interacting with OxTarget.
    },

    SphereColor = {                     -- RGBA color values for the zone indicator spheres.
        r = 255, g = 0, b = 46, a = 50  
    },

    OutOfZone = {  
        UseKillOnOutZone = true,        -- Kill players when they leave the zone (true/false).
        KillTime = 2,                   -- Time (in seconds) before killing the player outside the zone.
    },

    Health = {
        AddHealthOnKill = {
            Enabled = true,             -- Add health/armor to players after a kill.
            Health = 200,               -- Amount of health restored after a kill.
            Armour = 100                -- Amount of armor restored after a kill.
        },
        AddHealthOnLeave = {
            Enabled = true,             -- Restore health/armor when leaving the lobby.
            Health = 200,               -- Health restored upon leaving.
            Armour = 0                  -- Armor restored upon leaving.
        },
        AddHealthOnEnter = {
            Enabled = true,             -- Restore health/armor when entering the lobby.
            Health = 200,               -- Health restored upon entry.
            Armour = 100                -- Armor restored upon entry.
        },
    },
}

Config.Positions = {  -- Define positions for markers, peds, and blips. Add as many as needed.
    [1] = {
        coords = vector3(-3021.41, 83.74, 11.66),  -- Coordinates for the position in the game world (X, Y, Z).
        
        ped = { 
            enabled = false,                -- Set to true to spawn the ped at this position.
            model = "a_m_m_hasjew_01",      -- Model of the ped (character) to spawn.
            heading = 318.66                -- The heading (direction) the ped will face in the game world.
        },

        entity = {
            enabled = false,                -- Set to true to spawn the prop at this position.
            object = "xm_prop_x17_xmas_tree_int",  -- The model name of the object (prop) to spawn.
        },

        marker = {
            enabled = true,                 -- Set to true to display the marker at this position.
            type = 21,                      -- Type of the marker (refers to GTA V marker types).
            drawDistance = 15.0,            -- How far away the marker can be seen by players (in game units).
            scale = vector3(1.0, 1.0, 1.0), -- Scale of the marker (size).
            color = { 
                red = 255,                  -- Red component of the marker's color.
                green = 0,                  -- Green component of the marker's color.
                blue = 0,                   -- Blue component of the marker's color.
                alpha = 100                 -- Alpha (transparency) of the marker.
            },
            moveUpAndDown = false,          -- Set to true to make the marker bob up and down.
            rotate = true                   -- Set to true to make the marker rotate.
        },
        
        blip = {
            enabled = true,                -- Set to true to enable the blip on the map.
            sprite = 84,                   -- The sprite ID for the blip (visual representation on the map).
            scale = 0.7,                   -- Scale of the blip size (adjust to make it larger or smaller).
            color = 1,                     -- Color of the blip (uses predefined colors in GTA).
            display = 4,                   -- Display settings for the blip (how it shows on the map).
            shortRange = true,             -- Set to true to only display the blip when the player is nearby.
            text = 'FFA - Paintball'       -- Text shown when hovering over the blip on the map.
        }
    },
}

Config.FFAZones = {  -- Define Free-For-All zones; you can add as many as you want.
    {
        name = "Rooftop #1",  -- Name of the FFA zone.
        imgUrl = "assets/img/rooftop.png",  -- Image URL for the FFA zone.
        maxPlayers = 20,  -- Maximum number of players allowed in this zone.
        position = vector3(105.22, -872.45, 137.95),  -- Coordinates of the zone in the game world.
        size = 40.0,  -- Size of the zone (radius).
        dimension = 100,  -- Dimension ID for the zone.
        type = "headshot",  -- Type of gameplay (headshot or bodyshot).        
        spawns = {  -- Spawn points for players in this zone.
            vector3(119.36, -877.31, 134.77),  -- Spawn point 1.
            vector3(100.02, -881.67, 134.77),  -- Spawn point 2.
            vector3( 85.21, -866.36, 134.77),   -- Spawn point 3.
            vector3(101.86, -861.34, 134.77),  -- Spawn point 4.
            vector3(113.59, -865.20, 134.77),  -- Spawn point 5.
        },

        Weapons = {  -- List of valid weapon names or hashes
        "WEAPON_PISTOL",  -- This is a valid name
        "WEAPON_PISTOL50",   -- This is also valid
        "WEAPON_ASSAULTRIFLE",  -- Example of another valid weapon
        },
    },
    
    {
        name = "Rooftop #2",  -- Name of the FFA zone.
        imgUrl = "assets/img/rooftop1.png",  -- Image URL for the FFA zone.
        maxPlayers = 15,  -- Maximum number of players allowed in this zone.
        position = vector3(-1878.34, -316.09, 93.66),  -- Coordinates of the zone in the game world.
        size = 30.0,  -- Size of the zone (radius).
        dimension = 101,  -- Dimension ID for the zone.
        type = "bodyshot",  -- Type of gameplay (headshot or bodyshot).        
        spawns = {  -- Spawn points for players in this zone.
            vector3(-1870.75, -329.21, 93.66),  -- Spawn point 1.
            vector3(-1880.11, -329.51, 93.66),  -- Spawn point 2.
            vector3(-1890.21, -312.03, 93.66),  -- Spawn point 3.
            vector3(-1889.54, -304.92, 93.66),  -- Spawn point 4.
        },
        
        Weapons = {  -- List of weapons available in this zone.
            "WEAPON_ASSAULTRIFLE",  -- Assault Rifle.
            "WEAPON_COMBATPISTOL",   -- Combat Pistol.
            "WEAPON_SNSPISTOL_MK2",   -- SNS Pistol MK2.
        },
    },
    
    {
        name = "Rooftop #3",  -- Name of the FFA zone.
        imgUrl = "assets/img/rooftop2.png",  -- Image URL for the FFA zone.
        maxPlayers = 10,  -- Maximum number of players allowed in this zone.
        position = vector3(-1830.1270, -354.4296, 95.8679),  -- Coordinates of the zone in the game world.
        size = 30.0,  -- Size of the zone (radius).
        dimension = 102,  -- Dimension ID for the zone.
        type = "headshot",  -- Type of gameplay (headshot or bodyshot).        
        spawns = {  -- Spawn points for players in this zone.
            vector3(-1819.27, -365.13, 93.67),  -- Spawn point 1.
            vector3(-1809.72, -360.09, 93.67),  -- Spawn point 2.
            vector3(-1830.75, -342.62, 93.67),  -- Spawn point 3.
            vector3(-1838.93, -343.88, 93.67),  -- Spawn point 4.
        },
        
        Weapons = {  -- List of weapons available in this zone.
            "WEAPON_BULLPUPRIFLE_MK2",  -- Bullpup Rifle MK2.
            "WEAPON_HEAVYPISTOL",       -- Heavy Pistol.
        },
    },
    
    {
        name = "Casino Deck",  -- Name of the FFA zone.
        imgUrl = "assets/img/casino.png",  -- Image URL for the FFA zone.
        maxPlayers = 15,  -- Maximum number of players allowed in this zone.
        position = vector3(477.21, 165.63, 110.63),  -- Coordinates of the zone in the game world.
        size = 40.0,  -- Size of the zone (radius).
        dimension = 103,  -- Dimension ID for the zone.
        type = "headshot",  -- Type of gameplay (headshot or bodyshot).        
        spawns = {  -- Spawn points for players in this zone.
            vector3(459.96, 190.61, 110.59),  -- Spawn point 1.
            vector3(495.81, 173.78, 110.65),  -- Spawn point 2.
            vector3(481.66, 142.13, 110.65),  -- Spawn point 3.
            vector3(444.05, 140.76, 110.59),  -- Spawn point 4.
            vector3(456.52, 163.07, 110.60),  -- Spawn point 5.
        },
        
        Weapons = {  -- List of weapons available in this zone.
            "WEAPON_MICROSMG",  -- Micro SMG.
            "WEAPON_PISTOL50",    -- Pistol .50.
        },
    },
    
    {
        name = "Harbor",  -- Name of the FFA zone.
        imgUrl = "assets/img/yacht.png",  -- Image URL for the FFA zone.
        maxPlayers = 15,  -- Maximum number of players allowed in this zone.
        position = vector3(1140.9429, -3008.4753, 5.8998),  -- Coordinates of the zone in the game world.
        size = 120.0,  -- Size of the zone (radius).
        dimension = 104,  -- Dimension ID for the zone.
        type = "bodyshot",  -- Type of gameplay (headshot or bodyshot).        
        spawns = {  -- Spawn points for players in this zone.
            vector3(1149.22, -3026.51, 5.90),  -- Spawn point 1.
            vector3(1164.80, -3007.22, 5.90),  -- Spawn point 2.
            vector3(1178.22, -2981.66, 5.90),  -- Spawn point 3.
            vector3(1135.29, -2983.07, 5.89),  -- Spawn point 4.
            vector3(1097.09, -2999.25, 5.75),  -- Spawn point 5.
        },
        
        Weapons = {  -- List of weapons available in this zone.
            "WEAPON_MACHINEPISTOL",  -- Machine Pistol.
            "WEAPON_SPECIALCARBINE",  -- Special Carbine.
        },
    },
    
    {
        name = "Sandy Shores",  -- Name of the FFA zone.
        imgUrl = "assets/img/sandy.png",  -- Image URL for the FFA zone.
        maxPlayers = 25,  -- Maximum number of players allowed in this zone.
        position = vector3(1287.44, 3092.41, 40.91),  -- Coordinates of the zone in the game world.
        size = 180.0,  -- Size of the zone (radius).
        dimension = 105,  -- Dimension ID for the zone.
        type = "headshot",  -- Type of gameplay (headshot or bodyshot).        
        spawns = {  -- Spawn points for players in this zone.
            vector3(1173.39, 3183.75, 39.19),  -- Spawn point 1.
            vector3(1128.67, 3138.24, 39.06),  -- Spawn point 2.
            vector3(1122.92, 3085.96, 40.43),  -- Spawn point 3.
            vector3(1158.28, 2988.62, 39.96),  -- Spawn point 4.
        },
        
        Weapons = {  -- List of weapons available in this zone.
            "WEAPON_KNIFE",       -- Knife.
            "WEAPON_GUSENBERG",    -- Gusenberg.
        },
    }
}

Config.CustomZones = {
    enabled = true,          -- Set to true to enable custom zones; false to disable the feature entirely.
    maxLobbiesPlayer = 50,   -- Maximum number of lobbies a single player can create.
    requirePassword = true,  -- Set to true if a password is required for creating custom lobbies.
    ClearOnStartup = false,  -- If set to true, all custom lobbies will be cleared when the resource starts.
    ClearCommand = 'clearlobbies',  -- Command that authorized users can use to clear custom lobbies.
    CommandAllowed = {       -- Define groups allowed to use the ClearCommand.
        ["admin"] = true,    -- This group has permission to execute the clear command.
        -- You can add more groups as needed, e.g., ["superadmin"] = true,
    },

    weapons = {  -- List of weapons that can be used in custom zones.
        {
            name = "weapon_pistol",  -- Internal weapon identifier.
            label = "Pistol",  -- Display name for the weapon.
            imgUrl = "assets/img/carabine.png",  -- URL/path to the weapon's image.
            item = {
                enabled = false,  -- Set to true to enable this weapon as an item in the inventory.
                itemName = "weapon_pistol"  -- Item name for inventory purposes.
            }
        },
        {
            name = "weapon_pistol50",
            label = "Pistol cal. 50",
            imgUrl = "assets/img/carabine.png",
            item = {
                enabled = false,
                itemName = "weapon_pistol50"
            }
        },
        {
            name = "weapon_heavypistol",
            label = "Heavy Pistol",
            imgUrl = "assets/img/carabine.png",
            item = {
                enabled = false,
                itemName = "weapon_heavypistol"
            }
        },
        {
            name = "weapon_microsmg",
            label = "Micro SMG",
            imgUrl = "assets/img/carabine.png",
            item = {
                enabled = false,
                itemName = "weapon_microsmg"
            }
        },
        {
            name = "weapon_assaultrifle",
            label = "Assault Rifle",
            imgUrl = "assets/img/carabine.png",
            item = {
                enabled = false,
                itemName = "weapon_assaultrifle"
            }
        },
        {
            name = "weapon_sniperrifle",
            label = "Sniper Rifle",
            imgUrl = "assets/img/carabine.png",
            item = {
                enabled = false,
                itemName = "weapon_sniperrifle"
            }
        }
    },    

    maps = {  -- List of custom maps available for lobbies.
        {
            name = "Rooftop #1",  -- Name of the map.
            imgUrl = "assets/img/rooftop.png",  -- URL/path to the map's image.
            maxPlayers = 20,  -- Maximum players allowed on this map.
            position = vector3(105.22, -872.45, 137.95),  -- Spawn position of the map in the game world.
            size = 40.0,  -- Size of the map (radius).
            spawns = {  -- Spawn points for players in the map.
                vector3(119.36, -877.31, 134.77),  -- Spawn point 1.
                vector3(100.02, -881.67, 134.77),  -- Spawn point 2.
                vector3( 85.21, -866.36, 134.77),   -- Spawn point 3.
                vector3(101.86, -861.34, 134.77),  -- Spawn point 4.
                vector3(113.59, -865.20, 134.77),  -- Spawn point 5.
            }
        },
        {
            name = "Rooftop #2",  -- Name of the map.
            imgUrl = "assets/img/rooftop1.png",  -- URL/path to the map's image.
            maxPlayers = 15,  -- Maximum players allowed on this map.
            position = vector3(-1878.34, -316.09, 93.66),  -- Spawn position of the map in the game world.
            size = 30.0,  -- Size of the map (radius).
            spawns = {  -- Spawn points for players in the map.
                vector3(-1870.75, -329.21, 93.66),  -- Spawn point 1.
                vector3(-1880.11, -329.51, 93.66),  -- Spawn point 2.
                vector3(-1890.21, -312.03, 93.66),  -- Spawn point 3.
                vector3(-1889.54, -304.92, 93.66),  -- Spawn point 4.
            }
        },
        {
            name = "Rooftop #3",  -- Name of the map.
            imgUrl = "assets/img/rooftop2.png",  -- URL/path to the map's image.
            maxPlayers = 10,  -- Maximum players allowed on this map.
            position = vector3(-1830.1270, -354.4296, 95.8679),  -- Spawn position of the map in the game world.
            size = 30.0,  -- Size of the map (radius).
            spawns = {  -- Spawn points for players in the map.
                vector3(-1819.27, -365.13, 93.67),  -- Spawn point 1.
                vector3(-1809.72, -360.09, 93.67),  -- Spawn point 2.
                vector3(-1830.75, -342.62, 93.67),  -- Spawn point 3.
                vector3(-1838.93, -343.88, 93.67),  -- Spawn point 4.
            }
        },
        {
            name = "Casino Deck",  -- Name of the map.
            imgUrl = "assets/img/casino.png",  -- URL/path to the map's image.
            maxPlayers = 15,  -- Maximum players allowed on this map.
            position = vector3(477.21, 165.63, 110.63),  -- Spawn position of the map in the game world.
            size = 40.0,  -- Size of the map (radius).
            spawns = {  -- Spawn points for players in the map.
                vector3(459.96, 190.61, 110.59),  -- Spawn point 1.
                vector3(495.81, 173.78, 110.65),  -- Spawn point 2.
                vector3(481.66, 142.13, 110.65),  -- Spawn point 3.
                vector3(444.05, 140.76, 110.59),  -- Spawn point 4.
                vector3(456.52, 163.07, 110.60),  -- Spawn point 5.
            }
        },
        {
            name = "Harbor",  -- Name of the map.
            imgUrl = "assets/img/yacht.png",  -- URL/path to the map's image.
            maxPlayers = 15,  -- Maximum players allowed on this map.
            position = vector3(1140.9429, -3008.4753, 5.8998),  -- Spawn position of the map in the game world.
            size = 120.0,  -- Size of the map (radius).
            spawns = {  -- Spawn points for players in the map.
                vector3(1149.22, -3026.51, 5.90),  -- Spawn point 1.
                vector3(1164.80, -3007.22, 5.90),  -- Spawn point 2.
                vector3(1178.22, -2981.66, 5.90),  -- Spawn point 3.
                vector3(1135.29, -2983.07, 5.89),  -- Spawn point 4.
                vector3(1097.09, -2999.25, 5.75),  -- Spawn point 5.
            }
        },
        {
            name = "Sandy Shores",  -- Name of the map.
            imgUrl = "assets/img/sandy.png",  -- URL/path to the map's image.
            maxPlayers = 25,  -- Maximum players allowed on this map.
            position = vector3(1287.44, 3092.41, 44.92),  -- Spawn position of the map in the game world.
            size = 180.0,  -- Size of the map (radius).
            spawns = {  -- Spawn points for players in the map.
                vector3(1285.23, 3072.85, 44.92),  -- Spawn point 1.
                vector3(1299.82, 3100.12, 44.92),  -- Spawn point 2.
                vector3(1270.65, 3103.73, 44.92),  -- Spawn point 3.
                vector3(1265.93, 3086.40, 44.92),  -- Spawn point 4.
            }
        }
    }
}

Config.LevelSystem = {
    enabledSystem = true, -- Enable the level system; set to false to disable leveling.
    enabledRewards = true, -- Enable or disable rewards for leveling up.
    xpPerKill = 10, -- Amount of XP awarded for each kill.
    xpPerDeath = 1, -- Amount of XP deducted or awarded for each death (set to 0 for no penalty).
    maxXP = 10000, -- Maximum XP limit a player can achieve; rewards stop when this limit is reached.
    rewards = { -- Level-based rewards that players can earn.
        [1] = {
            { itemType = "weapon", itemID = "weapon_knife", amount = 1, label = "Knife", xp = 100 }, -- Reward for Level 1
            { itemType = "item", itemID = "bread", amount = 5, label = "Bread", xp = 150 },
            { itemType = "item", itemID = "water", amount = 3, label = "Water", xp = 250 },
        },
        [2] = {
            { itemType = "weapon", itemID = "weapon_bat", amount = 1, label = "Baseball Bat", xp = 500 }, -- Reward for Level 2
            { itemType = "item", itemID = "bandage", amount = 2, label = "Bandage", xp = 500 },
            { itemType = "item", itemID = "water", amount = 4, label = "Water", xp = 500 },
        },
        [3] = {
            { itemType = "weapon", itemID = "weapon_pistol", amount = 1, label = "Pistol", xp = 1000 }, -- Reward for Level 3
            { itemType = "item", itemID = "bread", amount = 10, label = "Bread", xp = 1000 },
            { itemType = "item", itemID = "first_aid_kit", amount = 1, label = "First Aid Kit", xp = 1000 },
        },
        [4] = {
            { itemType = "weapon", itemID = "weapon_machete", amount = 1, label = "Machete", xp = 2000 }, -- Reward for Level 4
            { itemType = "item", itemID = "water", amount = 5, label = "Water", xp = 2000 },
            { itemType = "item", itemID = "bandage", amount = 3, label = "Bandage", xp = 2000 },
        },
        [5] = {
            { itemType = "weapon", itemID = "weapon_microsmg", amount = 1, label = "Micro SMG", xp = 3000 }, -- Reward for Level 5
            { itemType = "item", itemID = "bread", amount = 15, label = "Bread", xp = 3000 },
            { itemType = "item", itemID = "water", amount = 5, label = "Water", xp = 3000 },
        },
        [6] = {
            { itemType = "weapon", itemID = "weapon_pumpshotgun", amount = 1, label = "Pump Shotgun", xp = 4000 }, -- Reward for Level 6
            { itemType = "item", itemID = "first_aid_kit", amount = 2, label = "First Aid Kit", xp = 4000 },
            { itemType = "item", itemID = "bandage", amount = 4, label = "Bandage", xp = 4000 },
        },
        [7] = {
            { itemType = "weapon", itemID = "weapon_assaultrifle", amount = 1, label = "Assault Rifle", xp = 5000 }, -- Reward for Level 7
            { itemType = "item", itemID = "bread", amount = 20, label = "Bread", xp = 5000 },
            { itemType = "item", itemID = "water", amount = 6, label = "Water", xp = 5000 },
        },
        [8] = {
            { itemType = "weapon", itemID = "weapon_sniperrifle", amount = 1, label = "Sniper Rifle", xp = 6000 }, -- Reward for Level 8
            { itemType = "item", itemID = "bread", amount = 10, label = "Bread", xp = 6000 },
            { itemType = "item", itemID = "water", amount = 10, label = "Water", xp = 6000 },
        },
        [9] = {
            { itemType = "weapon", itemID = "weapon_ak47", amount = 1, label = "AK-47", xp = 8000 }, -- Reward for Level 9
            { itemType = "item", itemID = "bandage", amount = 5, label = "Bandage", xp = 8000 },
            { itemType = "item", itemID = "first_aid_kit", amount = 1, label = "First Aid Kit", xp = 8000 },
        },
        [10] = {
            { itemType = "weapon", itemID = "weapon_desert_eagle", amount = 1, label = "Desert Eagle", xp = 10000 }, -- Reward for Level 10
            { itemType = "item", itemID = "bread", amount = 25, label = "Bread", xp = 10000 },
            { itemType = "item", itemID = "water", amount = 8, label = "Water", xp = 10000 },
        },
    },

    levels = { -- XP thresholds required to achieve each level.
        [1] = 0,      -- Level 1 starts at 0 XP
        [2] = 500,    -- Level 2 starts at 500 XP
        [3] = 1000,   -- Level 3 starts at 1000 XP
        [4] = 2000,   -- Level 4 starts at 2000 XP
        [5] = 3000,   -- Level 5 starts at 3000 XP
        [6] = 4000,   -- Level 6 starts at 4000 XP
        [7] = 5000,   -- Level 7 starts at 5000 XP
        [8] = 6000,   -- Level 8 starts at 6000 XP
        [9] = 8000,   -- Level 9 starts at 8000 XP
        [10] = 10000, -- Level 10 starts at 10000 XP
    },
}

Config.onJoin = {
    Enabled = false, 
    Delay = 5,  -- Delay in seconds before executing the function

    func = function() 
        print(">> Player has joined the FFA zone!")
        -- Add custom logic here for joining the FFA
    end
}

Config.onLeave = {
    Enabled = false, 
    Delay = 5,  -- Delay in seconds before executing the function

    func = function() 
        print(">> Player has left the FFA zone!")
        -- Add custom logic here for leaving the FFA
    end
}

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

function Notify(msg)
    TriggerEvent('esx:showNotification', msg)
    -- TriggerEvent('rs_notify', 'FFA - 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",  -- Default color for the webhook message in decimal (white)
    Author = "ResmonStudio",  -- Author name that will be displayed in the webhook message
    AuthorURL = "https://i.ibb.co/PZDN7K4/logo.png",  -- URL for the author's avatar image
    ThumbURL = "https://i.ibb.co/PZDN7K4/logo.png",  -- URL for the thumbnail image in the webhook message
    Username = "RS | Logs",  -- Username that will appear in the webhook message
    Footer = {  -- Settings for the footer of the webhook messages
        Text = "RS | ResmonStudio | %s",  -- Text format for the footer, where %s will be replaced with the date
        URL = "https://i.ibb.co/PZDN7K4/logo.png",  -- URL for the footer icon image
    },
    Webhooks = {
        enter =   { 'PUT_YOUR_WEBHOOK_HERE' },  -- Webhook URL for player entry events
        leave =   { 'PUT_YOUR_WEBHOOK_HERE' },  -- Webhook URL for player exit events
        create =  { 'PUT_YOUR_WEBHOOK_HERE' },  -- Webhook URL for creating new lobbies
        kill =    { 'PUT_YOUR_WEBHOOK_HERE' },  -- Webhook URL for kill events
        reward =  { 'PUT_YOUR_WEBHOOK_HERE' },  -- Webhook URL for level change events
        exploit = { 'PUT_YOUR_WEBHOOK_HERE' },  -- Webhook URL for exploit events
    },
}

CFG.ScoreBoard = { 
    UseScoreBoard = true,  -- Flag to enable scoreboard messages for public statistics in Discord
    SendScoreLimit = 5,  -- Maximum number of players to be displayed on the scoreboard
    Color = "16777215",  -- Default color for scoreboard messages in decimal (white)
    Author = "ResmonStudio",  -- Author name that will be displayed in the scoreboard webhook message
    AuthorURL = "https://i.ibb.co/PZDN7K4/logo.png",  -- URL for the author's avatar image in the scoreboard
    ThumbURL = "https://i.ibb.co/PZDN7K4/logo.png",  -- URL for the thumbnail image in the scoreboard
    Username = "RS | Scoreboard",  -- Username that will appear in the scoreboard webhook message
    Footer = {  -- Settings for the footer of the scoreboard messages
        Text = "RS | Scoreboard | %s",  -- Text format for the footer, where %s will be replaced with the date
        URL = "https://i.ibb.co/PZDN7K4/logo.png",  -- URL for the footer icon image
    },
    Webhooks = {
        scoreboard = { 'PUT_YOUR_WEBHOOK_HERE' },  -- Webhook URL for scoreboard updates
    },
}

CFG.Languages = {
    Language = 'en', -- Language setting for the system; 'en' is for English.

    ['en'] = {
        ['FFA'] = "FFA",  -- Title for the Free-for-All event
        ['Top'] = "Top",  -- Label for the top players
        ['Players'] = "Players",  -- Label for players
        ['Kills'] = "Kills",  -- Label for kills
        ['Deaths'] = "Deaths",  -- Label for deaths
        ['NoPlayerDataAvailable'] = "No player data available.",  -- Message displayed when no player data is available
    },
    ['de'] = {
        ['FFA'] = "FFA",  -- Title for the Free-for-All event in German (same as English here, adjust if needed)
        ['Top'] = "Top",  -- Label for the top players in German
        ['Players'] = "Spieler",  -- Label for players in German
        ['Kills'] = "Kills",  -- Label for kills in German
        ['Deaths'] = "Tode",  -- Label for deaths in German
        ['NoPlayerDataAvailable'] = "Keine Spieldaten verfügbar.",  -- Message for no data available in German
    },
    ['pl'] = { 
        ['FFA'] = "FFA",  -- Title for the Free-for-All event in Polish (same as English here, adjust if needed)
        ['Top'] = "Najlepsi",  -- Label for the top players in Polish
        ['Players'] = "Gracze",  -- Label for players in Polish
        ['Kills'] = "Zabójstwa",  -- Label for kills in Polish
        ['Deaths'] = "Śmierci",  -- Label for deaths in Polish
        ['NoPlayerDataAvailable'] = "Brak dostępnych danych gracza.",  -- Message for no data available in Polish
    },
}

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'] = {
        ['AlreadyClaimedNotify'] = 'You have already claimed this reward for this level!',
        ['ClaimSuccessNotify'] = 'You have claimed: %sx %s',
        ['CurrentlyNotAvailable'] = 'Currently not available. Please contact the admins.',
        ['EXPLOIT'] = 'You have been banned for exploiting!',
        ['HelpNotify'] = 'Press [E] to join an FFA zone!',
        ['JoinLobbyNotify'] = 'You joined %s Lobby!',
        ['JoinCustomLobby'] = 'You joined Lobby ID: %s!',
        ['LevelSystemNotAvailable'] = 'The level system is not available. Please contact the admins.',
        ['LobbyClearNotify'] = 'All custom lobbies have been cleared.',
        ['LobbyCreationFailed'] = 'Failed to create the lobby. Please try again.',
        ['LobbyCreated'] = 'You successfully created the lobby!',
        ['MaxLobbiesReached'] = 'You have reached the maximum number of lobbies you can create.',
        ['NoMapSelected'] = 'No map selected.',
        ['NoPermissionNotify'] = 'You do not have permission to execute this command.',
        ['NoWeapons'] = 'At least one weapon is required.',
        ['NotEnoughXPNotify'] = 'Not enough XP to claim this reward!',
        ['PasswordRequired'] = 'A password is required to create a private game.',
        ['QuitFFA'] = 'You have left the FFA lobby!',
        ['RewardsNotAvailable'] = 'Rewards are not available. Please contact the admins.',
        ['XPFetchErrorNotify'] = 'Could not retrieve your XP.',
        ['IncorrectPW'] = 'The password you entered is incorrect.',
        ['NoLobby'] = 'The lobby you are trying to access does not exist.',
        ['LobbyFull'] = 'The lobby you are trying to access is full.',
        ['TeleportBack'] = 'You have been teleported to the FFA spawn point!',
        ['AlreadyInLobby'] = 'You are already in a lobby!',
        ['WhileDead'] = 'You cannot leave the zone while dead!',
        ['CantLeave'] = 'You cannot leave the lobby while outside the designated area!',
        ['YouKilled'] = 'You killed %s!',
        ['YouGotKilled'] = 'You were killed by %s!',
        ['KilledYourself'] = 'You killed yourself!',
        ['LeftLobbyMessage'] = 'Left Lobby: Kills this session: %d, Deaths: %d',
        ['LeftLobbyMessageWithXP'] = 'Left Lobby: Kills this session: %d, Deaths: %d, You gained %d XP!',
        ['BySystem'] = 'System',
    },
    ['de'] = {
        ['AlreadyClaimedNotify'] = 'Du hast diese Belohnung für dieses Level bereits beansprucht!',
        ['ClaimSuccessNotify'] = 'Du hast beansprucht: %sx %s',
        ['CurrentlyNotAvailable'] = 'Derzeit nicht verfügbar. Bitte kontaktiere die Admins.',
        ['EXPLOIT'] = 'Du wurdest wegen Ausnutzung ausgeschlossen!',
        ['HelpNotify'] = 'Drücke [E], um einer FFA-Zone beizutreten!',
        ['JoinLobbyNotify'] = 'Du bist %s Lobby beigetreten!',
        ['JoinCustomLobby'] = 'Du bist Lobby ID: %s beigetreten!',
        ['LevelSystemNotAvailable'] = 'Das Level-System ist nicht verfügbar. Kontaktiere die Admins.',
        ['LobbyClearNotify'] = 'Alle benutzerdefinierten Lobbys wurden gelöscht.',
        ['LobbyCreationFailed'] = 'Die Lobby konnte nicht erstellt werden. Bitte versuche es erneut.',
        ['LobbyCreated'] = 'Du hast die Lobby erfolgreich erstellt!',
        ['MaxLobbiesReached'] = 'Du hast die maximale Anzahl an Lobbys erreicht, die du erstellen kannst.',
        ['NoMapSelected'] = 'Keine Karte ausgewählt.',
        ['NoPermissionNotify'] = 'Du hast keine Berechtigung, diesen Befehl auszuführen.',
        ['NoWeapons'] = 'Mindestens eine Waffe ist erforderlich.',
        ['NotEnoughXPNotify'] = 'Nicht genügend XP, um diese Belohnung zu beanspruchen!',
        ['PasswordRequired'] = 'Ein Passwort ist erforderlich, um ein privates Spiel zu erstellen.',
        ['QuitFFA'] = 'Du hast die FFA Lobby verlassen!',
        ['RewardsNotAvailable'] = 'Belohnungen sind nicht verfügbar. Kontaktiere die Admins.',
        ['XPFetchErrorNotify'] = 'Konnte deine XP nicht abrufen.',
        ['IncorrectPW'] = 'Das eingegebene Passwort ist falsch.',
        ['NoLobby'] = 'Die Lobby, auf die du zugreifen möchtest, existiert nicht.',
        ['LobbyFull'] = 'Die Lobby, auf die du zugreifen möchtest, ist voll.',
        ['TeleportBack'] = 'Du wurdest zum FFA-Spawnpunkt teleportiert!',
        ['AlreadyInLobby'] = 'Du bist bereits in einer Lobby!',
        ['WhileDead'] = 'Du kannst die Zone nicht verlassen, während du tot bist!',
        ['CantLeave'] = 'Du kannst die Lobby nicht verlassen, während du dich außerhalb des vorgesehenen Bereichs befindest!',
        ['YouKilled'] = 'Du hast %s getötet!',
        ['YouGotKilled'] = 'Du wurdest von %s getötet!',
        ['KilledYourself'] = 'Du hast dich selbst getötet!',
        ['LeftLobbyMessage'] = 'Lobby verlassen: Kills in dieser Sitzung: %d, Tode: %d',
        ['LeftLobbyMessageWithXP'] = 'Lobby verlassen: Kills in dieser Sitzung: %d, Tode: %d, Du hast %d XP hinzugefügt!',
        ['BySystem'] = 'System',
    },
    ['pl'] = {
        ['AlreadyClaimedNotify'] = 'Już odebrałeś tę nagrodę za ten poziom!',
        ['ClaimSuccessNotify'] = 'Odebrałeś: %sx %s',
        ['CurrentlyNotAvailable'] = 'Obecnie niedostępne. Proszę skontaktować się z administratorami.',
        ['EXPLOIT'] = 'Zostałeś zbanowany za oszustwo!',
        ['HelpNotify'] = 'Naciśnij [E], aby dołączyć do strefy FFA!',
        ['JoinLobbyNotify'] = 'Dołączyłeś do lobby %s!',
        ['JoinCustomLobby'] = 'Dołączyłeś do Lobby ID: %s!',
        ['LevelSystemNotAvailable'] = 'System poziomów jest niedostępny. Proszę skontaktować się z administratorami.',
        ['LobbyClearNotify'] = 'Wszystkie niestandardowe lobby zostały usunięte.',
        ['LobbyCreationFailed'] = 'Nie udało się stworzyć lobby. Proszę spróbować ponownie.',
        ['LobbyCreated'] = 'Pomyślnie utworzyłeś lobby!',
        ['MaxLobbiesReached'] = 'Osiągnąłeś maksymalną liczbę lobby, które możesz utworzyć.',
        ['NoMapSelected'] = 'Nie wybrano mapy.',
        ['NoPermissionNotify'] = 'Nie masz uprawnień do wykonania tej komendy.',
        ['NoWeapons'] = 'Wymagana jest przynajmniej jedna broń.',
        ['NotEnoughXPNotify'] = 'Niewystarczająca ilość XP, aby odebrać tę nagrodę!',
        ['PasswordRequired'] = 'Wymagane jest hasło do utworzenia prywatnej gry.',
        ['QuitFFA'] = 'Opuszczasz lobby FFA!',
        ['RewardsNotAvailable'] = 'Nagrody są niedostępne. Proszę skontaktować się z administratorami.',
        ['XPFetchErrorNotify'] = 'Nie można pobrać twojego XP.',
        ['IncorrectPW'] = 'Wprowadzone hasło jest niepoprawne.',
        ['NoLobby'] = 'Lobby, do którego próbujesz uzyskać dostęp, nie istnieje.',
        ['LobbyFull'] = 'Lobby, do którego próbujesz uzyskać dostęp, jest pełne.',
        ['TeleportBack'] = 'Zostałeś teleportowany do punktu odrodzenia FFA!',
        ['AlreadyInLobby'] = 'Już jesteś w lobby!',
        ['WhileDead'] = 'Nie możesz opuścić strefy, gdy jesteś martwy!',
        ['CantLeave'] = 'Nie możesz opuścić lobby, gdy jesteś poza wyznaczonym obszarem!',
        ['YouKilled'] = 'Zabiłeś %s!',
        ['YouGotKilled'] = 'Zostałeś zabity przez %s!',
        ['KilledYourself'] = 'Zabiłeś siebie!',
        ['LeftLobbyMessage'] = 'Opuszczono lobby: Zabójstwa w tej sesji: %d, Zgony: %d',
        ['LeftLobbyMessageWithXP'] = 'Opuszczono lobby: Zabójstwa w tej sesji: %d, Zgony: %d, Zyskałeś %d XP!',
        ['BySystem'] = 'System',
    },  
}

Last updated