Tebex [3,20€]: https://www.msk-scripts.de/
Preview:
Externer Inhalt
youtu.be
Inhalte von externen Seiten werden ohne deine Zustimmung nicht automatisch geladen und angezeigt.
Durch die Aktivierung der externen Inhalte erklärst du dich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.
Description
- Set as many Crafting positions as you want
- Set your own Notification [config.lua]
- Set your own progressBar [config.lua]
- Set the license that a player needs to craft an item
- Set Jobs and Grades who can access the Craftingpoint
- Set a Pedmodel or Marker with 3dText
- Set Blip on or off for each Craftingpoint
- Set a probability to get the item
- Set how many items do you get or min and max amount
Config
Code
Config = {}
----------------------------------------------------------------
Config.Locale = 'de' -- 'de', 'en'
Config.Debug = true
Config.VersionChecker = true
Config.getSharedObject = 'esx:getSharedObject'
----------------------------------------------------------------
Config.Hotkey = 38 -- default: 38 = E // Change the Key in translation.lua too
Config.npcVoice = true -- The NPC will say something to you
Config.textUI = {
type = 'default', -- 'default', 'esx' or 'okok'
color = 'darkblue', -- Only for okokTextUI
position = 'left', -- Only for okokTextUI
esx = 'info' -- Only for esx_textUI
}
Config.buyLicense = true -- Set false if you don't want that player can buy a license at the Craftingpoint
----------------------------------------------------------------
-- !!! This function is clientside AND serverside !!!
-- Look for type == 'client' and type == 'server'
Config.Notification = function(src, type, xPlayer, message) -- xPlayer = ESX.GetPlayerFromId(src)
if type == 'client' then -- clientside
ESX.ShowNotification(message) -- replace this with your Notify // example: exports['okokNotify']:Alert('Crafting', message, 5000, 'info')
elseif type == 'server' then -- serverside
xPlayer.showNotification(message) -- replace this with your Notify // example: TriggerClientEvent('okokNotify:Alert', src, 'Crafting', message, 5000, 'info')
end
end
----------------------------------------------------------------
-- If you want to use this Shop with your inventory Script add the trigger below
Config.Inventory = false -- Set true if you want to use that feature
Config.openInventory = function(currentCrafting)
TriggerEvent("inventory:openCrafting", currentCrafting.label, currentCrafting.items) -- Chezza Inventory
end
----------------------------------------------------------------
-- !!! This function is CLIENTSIDE !!! --
Config.progressBar = function(time, text)
-- https://forum.cfx.re/t/release-pogress-bar-progress-bar-standalone-smooth-animation/838951
exports['pogressBar']:drawBar(time, text)
end
----------------------------------------------------------------
Config.Crafting = {
["craft"] = {
label = 'Werkbank',
-- type = 'license' or 'item'
-- name = 'licensetype' or 'itemname'
license = {enable = true, type = 'license', label = 'Weaponlicense', name = 'weapon', price = 100},
jobs = false, -- 'police' or false to disable
grade = 0, -- default: 0 and all grades above
pedmodel = false, -- 'mp_m_shopkeep_01' or false to use a Marker instead
text3d = {enable = true, label = '~g~Open Werkbank', size = 0.8},
marker = {enable = true, type = 27, size = {a = 1.0, b = 1.0, c = 1.0}, color = {a = 255, b = 255, c = 255}},
blip = {enable = true, id = 238, color = 26, scale = 0.8},
locations = {
{x = -2095.67, y = 2829.51, z = 32.96, h = 81.99},
},
items = {
-- type = 'item' or 'weapon'
-- name = 'itemname' or 'WEAPON_NAME'
-- license = true or false // true = need a license to craft // false = don't need a license to craft
-- probability = number or false
-- count = number OR count = {min = 1, max = 3}
{type = 'item', label = 'Schutzweste', name = 'bulletproof', probability = false, license = false, count = {min = 1, max = 3}, time = 5,
ingredients = {
{label = 'Aramid', name = 'aramid', count = 8},
{label = 'Keramik', name = 'concrete', count = 1}
}
},
{type = 'weapon', label = 'Pistole', name = 'WEAPON_PISTOL', ammo = 100, probability = 60, license = true, count = 1, time = 30,
ingredients = {
{label = 'Eisen', name = 'iron', count = 12},
}
},
}
},
}
Alles anzeigen
Requirements
- ESX 1.2 or ESX Legacy
- mysql-async or oxmysql
- NativeUI
Optional Requirements
- okokTextUI
- esx_textui
- esx_license