Config

-- Enable debug make sure FiveM client is "Beta Channel" in setting to use more dev command.
Config.Debug = false

Config.MinPlayers = 2 -- Minimum of player to allow counwdown (Set to 1, Trial mode will enable).
Config.MaxPlayers = 20 -- Maximum player allow in lobby.
Config.LobbyTime = 20 -- Countdown timer to start race if minimum player reached Config.MinPlayers. (second)
Config.ArenaTime = 60 -- Duration in game before lobby auto close. (minute)
Config.OwnWorld = true -- Game in another world. Participants and the non participants will not see each other.

Config.Game.FirendlyFire = false -- Can player attack teamate?
Config.Game.PrepareGameDuration = 60 -- Duration before game start after lobby countdown. (second)
Config.Game.PrepareRoundDuration = 20 -- Duration before round start after round end (second)
Config.Game.RoundDuration = 2*60+17+Config.Game.PrepareRoundDuration -- Duration of round (second)
Config.Game.BuyDuration = 24 -- Duration of buy zone after round started.
Config.Game.BombTimer = 40 -- Bomb placed countdown timer (second)
Config.Game.KillStreakDuration = 7 -- Duration before lost kill streak (second)

Config.Game.Team.ChangeCooldown = 20 -- Cooldown after changing team (second)
Config.Game.Team.Balance = 0 -- Allow how different are number of teams.
Config.Game.Team.EnemyBlip = true -- Show enemy blip while them shooting.

-- Config.XP : Display XP rank system on end screen.
-- Example is https://github.com/chaixshot/DarkRP_XP

local DarkRP_XP = exports["DarkRP_XP"]

Config.EndScreen.ResultsPanelTime = 10 -- sec
Config.EndScreen.XP.rankTextSmall = "LEVEL UP"
Config.EndScreen.XP.rankTextBig = "~b~Nice~s~"

Config.EndScreen.XP.GetXpGained = function(source, exp)
	exp = math.floor(exp)
	if GetResourceState("DarkRP_XP") == "started" then -- DarkRP_XP request.
		DarkRP_XP:AddPlayerXPToServer(exp)
		return exp
	else
		return 0
	end
end

-- Current XP in rank system.
Config.EndScreen.XP.GetXpBeforeGain = function(source)
	if GetResourceState("DarkRP_XP") == "started" then -- DarkRP_XP request.
		return DarkRP_XP:GetCurrentPlayerXP()
	else
		return 0
	end
end

-- Minimum XP of current rank.
Config.EndScreen.XP.GetMinLevelXP = function(source)
	if GetResourceState("DarkRP_XP") == "started" then -- DarkRP_XP request.
		return DarkRP_XP:GetXPCeilingForLevel(DarkRP_XP:GetCurrentPlayerLevel()-1)
	else
		return 0
	end
end

-- Maximum XP of current rank.
Config.EndScreen.XP.GetMaxLevelXP = function(source)
	if GetResourceState("DarkRP_XP") == "started" then -- DarkRP_XP request.
		return DarkRP_XP:GetXPCeilingForLevel(DarkRP_XP:GetCurrentPlayerLevel())
	else
		return 0
	end
end

-- Current rank.
Config.EndScreen.XP.GetCurrentRank = function(source)
	if GetResourceState("DarkRP_XP") == "started" then -- DarkRP_XP request.
		return DarkRP_XP:GetCurrentPlayerLevel()
	else
		return 1
	end
end

-- Rank next from current rank.
Config.EndScreen.XP.GetNextRank = function(source)
	if GetResourceState("DarkRP_XP") == "started" then -- DarkRP_XP request.
		return DarkRP_XP:GetCurrentPlayerLevel()+1
	else
		return 1
	end
end

Config.EndScreen.Money.Text = { -- Display money on end screen.
	topText = "",
	bottomText = "",
	rightHandStat = "",
	rightHandStatIcon = 3, --0 or 1 = checked, 2 = X, 3 = no icon
}

--- Map coords for custom map
Config.Location["de_dust"] = {
	["mapObj"] = "de_dust", -- .ydr model to spawn as a map, remove the line if not have.
	["bomb"] = { -- Bomb place location
		{ x = 1859.622, y = 2704.357, z = 119.304 }, -- A
		{ x = 1893.666, y = 2753.65, z = 117.808 }, -- B
	},
	["spawnblue"] = { -- Random spawn point of blue team
		{ x = 1883.26, y = 2802.734, z = 115.138 },
		{ x = 1870.391, y = 2807.705, z = 117.916 },
		{ x = 1866.981, y = 2821.257, z = 118.954 },
		{ x = 1881.062, y = 2819.922, z = 118.957 },
		{ x = 1889.38, y = 2821.852, z = 118.957 },
		{ x = 1888.57, y = 2815.916, z = 115.138 },
		{ x = 1887.584, y = 2804.609, z = 115.311 },
		{ x = 1877.103, y = 2810.098, z = 115.139 },
	},
	["spawnred"] = { -- Random spawn point of red team
		{ x = 1851.586, y = 2731.815, z = 117.916 },
		{ x = 1851.559, y = 2735.115, z = 117.916 },
		{ x = 1855.591, y = 2735.184, z = 117.916 },
		{ x = 1858.782, y = 2732.248, z = 117.916 },
		{ x = 1856.049, y = 2727.842, z = 117.916 },
	},
}

Last updated