Skip to content

Simple scoreboard for FiveM, utilizing ox_lib's context menu and ESX.

License

Notifications You must be signed in to change notification settings

VIRUXE/fivem-scoreboard

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scoreboard - the ox_lib way

Screenshot 2024-05-04 232725

Overview

It's a pretty basic scoreboard, utilizing Overextended's ox_lib library resource, specifically, it's Context Menu.

All you have to do is specificy in config.lua the jobs you want to display a player count for, in the menu.

Installation

Just clone/download the repo to your resources directory, name it however you want, configure config.lua to your liking and have it started in your server.cfg.

This is the current default configuration, that comes in config.lua:

Config = {
	Jobs = { -- Use internal job names for as table keys
		police = {
			-- title = "",
			icon = "shield-halved",
			iconColor = "blue"
		},
		ambulance = {
			-- title = "",
			icon = "truck-medical",
			iconColor = "red"
		},
		mechanic = {
			-- title = "",
			icon = "wrench"
		}
	},
	CountRequestThreshold = 5000,
	MaxClients = 48, -- This will only be used if you havent prefixed `sv_maxclients` with `setr` (replicates that convar to the clients
	Key = "F9"
}

Use a job's internal name as a key inside the Jobs property/node, and then set your title (optional - can be seen as a label, if you want text in a different language for example), icon and iconColor (optional).

Acknowledgments

Thanks to slicedbrain for the original repository, which gave me the itch to refactor it completely, with a good coding standard.

About

Simple scoreboard for FiveM, utilizing ox_lib's context menu and ESX.

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Lua 100.0%