π¨Craft Menu
π Translations
You can edit all menu translations in html/translate.js (languages included: fr, en, de, it, es, pt).
System messages and tooltips can be configured in config.lua under the Config.Txt table.
ποΈ Database
No setup needed! Just run the scriptβthe required table will be created automatically in your database. No manual database action required.
πͺ Opening the Crafting Menu
There are two ways to open the crafting menu:
For the playerβs current job:
TriggerServerEvent("bt_craft:openCraftMenu")For a specific job (e.g. βpoliceβ):
TriggerServerEvent("bt_craft:openCraftMenu", "police")
You can server-side, for example, link an item to the opening of the craft menu for a specific job:
exports.vorp_inventory:registerUsableItem("smuggler_book", function(data)
TriggerEvent("bt_craft:openCraftMenu", "smuggler", data.source)
end, GetCurrentResourceName())β Adding a New Craft Recipe
To add a new recipe, edit your Config.Crafts table in the server script.
Example for the "smuggler" job:
Field descriptions:
itemcraft: The item the player will receive after crafting.
level: The minimum job level required to unlock the recipe.
craftTime: The time (in seconds) to craft one item. This is multiplied by the chosen quantity.
requires: Ingredient groups. Each numbered group represents alternative ingredients. The player must provide one option per group.
Tip: You can add as many recipes as you want for each job, and as many alternative ingredients per step as needed.
π Server Export: exports.bt_craft:GetPlayerCraftLevelXP
exports.bt_craft:GetPlayerCraftLevelXPRetrieve a player's crafting level and XP for a given job, synchronously.
Usage:
playerId: The server ID of the player.
jobName: The job to check (e.g.,
"smuggler","police").
Returns:
level(integer) β Playerβs crafting level for the specified job.xp(integer) β Playerβs current XP for the specified job.
If the player/job does not exist yet, the function returns:
1for level0for XP
Example:
π Notes
Flexible integration: Crafting can be opened for any job, or for the player's own job, and recipes are fully customizable.
No DB headaches: The database is auto-managed. Just start the script!
Fully configurable: All translations and messages are editable for easy localization.
Powerful API: Server exports for craft XP/levels let you build advanced features (e.g., UI, ranks).
Last updated