First, you need to install the scripts required for Qubit Honor System to work. After installing these scripts, you can put qubit-honorsystem into your resources folder and run it.
oxmysql / mysql-async
1. Framework Configration
Qubit Honor System supports ESX and QB frameworks. If you're using a different framework, unfortunately you won't be able to run Qubit Honor System.
Open the config.lua and fxmanifest.lua change framework setttings for your needs
QBCore Settings
If you're using the qbcore framework, you should configure the framework settings in the config as follows
The value of Config.MaxHonorPool determines the minimum and maximum point levels a player can reach. The number you set will also define the negative limit. For example, if you set a limit of 10,000, it means the neutral level is 0, and the honor value can drop as low as -10,000. You can assign levels as percentage values through the config. If you set a wider range of values, you can provide users with less honor, allowing for a longer-lasting progression flow.
3. Honor Levels
Config.HonorLevels determines how many levels a player can reach. A value of 50% represents the NEUTRAL level — someone who is neither good nor bad, essentially the balance point of honor. 0% is the lowest possible honor (the worst), and 100% is the highest honor. Following the rules, you can define 3 levels or expand it to 10 levels — the range is fully dynamic, and you can add as many levels as you like. For example, if you want to create 3 levels, you can define them as shown below.
Example Three Level Config
Config.HonorLevels = { -- based on percentage 0% means - Honor Pool Value like (-10000) - 100% means - Honor Pool Value like (10000)
Lowest = {
min = 0, -- min honor for the honor level
max = 33, -- min and max honor for the honor level
icon = "bad100.png", -- icon for the honor level
title = "BAD LEVEL", -- title for the honor level
subtitle = "YOU ARE GANGSTER", -- subtitle for the honor level
levelSoundtrack = "bad100", -- soundtrack for the honor level
levelSoundtrackVolume = 0.6 -- volume for the honor level
},
Neutral = {
min = 33,
max = 66,
icon = "zero.png",
title = "NEUTRAL CITIZEN",
subtitle = "UNKNOWN REPUTATION",
levelSoundtrack = nil,
levelSoundtrackVolume = 0.2
},
Highest = {
min = 66,
max = 100,
icon = "good100.png",
title = "GOOD LEVEL",
subtitle = "YOU ARE HERO",
levelSoundtrack = "good100",
levelSoundtrackVolume = 0.2
}
}
5. Decrease & Increase on Killing
You can make it so that when players kill someone with the jobs you specified in the config, their honor value decreases. If a player kills someone with the police job or any of the defined jobs, their honor will decrease. Conversely, if they kill someone not belonging to those jobs, their honor will increase. You can also set how often the honor value changes upon killing using Config.KillCooldown.
Config.NPCKillingDecrease = true -- If true, NPCs will decrease the honor of the player
Config.NPCKillingDecreaseCooldown = 60000 -- Cooldown for NPC killing decrease
Config.NPCKillingDecreaseAmount = 1000 -- How much honor to decrease when an NPC is killed
Config.NPCKillingDecreaseReason = "YOU KILLED AN INNOCENT CIVILIAN!" -- Reason for honor decrease when killing an NPC
Config.KillCooldown = 60000 -- Cooldown for decrease/increase on kill
Config.DecreaseOnKilled = {
['police'] = {
decreaseAmount = 800,
reason = "YOU GUNNED DOWN A POLICE OFFICER! CITY ON ALERT"
},
['sheriff'] = {
decreaseAmount = 850,
reason = "YOU ELIMINATED A SHERIFF! SEVERE LEGAL CONSEQUENCES"
},
['highway'] = {
decreaseAmount = 750,
reason = "YOU TOOK OUT A HIGHWAY PATROL! STATEWIDE WANTED"
},
['swat'] = {
decreaseAmount = 1000,
reason = "YOU NEUTRALIZED A SWAT OFFICER! MOST WANTED LIST"
},
['bcso'] = {
decreaseAmount = 850,
reason = "YOU DISPATCHED A BCSO DEPUTY! HUNTED IN RURAL AREAS"
},
['doj'] = {
decreaseAmount = 900,
reason = "YOU KILLED A DOJ! FEDERALS HUNTS YOU SOON!"
},
['ambulance'] = {
decreaseAmount = 700,
reason = "YOU ATTACKED A PARAMEDIC! SOCIETY IS OUTRAGED"
},
['judge'] = {
decreaseAmount = 950,
reason = "YOU ASSASSINATED A JUDGE! JUSTICE SHOWS NO MERCY"
}
}
Config.IncreaseIfPlayerHaveDecreasedJobs = true -- If a player has decreased jobs like police or etc, they will be increased if they kill a Increased Job
Config.IncreaseOnKilled = {
['ballas'] = {
increaseAmount = 300,
reason = "YOU NEUTRALIZED A BALLAS MEMBER! CITY IS SAFER"
},
['vagos'] = {
increaseAmount = 280,
reason = "YOU TOOK DOWN A VAGOS MEMBER! CLEANER STREETS"
},
['families'] = {
increaseAmount = 290,
reason = "YOU ELIMINATED A FAMILIES MEMBER! SAFER HOODS"
},
['mafia'] = {
increaseAmount = 450,
reason = "YOU EXECUTED A MAFIA MEMBER! BLOW TO CRIME"
},
['cartel'] = {
increaseAmount = 500,
reason = "YOU DISMANTLED A CARTEL MEMBER! DRUG TRADE HIT"
},
['triads'] = {
increaseAmount = 400,
reason = "YOU WIPED OUT A TRIAD! ASIAN CRIME ALERTED"
},
['biker'] = {
increaseAmount = 350,
reason = "YOU HANDLED A BIKER GANG MEMBER! SAFER ROADS"
}
}
6. Setup Database
To run qubit-honorsystemyou need to import the following SQL file.
Setup Finished 🎉
After configuring your items, you can start using the Qubit Honor System If you encounter any issues during the setup process, please visit our Discord for more comprehensive support.