Full View config.lua

Config = {}

Config.Core = "ESX" -- ESX / QB-Core
Config.CoreDefine = "" -- use only for old ESX: "esx:getSharedObject"
Config.CoreExport = function()
	return exports['es_extended']:getSharedObject()
	-- return exports['qb-core']:GetCoreObject()
end

Config.CharacterNames = false -- if you want player nicks to be displayed on race leaderboard, set to false. If you want the be firstname and lastname to be displayed, set it to true
Config.OpenRacePanel = 51 -- Control to open a race panel
Config.JoiningDuration = 10000 -- Time to start race, before all positions are selected.
Config.FinishTimeout = 180000 -- Timeout in ms for removing a race after winner finishes.
Config.CounterColor = 'b' -- text 2d colour, insert first letter name of colour, like this ~b~, without ~.

Config.Checkpoint = {
	Radius = 10.0, -- Radius of checkpoint marker
	Height = 8.0, -- Height of checkpoint marker
	BlipColor = 2, -- Color of checkpoint on map blip
}

Config.Notification = function(message)
	exports["vms_notify"]:Notification("RACES", message, 4800, "#fff", "fa fa-trophy")
	-- ESX.ShowNotification(message)
	-- QBCore.Functions.Notify(message, "info", 5000)
end

Config.Marker = {
	["RACE_PANEL"] = {
		RGBA = {0, 90, 235, 100};
		MARKER_ID = 1;
		MARKER_SIZE = vec(4.95, 4.95, 2.45);
	},
	["RACE_FLAG"] = {
		RGBA = {235, 235, 235, 50};
		MARKER_ID = 4;
		MARKER_SIZE = vec(2.95, 2.95, 2.95);
	},
	["CHECKPOINT"] = {
		RGBA = {30, 200, 30, 105};
		CHECKPOINT_ID = 47;
	},
	["FINISH_CHECKPOINT"] = {
		CHECKPOINT_ID = 4;
	},
	["POSITIONS"] = {
		RGBA = {30, 200, 30, 105};
		MARKER_ID = 1;
		MARKER_SIZE = 0.65;
	}
}

Config.Texts = {
	["joined_to_race"] = "You joined to race - %s.",
    ["no_money"] = "You don't have enough money!",
    ["started_race"] = "You started the race %s, select the your position.",
    ["open_menu"] = "Press ~INPUT_CONTEXT~ to open ~b~RACE MENU~s~",
    ["selected_position"] = "You selected a position number %s",
    ["leave_race"] = "You leave the race.",
    ["none_leaderboard"] = "NONE",
}

Config.Races = {
	["THE GASOLINE"] = {
		Enabled = true, -- the race is turned on
		Blip = {
			Enable = true,
			Sprite = 611,
			Scale = 0.75,
			Color = 4,
			Name = "Race - THE GASOLINE"
		},
		Label = "THE GASOLINE", -- the title of the race displayed at the top of the panel
		Description = "A long race is coming up, be sure to refuel your car!.", -- the description of the race displayed at the top of the panel
		JoinPrice = 10000, -- how much money do you need to have to join the race
		Difficulty = "easy", -- easy / medium / hard / extreme
		MaxPlayers = 1, -- if 4 players choose 4 positions, a countdown to the start will begin
		LobbyPoint = vec(-2097.48, -339.32, 12.56), -- here you can start a race, join or cancel
		Positions = { -- selectable start positions
			[1] = {selected = false, coords = vec(-2091.8, -312.0, 12.56), heading = 172.0},
			[2] = {selected = false, coords = vec(-2093.04, -323.32, 12.56), heading = 172.0},
			[3] = {selected = false, coords = vec(-2101.64, -324.8, 12.56), heading = 172.0},
			[4] = {selected = false, coords = vec(-2100.36, -311.96, 12.56), heading = 172.0},
		},
		Route = {
			[1] = {coords = vec(-2074.76, -392.84, 11.36)},
			[2] = {coords = vec(-1997.44, -457.84, 11.0)},
			[3] = {coords = vec(-1868.52, -567.4, 11.12)},
			[4] = {coords = vec(-1685.64, -703.84, 10.92)},
			[5] = {coords = vec(-1507.76, -774.72, 10.76)},
			[6] = {coords = vec(-1326.28, -751.2, 10.6)},
		},
	},
	[...]
}

Last updated