Setup
Step One
Setup mining helmet with your inventory.
Edit your html/js/app.js file. Add the following code in the FormatItemInfo function
} else if (itemData.name == "mining_helmet") {
$(".item-info-title").html(`<p>${itemData.label}</p>`);
$(".item-info-description").html(
`<p>This helmet has <strong>${itemData.info.experience}</strong> experience.</p>`
);
Here is a example of what it should look like after the edit:
function FormatItemInfo(itemData) {
console.log(itemData)
if (itemData != null && itemData.info != "") {
if (itemData.name == "id_card") {
var gender = "Man";
if (itemData.info.gender == 1) {
gender = "Woman";
}
$(".item-info-title").html("<p>" + itemData.label + "</p>");
$(".item-info-description").html(
"<p><strong>CSN: </strong><span>" +
itemData.info.citizenid +
"</span></p><p><strong>First Name: </strong><span>" +
itemData.info.firstname +
"</span></p><p><strong>Last Name: </strong><span>" +
itemData.info.lastname +
"</span></p><p><strong>Birth Date: </strong><span>" +
itemData.info.birthdate +
"</span></p><p><strong>Gender: </strong><span>" +
gender +
"</span></p><p><strong>Nationality: </strong><span>" +
itemData.info.nationality +
"</span></p>"
);
} else if (itemData.name == "mining_helmet") {
$(".item-info-title").html(`<p>${itemData.label}</p>`);
$(".item-info-description").html(
`<p>This helmet has <strong>${itemData.info.experience}</strong> experience.</p>`
);
} else if (itemData.name == "driver_license") {
$(".item-info-title").html("<p>" + itemData.label + "</p>");
$(".item-info-description").html(
"<p><strong>First Name: </strong><span>" +
itemData.info.firstname +
"</span></p><p><strong>Last Name: </strong><span>" +
itemData.info.lastname +
"</span></p><p><strong>Birth Date: </strong><span>" +
itemData.info.birthdate +
"</span></p><p><strong>Licenses: </strong><span>" +
itemData.info.type +
"</span></p>"
);
Step Two
Add the items to your inventory system
--tools
["mining_helmet"]= {["name"] = "mining_helmet", ["label"] = "Mining Helmet", ["weight"] = 500, ["type"] = "item", ["image"] = "mining_helmet.png", ["unique"] = true, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Maybe this thing will help me see in the deep dark mining cave.."},
["pickaxe"]= {["name"] = "pickaxe", ["label"] = "Pickaxe", ["weight"] = 500, ["type"] = "item", ["image"] = "pickaxe.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "Maybe I can use this to mine ore in the caves."},
--Ores
["copper_ore"]= {["name"] = "copper_ore", ["label"] = "Copper Ore", ["weight"] = 500, ["type"] = "item", ["image"] = "copper_ore.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "I can probably refine this."},
["iron_ore"]= {["name"] = "iron_ore", ["label"] = "Iron Ore", ["weight"] = 500, ["type"] = "item", ["image"] = "iron_ore.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "I can probably refine this."},
["silver_ore"]= {["name"] = "silver_ore", ["label"] = "Silver Ore", ["weight"] = 500, ["type"] = "item", ["image"] = "silver_ore.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "I can probably refine this."},
["gold_ore"]= {["name"] = "gold_ore", ["label"] = "Gold Ore", ["weight"] = 500, ["type"] = "item", ["image"] = "gold_ore.png", ["unique"] = true, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "I can probably refine this."},
["platinum_ore"]= {["name"] = "platinum_ore", ["label"] = "Platinum Ore", ["weight"] = 500, ["type"] = "item", ["image"] = "platinum_ore.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "I can probably refine this."},
--Gems
["topaz"]= {["name"] = "topaz", ["label"] = "Topaz", ["weight"] = 500, ["type"] = "item", ["image"] = "topaz.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "I can probably sell this for a nice profit!"},
["sapphire"]= {["name"] = "sapphire", ["label"] = "Sapphire", ["weight"] = 500, ["type"] = "item", ["image"] = "sapphire.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "I can probably sell this for a nice profit!"},
["emerald"]= {["name"] = "emerald", ["label"] = "Emerald", ["weight"] = 500, ["type"] = "item", ["image"] = "emerald.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "I can probably sell this for a nice profit!"},
["ruby"]= {["name"] = "ruby", ["label"] = "Ruby", ["weight"] = 500, ["type"] = "item", ["image"] = "ruby.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "I can probably sell this for a nice profit!"},
["diamond"]= {["name"] = "diamond", ["label"] = "Diamond", ["weight"] = 500, ["type"] = "item", ["image"] = "diamond.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "I can probably sell this for a nice profit!"},
--Bars
["copper_bar"]= {["name"] = "copper_bar", ["label"] = "Copper Bar", ["weight"] = 500, ["type"] = "item", ["image"] = "copper_bar.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "I could probably sell this for some $$$."},
["iron_bar"]= {["name"] = "iron_bar", ["label"] = "Iron Bar", ["weight"] = 500, ["type"] = "item", ["image"] = "iron_bar.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "I could probably sell this for some $$$."},
["silver_bar"]= {["name"] = "silver_bar", ["label"] = "Silver Bar", ["weight"] = 500, ["type"] = "item", ["image"] = "silver_bar.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "I could probably sell this for some $$$."},
["gold_bar"]= {["name"] = "gold_bar", ["label"] = "Gold Bar", ["weight"] = 500, ["type"] = "item", ["image"] = "gold_bar.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "I could probably sell this for some $$$."},
["platinum_bar"]= {["name"] = "platinum_bar", ["label"] = "Platinum Bar", ["weight"] = 500, ["type"] = "item", ["image"] = "platinum_bar.png", ["unique"] = false, ["useable"] = false, ["shouldClose"] = false, ["combinable"] = nil, ["description"] = "I could probably sell this for some $$$."},
todo
Step Three
Take all of the imgs found in the [imgs] folder and place them into your inventory image folder location.
Step Four
Edit the config.lua file to your liking and if you have any questions join our discord!
Step Five
put ensure ixhal-mining
in your server.cfg
Last updated