Giter VIP home page Giter VIP logo

fivem-scoreboard's Introduction

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.

fivem-scoreboard's People

Contributors

viruxe avatar slicedbrain avatar

Stargazers

 avatar Dave Lowe avatar

Forkers

justauramo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.