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.PrepareGameDuration = 60 -- Duration before game start after lobby countdown. (second)
Config.Game.PrepareRoundDuration = 60 -- Duration before round start after round end (second)
Config.Game.KillStreakDuration = 7 -- Duration before lost kill streak (second)

Config.Game.Zombie.RepawnTimer = 7 -- How long zome can respawn after death (second)
Config.Game.Zombie.SkillCooldown = 30 -- How long zombie skill can use (second)

Config.Game.Team.ChangeCooldown = 20 -- Cooldown after changing team (second)

-- 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["zm_front_2020"] = {
	["mapObj"] = "zm_front_2020", -- .ydr model to spawn as a map, remove the line if not have.
	["spawnpoint"] = { -- Random spawn point
		{x=1876.477, y=2724.802, z=114.763},
		{x=1862.099, y=2744.018, z=114.764},
		{x=1847.54, y=2765.058, z=114.764},
		{x=1821.926, y=2794.339, z=114.764},
		{x=1858.381, y=2781.046, z=117.438},
	},
}

Last updated