Git Product home page Git Product logo

mt-crafting's Introduction

mt-crafting

Simple crafting system full configurable for QBCore using level system

  • THIS IS A WIP SO IF SOMETHING IS NOT WORKING GOOD GIVE FEEDBACK AT MY DISCORD! :)

Preview:

https://youtu.be/bo649JeniE4 [OUTDATED]

To emplement at future:

  • option to use job or gang
  • Remove table item option and add locations to spawn tables at config.lua

Installation:

Add to qb-smallresources/server/logs.lua

    ['crafting'] = '',

Add to qb-core/server/player.lua

    PlayerData.metadata['craftinglevel'] = PlayerData.metadata['craftinglevel'] or 0

Add to qb-core/shared/item.lua

	-- mt-crafting 2.0
	["mesa_craft"]  	= {["name"] = "mesa_craft", 			["label"] = "Crafting table", 								["weight"] = 70000, 		["type"] = "item", 			["image"] = "mesa_craft.png", 				["unique"] = false, 	["useable"] = true, 	["shouldClose"] = true,    ["combinable"] = nil,   ["description"] = ""},

Add to qb-target/init.lua at Config.TargetModels

    ["mesa_craft"] = {
        models = {
            "prop_tool_bench02_ld",
        },
        options = {
            {
                type = "client",
                event = "mt-crafting:client:AbrirMenuCraft",
                icon = "fas fa-table", 
                label = "Craft Things",
            },
            {
                type = "client",
                action = function(entity) -- This is the action it has to perform, this REPLACES the event and this is OPTIONAL
                    if IsPedAPlayer(entity) then return false end -- This will return false if the entity interacted with is a player and otherwise returns true
                    TriggerEvent('mt-crafting:client:EliminarMesa', entity) -- Triggers
                end,
                icon = "fas fa-table", 
                label = "Delete Table",
            },
                        {
                type = "client",
                event = "mt-crafting:client:VerificarPontos",
                icon = "fas fa-coins", 
                label = "Check Points",
            }
        },
        distance = 2.5,
    },

Add to images to qb-inventory/html/items.lua

Dependicies:

Some code used from:

mt-crafting's People

Contributors

marttins011 avatar abdel1touimi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.