HexscriptsVersion 3.0Weaponcrafter
Configurations
Here you will get all configurations & open source files that are included within this script.
Config Files
Config = {}
Config.Debug = false -- Set to true to enable debug messages in the console
Config.Locale = 'automatic' -- automatic, en, de, es, fr, it, nl, pl, pt, tr, ar
Config.Framework = 'automatic' -- automatic, esx, qbcore, standalone
Config.ServerName = 'HEXSCRIPTS'
Config.weaponCrafter = {
{
coords = vector4(3039.7808, -4638.4985, 15.2070, 90.1493),
ped = {
enabled = true,
distance = 1.0,
renderDistance = 50.0,
model = joaat('CS_FBISuit_01'),
data = {
animation = {
scenario = 'WORLD_HUMAN_CLIPBOARD',
},
speakData = {
voiceName = 'a_m_m_business_01_white_full_01',
speechName = 'GENERIC_HI',
speechParam = 'SPEECH_PARAMS_FORCE',
distance = 3.0
}
}
},
weapons = {
{
name = 'WEAPON_PISTOL_MK2',
label = 'Pistol MK2',
needItem = {
name = 'phone',
count = 10
},
addBullets = 10,
tints = {
black = false,
green = false,
gold = false,
pink = false,
army = false,
lspd = false,
orange = false,
platin = false
}
},
{
name = 'WEAPON_PISTOL50',
label = 'Pistol 50',
needItem = {
name = 'phone',
count = 75
},
addBullets = 10,
tints = {
black = 0,
green = 15,
gold = 35,
pink = 40,
army = 25,
lspd = 30,
orange = 25,
platin = 20
}
},
{
name = 'WEAPON_SWITCHBLADE',
label = 'Klappmesser',
needItem = {
name = 'phone',
count = 15
},
addBullets = 0,
tints = {
black = false,
green = false,
gold = false,
pink = false,
army = false,
lspd = false,
orange = false,
platin = false
}
},
{
name = 'WEAPON_PISTOL',
label = 'Pistol',
needItem = {
name = 'phone',
count = 50
},
addBullets = 10,
tints = {
black = 0,
green = 15,
gold = 35,
pink = 40,
army = 25,
lspd = 30,
orange = 25,
platin = 20
}
},
{
name = 'WEAPON_HEAVYPISTOL',
label = 'Kampfpistole',
needItem = {
name = 'phone',
count = 60
},
addBullets = 10,
tints = {
black = 0,
green = 15,
gold = 35,
pink = 40,
army = 25,
lspd = 30,
orange = 25,
platin = 20
}
},
{
name = 'WEAPON_MACHETE',
label = 'Machete',
needItem = {
name = 'phone',
count = 15
},
addBullets = 0,
tints = {
black = false,
green = false,
gold = false,
pink = false,
army = false,
lspd = false,
orange = false,
platin = false
}
},
}
}
}Client Open Source Files
if Config.Framework == 'automatic' then
if GetResourceState('es_extended') == 'started' then
Config.Framework = 'esx'
elseif GetResourceState('qb-core') == 'started' then
Config.Framework = 'qbcore'
else
Config.Framework = 'standalone'
end
end
function DrawHelpNotify(message)
if GetResourceState('hex_final_hud') == 'started' then
exports['hex_final_hud']:HelpNotify(message)
elseif GetResourceState('hex_2_hud') == 'started' then
exports['hex_2_hud']:HelpNotify(message)
elseif GetResourceState('hex_future_hud') == 'started' then
exports['hex_future_hud']:HelpNotify(message)
elseif GetResourceState('hex_1_hud') == 'started' then
exports['hex_1_hud']:HelpNotify(message)
elseif GetResourceState('hex_hud_prem') == 'started' then
exports['hex_hud_prem']:HelpNotify(message)
else
SetTextComponentFormat('STRING')
AddTextComponentString(message)
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
end
end
function Notify(title, message, notifyType, timeout)
if timeout == nil then timeout = 5000 end
if notifyType == nil then notifyType = 'info' end
if GetResourceState('hex_final_hud') == 'started' then
exports['hex_final_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_2_hud') == 'started' then
exports['hex_2_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_future_hud') == 'started' then
exports['hex_future_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_1_hud') == 'started' then
exports['hex_1_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_hud_prem') == 'started' then
exports['hex_hud_prem']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_hud') == 'started' then
exports['hex_hud']:Notify(title, message, notifyType, timeout)
else
print(('Notify: %s, %s, %s, %s'):format(title, message, notifyType, timeout))
end
endServer Open Source Files
if Config.Framework == 'automatic' then
if GetResourceState('es_extended') == 'started' then
Config.Framework = 'esx'
elseif GetResourceState('qb-core') == 'started' then
Config.Framework = 'qbcore'
else
Config.Framework = 'standalone'
end
end