


Was this page helpful?
| Dependency | Notes |
|---|---|
| oxmysql | Required — all stats are stored in MySQL |
| ESX / QBCore | One framework required (MBT.Framework must match) |
| ox_inventory | Optional — used by the default prize delivery preset |
Download mbt_ratio from the MBT Store.
Place it keeping the exact resource name:
resources/
└── [mbt]/
└── mbt_ratio/
├── client/
├── server/
├── html/
├── stream/
├── config.lua
└── fxmanifest.luaOpen config.lua and set MBT.Framework to match your server:
MBT.Framework = "ESX" -- or "QB"The script spawns a custom mbt_scoreboard prop in the world. Set its position and heading in config.lua:
MBT.Prop = {
["Model"] = `mbt_scoreboard`,
["Coords"] = vector3(195.17, -933.81, 32.06),
["Heading"] = 324.49,
}Set MBT.DUI.Coords to the position of the DUI screen surface on the prop:
MBT.DUI = {
[
Edit MBT.PrizeDraw in config.lua to choose the draw frequency and prize pool:
MBT.PrizeDraw = {
["Frequency"] = "Weekly", -- "Weekly" or "Monthly"
["Weekly"] = { ["Day"] = "Tuesday" },
["PrizeInfo"] = {
{
Type = "item",
Name = "WEAPON_PISTOL50",
DropChances = {
{ RollRange = { Min = 1, Max = 97 },
ensure oxmysql
ensure es_extended # or qb-core
ensure mbt_ratiooxmysql and your framework must start before mbt_ratio.
The script auto-creates the mbt_ratio table on first start:
CREATE TABLE IF NOT EXISTS `mbt_ratio` (
`identifier` varchar(50) NOT NULL,
`playerName` varchar(70) NOT NULL,
`deaths` int(11) DEFAULT 0,
`kills` int(11) DEFAULT 0,
`headshots` int(11) DEFAULT 0,
PRIMARY KEY (`identifier`)
);No manual setup is needed.
Join the server and get killed by another player (or kill another player). Open your stats panel with F7 — you should see your kills, deaths and KD ratio.
Walk toward the scoreboard prop. Within 20 units the DUI leaderboard should render on the prop's screen surface, showing all players ranked by KD.
If you set MBT.UseTxAdmin = false, you must call the server event mbt_ratio:manualSaving yourself before shutting the server down, otherwise unsaved stats will be lost.
Then fill in MBT.DeliverPrizeFunction with your inventory system. A preset for ox_inventory is already included (active by default). A commented preset for QBCore inventory is also provided.