This system will help your community get paid more based on how much they are willing to spend on education :)
Once you decide a job on which to write a book, the players can purchase it and get extra experience / money based on the skill level they have.
Join the Discord for support and updates
It will change the money recieved based on your skill level
totalToPay = exports['bookmaster']:getPlayerSkillLevel(src, 'garbage') * totalToPay
- Download the resource
- Add the resource to your server.cfg
Open qb-core/shared/items.lua
Insert items like so:
bookgarbage = { name = 'bookgarbage', label = 'Book for Garbage Job', weight = 1, type = 'item', image = 'BookGarbage.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Book for the garbage job' },
Now you can use the bookgarbage item by adding it in the server/useableBooks.lua
QBCore.Functions.CreateUseableItem("bookgarbage", function (source, item)
TriggerClientEvent("bookmaster:client:openBook", source, "garbage")
end)
(the "garbage" is the job name and the bookdata refrence)
- Go to
web/public/BookData.ts
- Add your layout:
const BookData = {
"mining": {
"pages": [
//...
],
"test": "test.html"
},
"garbage": {
"pages": [
//...
],
"test": "test.html"
},
"your new job": {
"pages": [
//...
],
"test": "test.html"
}
}
export default BookData
- Write your book 💙
I have provided a template that you can copy from web/public/Books/*
and use it to create your own book with your own content.
- Integrate easily using a 1-liner solution:
totalToPay = exports['bookmaster']:getPlayerSkillLevel(src, 'garbage') * totalToPay