Configuration
1. Configure cl_config.lua
cl_config.luaIn 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)
end2. Configure sv_config.lua
sv_config.luaIn 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
sh_languages.luaIn 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