Wert-Dna

You can access the setup information you need about this product

INSTALLATION

1 - Drop the file into your resources folder

2 - Make sure all depends scripts exist (Or download it)

3 - Run the dna.sql file and have it read into your sql

4 - Make sure the sql file is read without any problems

MAKE INVENTORY STEP

  • Go qb-inventory/server/main.lua

  • Find this event lines RegisterServerEvent("inventory:server:UseItemSlot")

  • Change this

-- Code
RegisterNetEvent('inventory:server:UseItemSlot', function(slot)
	local src = source
	local itemData = GetItemBySlot(src, slot)
	if not itemData then return end
	local itemInfo = QBCore.Shared.Items[itemData.name]
	if itemData.type == "weapon" then
		TriggerClientEvent("inventory:client:UseWeapon", src, itemData, itemData.info.quality and itemData.info.quality > 0)
		TriggerClientEvent('inventory:client:ItemBox', src, itemInfo, "use")
		if itemData.info.serie then
			TriggerClientEvent("wert-dna:set-weapon-serial-number", src, itemData.info.serie)
		end
	elseif itemData.useable then
		UseItem(itemData.name, src, itemData)
		TriggerClientEvent('inventory:client:ItemBox', src, itemInfo, "use")
	end
end)

5 - Add your item list, requid items

-- Items
["delil_dna"] 		= {["name"] = "delil_dna", 	["label"] = "Kan torbası", 	    ["weight"] = 0, 	["type"] = "item", 	["image"] = "delil_dna.png", 		["unique"] = true, 	["useable"] = true, 	["expire"] = nil, 	["shouldClose"] = false,   ["combinable"] = nil,   ["description"] = "Delil torbası"},
	
["delil_kovan"] 	= {["name"] = "delil_kovan", 	["label"] = "Kovan torbası", 	    ["weight"] = 0, 	["type"] = "item", 	["image"] = "delil_kovan.png", 		["unique"] = true, 	["useable"] = true, 	["expire"] = nil, 	["shouldClose"] = false,   ["combinable"] = nil,   ["description"] = "Delil torbası"},

6 - if you use oxymysql change Config.sql value (look config.lua)

7 - if you use different a target system change target exports (client.lua)

8 - Restart server

Installation complete

Last updated