diff --git a/.github/workflows/formatt-all.yml b/.github/workflows/formatt-all.yml
deleted file mode 100644
index 484d5b95b..000000000
--- a/.github/workflows/formatt-all.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-# Check Lua Formatting
-name: Check Lua Formatting
-on:
- push:
- branches: [ main ]
- pull_request:
- types: [ labeled ]
-
-jobs:
- stylua-check:
- name: Stylua Check
- runs-on: ubuntu-latest
- permissions:
- contents: write
- if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.label.name == 'format_all') }}
- steps:
- - uses: actions/checkout@v4
- - uses: JohnnyMorganz/stylua-action@v4
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- version: latest
- # CLI arguments
- args: --check .
diff --git a/.gitignore b/.gitignore
index b626465d5..ae009af18 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,6 +14,8 @@ server-data/resources/\[gameplay]
server-data/resources/\[managers]
server-data/resources/\[system]
server-data/resources/\[system]/\[builders]
+server-data/resources/\[test]
+server-data/resources/\[gamemodes]
# Resources log
server-data/resources/\[phone]/npwd/sv_npwd.log
\ No newline at end of file
diff --git a/server-data/resources/[esx]/es_extended/LICENSE b/server-data/resources/[esx]/es_extended/LICENSE
index f26a06604..a10f2d96e 100644
--- a/server-data/resources/[esx]/es_extended/LICENSE
+++ b/server-data/resources/[esx]/es_extended/LICENSE
@@ -631,7 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
- es_extended Copyright (C) 2022-2024 bitpredator
+ es_extended
+ Copyright (C) 2015-2023 Jérémie N'gadi
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -651,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
- es_extended Copyright (C) 2022-2024 bitpredator
+ es_extended Copyright (C) 2015-2023 Jérémie N'gadi
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
diff --git a/server-data/resources/[esx]/es_extended/client/common.lua b/server-data/resources/[esx]/es_extended/client/common.lua
index 11225fd22..7a896201c 100644
--- a/server-data/resources/[esx]/es_extended/client/common.lua
+++ b/server-data/resources/[esx]/es_extended/client/common.lua
@@ -1,12 +1,8 @@
exports("getSharedObject", function()
- return ESX
+ return ESX
end)
AddEventHandler("esx:getSharedObject", function()
- local Invoke = GetInvokingResource()
- print(
- ("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!"):format(
- Invoke
- )
- )
+ local Invoke = GetInvokingResource()
+ print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://bitpredator.github.io/bptdevelopment/docs/esx-tutorial/sharedevent for how to fix!"):format(Invoke))
end)
diff --git a/server-data/resources/[esx]/es_extended/client/functions.lua b/server-data/resources/[esx]/es_extended/client/functions.lua
index bdd1f6049..bb545f4e8 100644
--- a/server-data/resources/[esx]/es_extended/client/functions.lua
+++ b/server-data/resources/[esx]/es_extended/client/functions.lua
@@ -17,1440 +17,1334 @@ ESX.Scaleform.Utils = {}
ESX.Streaming = {}
function ESX.IsPlayerLoaded()
- return ESX.PlayerLoaded
+ return ESX.PlayerLoaded
end
function ESX.GetPlayerData()
- return ESX.PlayerData
+ return ESX.PlayerData
end
function ESX.SearchInventory(items, count)
- items = type(items) == "string" and { items } or items
-
- local data = {}
- for i = 1, #items do
- for c = 1, #ESX.PlayerData.inventory do
- if ESX.PlayerData.inventory[c].name == items[i] then
- data[items[i]] = (count and ESX.PlayerData.inventory[c].count) or ESX.PlayerData.inventory[c]
- end
- end
- end
-
- return #items == 1 and data[items[1]] or data
+ items = type(items) == "string" and { items } or items
+
+ local data = {}
+ for i = 1, #items do
+ for c = 1, #ESX.PlayerData.inventory do
+ if ESX.PlayerData.inventory[c].name == items[i] then
+ data[items[i]] = (count and ESX.PlayerData.inventory[c].count) or ESX.PlayerData.inventory[c]
+ end
+ end
+ end
+
+ return #items == 1 and data[items[1]] or data
end
function ESX.SetPlayerData(key, val)
- local current = ESX.PlayerData[key]
- ESX.PlayerData[key] = val
- if key ~= "inventory" and key ~= "loadout" then
- if type(val) == "table" or val ~= current then
- TriggerEvent("esx:setPlayerData", key, val, current)
- end
- end
+ local current = ESX.PlayerData[key]
+ ESX.PlayerData[key] = val
+ if key ~= "inventory" and key ~= "loadout" then
+ if type(val) == "table" or val ~= current then
+ TriggerEvent("esx:setPlayerData", key, val, current)
+ end
+ end
end
function ESX.Progressbar(message, length, Options)
- if GetResourceState("esx_progressbar") ~= "missing" then
- return exports["esx_progressbar"]:Progressbar(message, length, Options)
- end
+ if GetResourceState("esx_progressbar") ~= "missing" then
+ return exports["esx_progressbar"]:Progressbar(message, length, Options)
+ end
- print("[^1ERROR^7] ^5ESX Progressbar^7 is Missing!")
+ print("[^1ERROR^7] ^5ESX Progressbar^7 is Missing!")
end
function ESX.ShowNotification(message, notifyType, length)
- if GetResourceState("esx_notify") ~= "missing" then
- return exports["esx_notify"]:Notify(notifyType, length, message)
- end
+ if GetResourceState("esx_notify") ~= "missing" then
+ return exports["esx_notify"]:Notify(notifyType, length, message)
+ end
- print("[^1ERROR^7] ^5ESX Notify^7 is Missing!")
+ print("[^1ERROR^7] ^5ESX Notify^7 is Missing!")
end
function ESX.TextUI(message, notifyType)
- if GetResourceState("esx_textui") ~= "missing" then
- return exports["esx_textui"]:TextUI(message, notifyType)
- end
+ if GetResourceState("esx_textui") ~= "missing" then
+ return exports["esx_textui"]:TextUI(message, notifyType)
+ end
- print("[^1ERROR^7] ^5ESX TextUI^7 is Missing!")
+ print("[^1ERROR^7] ^5ESX TextUI^7 is Missing!")
end
function ESX.HideUI()
- if GetResourceState("esx_textui") ~= "missing" then
- return exports["esx_textui"]:HideUI()
- end
+ if GetResourceState("esx_textui") ~= "missing" then
+ return exports["esx_textui"]:HideUI()
+ end
- print("[^1ERROR^7] ^5ESX TextUI^7 is Missing!")
+ print("[^1ERROR^7] ^5ESX TextUI^7 is Missing!")
end
function ESX.ShowAdvancedNotification(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
- if saveToBrief == nil then
- saveToBrief = true
- end
- AddTextEntry("esxAdvancedNotification", msg)
- BeginTextCommandThefeedPost("esxAdvancedNotification")
- if hudColorIndex then
- ThefeedSetNextPostBackgroundColor(hudColorIndex)
- end
- EndTextCommandThefeedPostMessagetext(textureDict, textureDict, false, iconType, sender, subject)
- EndTextCommandThefeedPostTicker(flash or false, saveToBrief)
+ if saveToBrief == nil then
+ saveToBrief = true
+ end
+ AddTextEntry("esxAdvancedNotification", msg)
+ BeginTextCommandThefeedPost("esxAdvancedNotification")
+ if hudColorIndex then
+ ThefeedSetNextPostBackgroundColor(hudColorIndex)
+ end
+ EndTextCommandThefeedPostMessagetext(textureDict, textureDict, false, iconType, sender, subject)
+ EndTextCommandThefeedPostTicker(flash or false, saveToBrief)
end
function ESX.ShowHelpNotification(msg, thisFrame, beep, duration)
- AddTextEntry("esxHelpNotification", msg)
-
- if thisFrame then
- DisplayHelpTextThisFrame("esxHelpNotification", false)
- else
- if beep == nil then
- beep = true
- end
- BeginTextCommandDisplayHelp("esxHelpNotification")
- EndTextCommandDisplayHelp(0, false, beep, duration or -1)
- end
+ AddTextEntry("esxHelpNotification", msg)
+
+ if thisFrame then
+ DisplayHelpTextThisFrame("esxHelpNotification", false)
+ else
+ if beep == nil then
+ beep = true
+ end
+ BeginTextCommandDisplayHelp("esxHelpNotification")
+ EndTextCommandDisplayHelp(0, false, beep, duration or -1)
+ end
end
function ESX.ShowFloatingHelpNotification(msg, coords)
- AddTextEntry("esxFloatingHelpNotification", msg)
- SetFloatingHelpTextWorldPosition(1, coords)
- SetFloatingHelpTextStyle(1, 1, 2, -1, 3, 0)
- BeginTextCommandDisplayHelp("esxFloatingHelpNotification")
- EndTextCommandDisplayHelp(2, false, false, -1)
+ AddTextEntry("esxFloatingHelpNotification", msg)
+ SetFloatingHelpTextWorldPosition(1, coords)
+ SetFloatingHelpTextStyle(1, 1, 2, -1, 3, 0)
+ BeginTextCommandDisplayHelp("esxFloatingHelpNotification")
+ EndTextCommandDisplayHelp(2, false, false, -1)
end
ESX.HashString = function(str)
- local format = string.format
- local upper = string.upper
- local gsub = string.gsub
- local hash = joaat(str)
- local input_map = format("~INPUT_%s~", upper(format("%x", hash)))
- input_map = gsub(input_map, "FFFFFFFF", "")
-
- return input_map
+ local format = string.format
+ local upper = string.upper
+ local gsub = string.gsub
+ local hash = joaat(str)
+ local input_map = format("~INPUT_%s~", upper(format("%x", hash)))
+ input_map = gsub(input_map, "FFFFFFFF", "")
+
+ return input_map
end
local contextAvailable = GetResourceState("esx_context") ~= "missing"
function ESX.OpenContext(...)
- return contextAvailable and exports["esx_context"]:Open(...)
- or not contextAvailable
- and print("[^1ERROR^7] Tried to ^5open^7 context menu, but ^5esx_context^7 is missing!")
+ return contextAvailable and exports["esx_context"]:Open(...) or not contextAvailable and print("[^1ERROR^7] Tried to ^5open^7 context menu, but ^5esx_context^7 is missing!")
end
function ESX.PreviewContext(...)
- return contextAvailable and exports["esx_context"]:Preview(...)
- or not contextAvailable
- and print("[^1ERROR^7] Tried to ^5preview^7 context menu, but ^5esx_context^7 is missing!")
+ return contextAvailable and exports["esx_context"]:Preview(...) or not contextAvailable and print("[^1ERROR^7] Tried to ^5preview^7 context menu, but ^5esx_context^7 is missing!")
end
function ESX.CloseContext(...)
- return contextAvailable and exports["esx_context"]:Close(...)
- or not contextAvailable
- and print("[^1ERROR^7] Tried to ^5close^7 context menu, but ^5esx_context^7 is missing!")
+ return contextAvailable and exports["esx_context"]:Close(...) or not contextAvailable and print("[^1ERROR^7] Tried to ^5close^7 context menu, but ^5esx_context^7 is missing!")
end
function ESX.RefreshContext(...)
- return contextAvailable and exports["esx_context"]:Refresh(...)
- or not contextAvailable
- and print("[^1ERROR^7] Tried to ^5Refresh^7 context menu, but ^5esx_context^7 is missing!")
+ return contextAvailable and exports["esx_context"]:Refresh(...) or not contextAvailable and print("[^1ERROR^7] Tried to ^5Refresh^7 context menu, but ^5esx_context^7 is missing!")
end
ESX.RegisterInput = function(command_name, label, input_group, key, on_press, on_release)
- RegisterCommand(on_release ~= nil and "+" .. command_name or command_name, on_press)
- Core.Input[command_name] = on_release ~= nil and ESX.HashString("+" .. command_name) or ESX.HashString(command_name)
- if on_release then
- RegisterCommand("-" .. command_name, on_release)
- end
- RegisterKeyMapping(on_release ~= nil and "+" .. command_name or command_name, label, input_group, key)
+ RegisterCommand(on_release ~= nil and "+" .. command_name or command_name, on_press)
+ Core.Input[command_name] = on_release ~= nil and ESX.HashString("+" .. command_name) or ESX.HashString(command_name)
+ if on_release then
+ RegisterCommand("-" .. command_name, on_release)
+ end
+ RegisterKeyMapping(on_release ~= nil and "+" .. command_name or command_name, label, input_group, key)
end
function ESX.UI.Menu.RegisterType(menuType, open, close)
- ESX.UI.Menu.RegisteredTypes[menuType] = {
- open = open,
- close = close,
- }
+ ESX.UI.Menu.RegisteredTypes[menuType] = {
+ open = open,
+ close = close,
+ }
end
function ESX.UI.Menu.Open(menuType, namespace, name, data, submit, cancel, change, close)
- local menu = {}
-
- menu.type = menuType
- menu.namespace = namespace
- menu.resourceName = (GetInvokingResource() or "Unknown")
- menu.name = name
- menu.data = data
- menu.submit = submit
- menu.cancel = cancel
- menu.change = change
-
- menu.close = function()
- ESX.UI.Menu.RegisteredTypes[menuType].close(namespace, name)
-
- for i = 1, #ESX.UI.Menu.Opened, 1 do
- if ESX.UI.Menu.Opened[i] then
- if
- ESX.UI.Menu.Opened[i].type == menuType
- and ESX.UI.Menu.Opened[i].namespace == namespace
- and ESX.UI.Menu.Opened[i].name == name
- then
- ESX.UI.Menu.Opened[i] = nil
- end
- end
- end
-
- if close then
- close()
- end
- end
-
- menu.update = function(query, newData)
- for i = 1, #menu.data.elements, 1 do
- local match = true
-
- for k, v in pairs(query) do
- if menu.data.elements[i][k] ~= v then
- match = false
- end
- end
-
- if match then
- for k, v in pairs(newData) do
- menu.data.elements[i][k] = v
- end
- end
- end
- end
-
- menu.refresh = function()
- ESX.UI.Menu.RegisteredTypes[menuType].open(namespace, name, menu.data)
- end
-
- menu.setElement = function(i, key, val)
- menu.data.elements[i][key] = val
- end
-
- menu.setElements = function(newElements)
- menu.data.elements = newElements
- end
-
- menu.setTitle = function(val)
- menu.data.title = val
- end
-
- menu.removeElement = function(query)
- for i = 1, #menu.data.elements, 1 do
- for k, v in pairs(query) do
- if menu.data.elements[i] then
- if menu.data.elements[i][k] == v then
- table.remove(menu.data.elements, i)
- break
- end
- end
- end
- end
- end
-
- ESX.UI.Menu.Opened[#ESX.UI.Menu.Opened + 1] = menu
- ESX.UI.Menu.RegisteredTypes[menuType].open(namespace, name, data)
-
- return menu
+ local menu = {}
+
+ menu.type = menuType
+ menu.namespace = namespace
+ menu.resourceName = (GetInvokingResource() or "Unknown")
+ menu.name = name
+ menu.data = data
+ menu.submit = submit
+ menu.cancel = cancel
+ menu.change = change
+
+ menu.close = function()
+ ESX.UI.Menu.RegisteredTypes[menuType].close(namespace, name)
+
+ for i = 1, #ESX.UI.Menu.Opened, 1 do
+ if ESX.UI.Menu.Opened[i] then
+ if ESX.UI.Menu.Opened[i].type == menuType and ESX.UI.Menu.Opened[i].namespace == namespace and ESX.UI.Menu.Opened[i].name == name then
+ ESX.UI.Menu.Opened[i] = nil
+ end
+ end
+ end
+
+ if close then
+ close()
+ end
+ end
+
+ menu.update = function(query, newData)
+ for i = 1, #menu.data.elements, 1 do
+ local match = true
+
+ for k, v in pairs(query) do
+ if menu.data.elements[i][k] ~= v then
+ match = false
+ end
+ end
+
+ if match then
+ for k, v in pairs(newData) do
+ menu.data.elements[i][k] = v
+ end
+ end
+ end
+ end
+
+ menu.refresh = function()
+ ESX.UI.Menu.RegisteredTypes[menuType].open(namespace, name, menu.data)
+ end
+
+ menu.setElement = function(i, key, val)
+ menu.data.elements[i][key] = val
+ end
+
+ menu.setElements = function(newElements)
+ menu.data.elements = newElements
+ end
+
+ menu.setTitle = function(val)
+ menu.data.title = val
+ end
+
+ menu.removeElement = function(query)
+ for i = 1, #menu.data.elements, 1 do
+ for k, v in pairs(query) do
+ if menu.data.elements[i] then
+ if menu.data.elements[i][k] == v then
+ table.remove(menu.data.elements, i)
+ break
+ end
+ end
+ end
+ end
+ end
+
+ ESX.UI.Menu.Opened[#ESX.UI.Menu.Opened + 1] = menu
+ ESX.UI.Menu.RegisteredTypes[menuType].open(namespace, name, data)
+
+ return menu
end
function ESX.UI.Menu.Close(menuType, namespace, name)
- for i = 1, #ESX.UI.Menu.Opened, 1 do
- if ESX.UI.Menu.Opened[i] then
- if
- ESX.UI.Menu.Opened[i].type == menuType
- and ESX.UI.Menu.Opened[i].namespace == namespace
- and ESX.UI.Menu.Opened[i].name == name
- then
- ESX.UI.Menu.Opened[i].close()
- ESX.UI.Menu.Opened[i] = nil
- end
- end
- end
+ for i = 1, #ESX.UI.Menu.Opened, 1 do
+ if ESX.UI.Menu.Opened[i] then
+ if ESX.UI.Menu.Opened[i].type == menuType and ESX.UI.Menu.Opened[i].namespace == namespace and ESX.UI.Menu.Opened[i].name == name then
+ ESX.UI.Menu.Opened[i].close()
+ ESX.UI.Menu.Opened[i] = nil
+ end
+ end
+ end
end
function ESX.UI.Menu.CloseAll()
- for i = 1, #ESX.UI.Menu.Opened, 1 do
- if ESX.UI.Menu.Opened[i] then
- ESX.UI.Menu.Opened[i].close()
- ESX.UI.Menu.Opened[i] = nil
- end
- end
+ for i = 1, #ESX.UI.Menu.Opened, 1 do
+ if ESX.UI.Menu.Opened[i] then
+ ESX.UI.Menu.Opened[i].close()
+ ESX.UI.Menu.Opened[i] = nil
+ end
+ end
end
function ESX.UI.Menu.GetOpened(menuType, namespace, name)
- for i = 1, #ESX.UI.Menu.Opened, 1 do
- if ESX.UI.Menu.Opened[i] then
- if
- ESX.UI.Menu.Opened[i].type == menuType
- and ESX.UI.Menu.Opened[i].namespace == namespace
- and ESX.UI.Menu.Opened[i].name == name
- then
- return ESX.UI.Menu.Opened[i]
- end
- end
- end
+ for i = 1, #ESX.UI.Menu.Opened, 1 do
+ if ESX.UI.Menu.Opened[i] then
+ if ESX.UI.Menu.Opened[i].type == menuType and ESX.UI.Menu.Opened[i].namespace == namespace and ESX.UI.Menu.Opened[i].name == name then
+ return ESX.UI.Menu.Opened[i]
+ end
+ end
+ end
end
function ESX.UI.Menu.GetOpenedMenus()
- return ESX.UI.Menu.Opened
+ return ESX.UI.Menu.Opened
end
function ESX.UI.Menu.IsOpen(menuType, namespace, name)
- return ESX.UI.Menu.GetOpened(menuType, namespace, name) ~= nil
+ return ESX.UI.Menu.GetOpened(menuType, namespace, name) ~= nil
end
function ESX.UI.ShowInventoryItemNotification(add, item, count)
- SendNUIMessage({
- action = "inventoryNotification",
- add = add,
- item = item,
- count = count,
- })
+ SendNUIMessage({
+ action = "inventoryNotification",
+ add = add,
+ item = item,
+ count = count,
+ })
end
function ESX.Game.GetPedMugshot(ped, transparent)
- if not DoesEntityExist(ped) then
- return
- end
- local mugshot = transparent and RegisterPedheadshotTransparent(ped) or RegisterPedheadshot(ped)
+ if not DoesEntityExist(ped) then
+ return
+ end
+ local mugshot = transparent and RegisterPedheadshotTransparent(ped) or RegisterPedheadshot(ped)
- while not IsPedheadshotReady(mugshot) do
- Wait(0)
- end
+ while not IsPedheadshotReady(mugshot) do
+ Wait(0)
+ end
- return mugshot, GetPedheadshotTxdString(mugshot)
+ return mugshot, GetPedheadshotTxdString(mugshot)
end
function ESX.Game.Teleport(entity, coords, cb)
- local vector = type(coords) == "vector4" and coords
- or type(coords) == "vector3" and vector4(coords, 0.0)
- or vec(coords.x, coords.y, coords.z, coords.heading or 0.0)
-
- if DoesEntityExist(entity) then
- RequestCollisionAtCoord(vector.xyz)
- while not HasCollisionLoadedAroundEntity(entity) do
- Wait(0)
- end
-
- SetEntityCoords(entity, vector.xyz, false, false, false, false)
- SetEntityHeading(entity, vector.w)
- end
-
- if cb then
- cb()
- end
+ local vector = type(coords) == "vector4" and coords or type(coords) == "vector3" and vector4(coords, 0.0) or vec(coords.x, coords.y, coords.z, coords.heading or 0.0)
+
+ if DoesEntityExist(entity) then
+ RequestCollisionAtCoord(vector.xyz)
+ while not HasCollisionLoadedAroundEntity(entity) do
+ Wait(0)
+ end
+
+ SetEntityCoords(entity, vector.xyz, false, false, false, false)
+ SetEntityHeading(entity, vector.w)
+ end
+
+ if cb then
+ cb()
+ end
end
function ESX.Game.SpawnObject(object, coords, cb, networked)
- networked = networked == nil and true or networked
-
- local model = type(object) == "number" and object or joaat(object)
- local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
- CreateThread(function()
- ESX.Streaming.RequestModel(model)
-
- local obj = CreateObject(model, vector.xyz, networked, false, true)
- if cb then
- cb(obj)
- end
- end)
+ networked = networked == nil and true or networked
+
+ local model = type(object) == "number" and object or joaat(object)
+ local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
+ CreateThread(function()
+ ESX.Streaming.RequestModel(model)
+
+ local obj = CreateObject(model, vector.xyz, networked, false, true)
+ if cb then
+ cb(obj)
+ end
+ end)
end
function ESX.Game.SpawnLocalObject(object, coords, cb)
- ESX.Game.SpawnObject(object, coords, cb, false)
+ ESX.Game.SpawnObject(object, coords, cb, false)
end
function ESX.Game.DeleteVehicle(vehicle)
- SetEntityAsMissionEntity(vehicle, true, true)
- DeleteVehicle(vehicle)
+ SetEntityAsMissionEntity(vehicle, true, true)
+ DeleteVehicle(vehicle)
end
function ESX.Game.DeleteObject(object)
- SetEntityAsMissionEntity(object, false, true)
- DeleteObject(object)
+ SetEntityAsMissionEntity(object, false, true)
+ DeleteObject(object)
end
function ESX.Game.SpawnVehicle(vehicleModel, coords, heading, cb, networked)
- local model = type(vehicleModel) == "number" and vehicleModel or joaat(vehicleModel)
- local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
- networked = networked == nil and true or networked
-
- local playerCoords = GetEntityCoords(ESX.PlayerData.ped)
- if not vector or not playerCoords then
- return
- end
-
- local dist = #(playerCoords - vector)
- if dist > 424 then -- Onesync infinity Range (https://docs.fivem.net/docs/scripting-reference/onesync/)
- local executingResource = GetInvokingResource() or "Unknown"
- return print(
- ("[^1ERROR^7] Resource ^5%s^7 Tried to spawn vehicle on the client but the position is too far away (Out of onesync range)."):format(
- executingResource
- )
- )
- end
-
- CreateThread(function()
- ESX.Streaming.RequestModel(model)
-
- local vehicle = CreateVehicle(model, vector.xyz, heading, networked, true)
-
- if networked then
- local id = NetworkGetNetworkIdFromEntity(vehicle)
- SetNetworkIdCanMigrate(id, true)
- SetEntityAsMissionEntity(vehicle, true, true)
- end
- SetVehicleHasBeenOwnedByPlayer(vehicle, true)
- SetVehicleNeedsToBeHotwired(vehicle, false)
- SetModelAsNoLongerNeeded(model)
- SetVehRadioStation(vehicle, "OFF")
-
- RequestCollisionAtCoord(vector.xyz)
- while not HasCollisionLoadedAroundEntity(vehicle) do
- Wait(0)
- end
-
- if cb then
- cb(vehicle)
- end
- end)
+ local model = type(vehicleModel) == "number" and vehicleModel or joaat(vehicleModel)
+ local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
+ networked = networked == nil and true or networked
+
+ local playerCoords = GetEntityCoords(ESX.PlayerData.ped)
+ if not vector or not playerCoords then
+ return
+ end
+
+ local dist = #(playerCoords - vector)
+ if dist > 424 then -- Onesync infinity Range (https://docs.fivem.net/docs/scripting-reference/onesync/)
+ local executingResource = GetInvokingResource() or "Unknown"
+ return print(("[^1ERROR^7] Resource ^5%s^7 Tried to spawn vehicle on the client but the position is too far away (Out of onesync range)."):format(executingResource))
+ end
+
+ CreateThread(function()
+ ESX.Streaming.RequestModel(model)
+
+ local vehicle = CreateVehicle(model, vector.xyz, heading, networked, true)
+
+ if networked then
+ local id = NetworkGetNetworkIdFromEntity(vehicle)
+ SetNetworkIdCanMigrate(id, true)
+ SetEntityAsMissionEntity(vehicle, true, true)
+ end
+ SetVehicleHasBeenOwnedByPlayer(vehicle, true)
+ SetVehicleNeedsToBeHotwired(vehicle, false)
+ SetModelAsNoLongerNeeded(model)
+ SetVehRadioStation(vehicle, "OFF")
+
+ RequestCollisionAtCoord(vector.xyz)
+ while not HasCollisionLoadedAroundEntity(vehicle) do
+ Wait(0)
+ end
+
+ if cb then
+ cb(vehicle)
+ end
+ end)
end
function ESX.Game.SpawnLocalVehicle(vehicle, coords, heading, cb)
- ESX.Game.SpawnVehicle(vehicle, coords, heading, cb, false)
+ ESX.Game.SpawnVehicle(vehicle, coords, heading, cb, false)
end
function ESX.Game.IsVehicleEmpty(vehicle)
- local passengers = GetVehicleNumberOfPassengers(vehicle)
- local driverSeatFree = IsVehicleSeatFree(vehicle, -1)
+ local passengers = GetVehicleNumberOfPassengers(vehicle)
+ local driverSeatFree = IsVehicleSeatFree(vehicle, -1)
- return passengers == 0 and driverSeatFree
+ return passengers == 0 and driverSeatFree
end
function ESX.Game.GetObjects() -- Leave the function for compatibility
- return GetGamePool("CObject")
+ return GetGamePool("CObject")
end
function ESX.Game.GetPeds(onlyOtherPeds)
- local pool = GetGamePool("CPed")
-
- if onlyOtherPeds then
- local myPed = ESX.PlayerData.ped
- for i = 1, #pool do
- if pool[i] == myPed then
- table.remove(pool, i)
- break
- end
- end
- end
-
- return pool
+ local pool = GetGamePool("CPed")
+
+ if onlyOtherPeds then
+ local myPed = ESX.PlayerData.ped
+ for i = 1, #pool do
+ if pool[i] == myPed then
+ table.remove(pool, i)
+ break
+ end
+ end
+ end
+
+ return pool
end
function ESX.Game.GetVehicles() -- Leave the function for compatibility
- return GetGamePool("CVehicle")
+ return GetGamePool("CVehicle")
end
function ESX.Game.GetPlayers(onlyOtherPlayers, returnKeyValue, returnPeds)
- local players, myPlayer = {}, PlayerId()
- local active = GetActivePlayers()
-
- for i = 1, #active do
- local currentPlayer = active[i]
- local ped = GetPlayerPed(currentPlayer)
-
- if DoesEntityExist(ped) and ((onlyOtherPlayers and currentPlayer ~= myPlayer) or not onlyOtherPlayers) then
- if returnKeyValue then
- players[currentPlayer] = ped
- else
- players[#players + 1] = returnPeds and ped or currentPlayer
- end
- end
- end
-
- return players
+ local players, myPlayer = {}, PlayerId()
+ local active = GetActivePlayers()
+
+ for i = 1, #active do
+ local currentPlayer = active[i]
+ local ped = GetPlayerPed(currentPlayer)
+
+ if DoesEntityExist(ped) and ((onlyOtherPlayers and currentPlayer ~= myPlayer) or not onlyOtherPlayers) then
+ if returnKeyValue then
+ players[currentPlayer] = ped
+ else
+ players[#players + 1] = returnPeds and ped or currentPlayer
+ end
+ end
+ end
+
+ return players
end
function ESX.Game.GetClosestObject(coords, modelFilter)
- return ESX.Game.GetClosestEntity(ESX.Game.GetObjects(), false, coords, modelFilter)
+ return ESX.Game.GetClosestEntity(ESX.Game.GetObjects(), false, coords, modelFilter)
end
function ESX.Game.GetClosestPed(coords, modelFilter)
- return ESX.Game.GetClosestEntity(ESX.Game.GetPeds(true), false, coords, modelFilter)
+ return ESX.Game.GetClosestEntity(ESX.Game.GetPeds(true), false, coords, modelFilter)
end
function ESX.Game.GetClosestPlayer(coords)
- return ESX.Game.GetClosestEntity(ESX.Game.GetPlayers(true, true), true, coords, nil)
+ return ESX.Game.GetClosestEntity(ESX.Game.GetPlayers(true, true), true, coords, nil)
end
function ESX.Game.GetClosestVehicle(coords, modelFilter)
- return ESX.Game.GetClosestEntity(ESX.Game.GetVehicles(), false, coords, modelFilter)
+ return ESX.Game.GetClosestEntity(ESX.Game.GetVehicles(), false, coords, modelFilter)
end
local function EnumerateEntitiesWithinDistance(entities, isPlayerEntities, coords, maxDistance)
- local nearbyEntities = {}
+ local nearbyEntities = {}
- if coords then
- coords = vector3(coords.x, coords.y, coords.z)
- else
- local playerPed = ESX.PlayerData.ped
- coords = GetEntityCoords(playerPed)
- end
+ if coords then
+ coords = vector3(coords.x, coords.y, coords.z)
+ else
+ local playerPed = ESX.PlayerData.ped
+ coords = GetEntityCoords(playerPed)
+ end
- for k, entity in pairs(entities) do
- local distance = #(coords - GetEntityCoords(entity))
+ for k, entity in pairs(entities) do
+ local distance = #(coords - GetEntityCoords(entity))
- if distance <= maxDistance then
- nearbyEntities[#nearbyEntities + 1] = isPlayerEntities and k or entity
- end
- end
+ if distance <= maxDistance then
+ nearbyEntities[#nearbyEntities + 1] = isPlayerEntities and k or entity
+ end
+ end
- return nearbyEntities
+ return nearbyEntities
end
function ESX.Game.GetPlayersInArea(coords, maxDistance)
- return EnumerateEntitiesWithinDistance(ESX.Game.GetPlayers(true, true), true, coords, maxDistance)
+ return EnumerateEntitiesWithinDistance(ESX.Game.GetPlayers(true, true), true, coords, maxDistance)
end
function ESX.Game.GetVehiclesInArea(coords, maxDistance)
- return EnumerateEntitiesWithinDistance(ESX.Game.GetVehicles(), false, coords, maxDistance)
+ return EnumerateEntitiesWithinDistance(ESX.Game.GetVehicles(), false, coords, maxDistance)
end
function ESX.Game.IsSpawnPointClear(coords, maxDistance)
- return #ESX.Game.GetVehiclesInArea(coords, maxDistance) == 0
+ return #ESX.Game.GetVehiclesInArea(coords, maxDistance) == 0
end
function ESX.Game.GetClosestEntity(entities, isPlayerEntities, coords, modelFilter)
- local closestEntity, closestEntityDistance, filteredEntities = -1, -1, nil
-
- if coords then
- coords = vector3(coords.x, coords.y, coords.z)
- else
- local playerPed = ESX.PlayerData.ped
- coords = GetEntityCoords(playerPed)
- end
-
- if modelFilter then
- filteredEntities = {}
-
- for _, entity in pairs(entities) do
- if modelFilter[GetEntityModel(entity)] then
- filteredEntities[#filteredEntities + 1] = entity
- end
- end
- end
-
- for k, entity in pairs(filteredEntities or entities) do
- local distance = #(coords - GetEntityCoords(entity))
-
- if closestEntityDistance == -1 or distance < closestEntityDistance then
- closestEntity, closestEntityDistance = isPlayerEntities and k or entity, distance
- end
- end
-
- return closestEntity, closestEntityDistance
+ local closestEntity, closestEntityDistance, filteredEntities = -1, -1, nil
+
+ if coords then
+ coords = vector3(coords.x, coords.y, coords.z)
+ else
+ local playerPed = ESX.PlayerData.ped
+ coords = GetEntityCoords(playerPed)
+ end
+
+ if modelFilter then
+ filteredEntities = {}
+
+ for _, entity in pairs(entities) do
+ if modelFilter[GetEntityModel(entity)] then
+ filteredEntities[#filteredEntities + 1] = entity
+ end
+ end
+ end
+
+ for k, entity in pairs(filteredEntities or entities) do
+ local distance = #(coords - GetEntityCoords(entity))
+
+ if closestEntityDistance == -1 or distance < closestEntityDistance then
+ closestEntity, closestEntityDistance = isPlayerEntities and k or entity, distance
+ end
+ end
+
+ return closestEntity, closestEntityDistance
end
function ESX.Game.GetVehicleInDirection()
- local playerPed = ESX.PlayerData.ped
- local playerCoords = GetEntityCoords(playerPed)
- local inDirection = GetOffsetFromEntityInWorldCoords(playerPed, 0.0, 5.0, 0.0)
- local rayHandle = StartExpensiveSynchronousShapeTestLosProbe(playerCoords, inDirection, 10, playerPed, 0)
- local _, hit, _, _, entityHit = GetShapeTestResult(rayHandle)
-
- if hit == 1 and GetEntityType(entityHit) == 2 then
- local entityCoords = GetEntityCoords(entityHit)
- return entityHit, entityCoords
- end
-
- return nil
+ local playerPed = ESX.PlayerData.ped
+ local playerCoords = GetEntityCoords(playerPed)
+ local inDirection = GetOffsetFromEntityInWorldCoords(playerPed, 0.0, 5.0, 0.0)
+ local rayHandle = StartExpensiveSynchronousShapeTestLosProbe(playerCoords, inDirection, 10, playerPed, 0)
+ local _, hit, _, _, entityHit = GetShapeTestResult(rayHandle)
+
+ if hit == 1 and GetEntityType(entityHit) == 2 then
+ local entityCoords = GetEntityCoords(entityHit)
+ return entityHit, entityCoords
+ end
+
+ return nil
end
function ESX.Game.GetVehicleProperties(vehicle)
- if not DoesEntityExist(vehicle) then
- return
- end
-
- local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
- local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
- local hasCustomPrimaryColor = GetIsVehiclePrimaryColourCustom(vehicle)
- local dashboardColor = GetVehicleDashboardColor(vehicle)
- local interiorColor = GetVehicleInteriorColour(vehicle)
- local customPrimaryColor = nil
- if hasCustomPrimaryColor then
- customPrimaryColor = { GetVehicleCustomPrimaryColour(vehicle) }
- end
-
- local hasCustomXenonColor, customXenonColorR, customXenonColorG, customXenonColorB =
- GetVehicleXenonLightsCustomColor(vehicle)
- local customXenonColor = nil
- if hasCustomXenonColor then
- customXenonColor = { customXenonColorR, customXenonColorG, customXenonColorB }
- end
-
- local hasCustomSecondaryColor = GetIsVehicleSecondaryColourCustom(vehicle)
- local customSecondaryColor = nil
- if hasCustomSecondaryColor then
- customSecondaryColor = { GetVehicleCustomSecondaryColour(vehicle) }
- end
-
- local extras = {}
- for extraId = 0, 20 do
- if DoesExtraExist(vehicle, extraId) then
- extras[tostring(extraId)] = IsVehicleExtraTurnedOn(vehicle, extraId)
- end
- end
-
- local doorsBroken, windowsBroken, tyreBurst = {}, {}, {}
- local numWheels = tostring(GetVehicleNumberOfWheels(vehicle))
-
- local TyresIndex = { -- Wheel index list according to the number of vehicle wheels.
- ["2"] = { 0, 4 }, -- Bike and cycle.
- ["3"] = { 0, 1, 4, 5 }, -- Vehicle with 3 wheels (get for wheels because some 3 wheels vehicles have 2 wheels on front and one rear or the reverse).
- ["4"] = { 0, 1, 4, 5 }, -- Vehicle with 4 wheels.
- ["6"] = { 0, 1, 2, 3, 4, 5 }, -- Vehicle with 6 wheels.
- }
-
- if TyresIndex[numWheels] then
- for _, idx in pairs(TyresIndex[numWheels]) do
- tyreBurst[tostring(idx)] = IsVehicleTyreBurst(vehicle, idx, false)
- end
- end
-
- for windowId = 0, 7 do -- 13
- RollUpWindow(vehicle, windowId) --fix when you put the car away with the window down
- windowsBroken[tostring(windowId)] = not IsVehicleWindowIntact(vehicle, windowId)
- end
-
- local numDoors = GetNumberOfVehicleDoors(vehicle)
- if numDoors and numDoors > 0 then
- for doorsId = 0, numDoors do
- doorsBroken[tostring(doorsId)] = IsVehicleDoorDamaged(vehicle, doorsId)
- end
- end
-
- return {
- model = GetEntityModel(vehicle),
- doorsBroken = doorsBroken,
- windowsBroken = windowsBroken,
- tyreBurst = tyreBurst,
- tyresCanBurst = GetVehicleTyresCanBurst(vehicle),
- plate = ESX.Math.Trim(GetVehicleNumberPlateText(vehicle)),
- plateIndex = GetVehicleNumberPlateTextIndex(vehicle),
-
- bodyHealth = ESX.Math.Round(GetVehicleBodyHealth(vehicle), 1),
- engineHealth = ESX.Math.Round(GetVehicleEngineHealth(vehicle), 1),
- tankHealth = ESX.Math.Round(GetVehiclePetrolTankHealth(vehicle), 1),
-
- fuelLevel = ESX.Math.Round(GetVehicleFuelLevel(vehicle), 1),
- dirtLevel = ESX.Math.Round(GetVehicleDirtLevel(vehicle), 1),
- color1 = colorPrimary,
- color2 = colorSecondary,
- customPrimaryColor = customPrimaryColor,
- customSecondaryColor = customSecondaryColor,
-
- pearlescentColor = pearlescentColor,
- wheelColor = wheelColor,
-
- dashboardColor = dashboardColor,
- interiorColor = interiorColor,
-
- wheels = GetVehicleWheelType(vehicle),
- windowTint = GetVehicleWindowTint(vehicle),
- xenonColor = GetVehicleXenonLightsColor(vehicle),
- customXenonColor = customXenonColor,
-
- neonEnabled = {
- IsVehicleNeonLightEnabled(vehicle, 0),
- IsVehicleNeonLightEnabled(vehicle, 1),
- IsVehicleNeonLightEnabled(vehicle, 2),
- IsVehicleNeonLightEnabled(vehicle, 3),
- },
-
- neonColor = table.pack(GetVehicleNeonLightsColour(vehicle)),
- extras = extras,
- tyreSmokeColor = table.pack(GetVehicleTyreSmokeColor(vehicle)),
-
- modSpoilers = GetVehicleMod(vehicle, 0),
- modFrontBumper = GetVehicleMod(vehicle, 1),
- modRearBumper = GetVehicleMod(vehicle, 2),
- modSideSkirt = GetVehicleMod(vehicle, 3),
- modExhaust = GetVehicleMod(vehicle, 4),
- modFrame = GetVehicleMod(vehicle, 5),
- modGrille = GetVehicleMod(vehicle, 6),
- modHood = GetVehicleMod(vehicle, 7),
- modFender = GetVehicleMod(vehicle, 8),
- modRightFender = GetVehicleMod(vehicle, 9),
- modRoof = GetVehicleMod(vehicle, 10),
- modRoofLivery = GetVehicleRoofLivery(vehicle),
-
- modEngine = GetVehicleMod(vehicle, 11),
- modBrakes = GetVehicleMod(vehicle, 12),
- modTransmission = GetVehicleMod(vehicle, 13),
- modHorns = GetVehicleMod(vehicle, 14),
- modSuspension = GetVehicleMod(vehicle, 15),
- modArmor = GetVehicleMod(vehicle, 16),
-
- modTurbo = IsToggleModOn(vehicle, 18),
- modSmokeEnabled = IsToggleModOn(vehicle, 20),
- modXenon = IsToggleModOn(vehicle, 22),
-
- modFrontWheels = GetVehicleMod(vehicle, 23),
- modCustomFrontWheels = GetVehicleModVariation(vehicle, 23),
- modBackWheels = GetVehicleMod(vehicle, 24),
- modCustomBackWheels = GetVehicleModVariation(vehicle, 24),
-
- modPlateHolder = GetVehicleMod(vehicle, 25),
- modVanityPlate = GetVehicleMod(vehicle, 26),
- modTrimA = GetVehicleMod(vehicle, 27),
- modOrnaments = GetVehicleMod(vehicle, 28),
- modDashboard = GetVehicleMod(vehicle, 29),
- modDial = GetVehicleMod(vehicle, 30),
- modDoorSpeaker = GetVehicleMod(vehicle, 31),
- modSeats = GetVehicleMod(vehicle, 32),
- modSteeringWheel = GetVehicleMod(vehicle, 33),
- modShifterLeavers = GetVehicleMod(vehicle, 34),
- modAPlate = GetVehicleMod(vehicle, 35),
- modSpeakers = GetVehicleMod(vehicle, 36),
- modTrunk = GetVehicleMod(vehicle, 37),
- modHydrolic = GetVehicleMod(vehicle, 38),
- modEngineBlock = GetVehicleMod(vehicle, 39),
- modAirFilter = GetVehicleMod(vehicle, 40),
- modStruts = GetVehicleMod(vehicle, 41),
- modArchCover = GetVehicleMod(vehicle, 42),
- modAerials = GetVehicleMod(vehicle, 43),
- modTrimB = GetVehicleMod(vehicle, 44),
- modTank = GetVehicleMod(vehicle, 45),
- modWindows = GetVehicleMod(vehicle, 46),
- modLivery = GetVehicleMod(vehicle, 48) == -1 and GetVehicleLivery(vehicle) or GetVehicleMod(vehicle, 48),
- modLightbar = GetVehicleMod(vehicle, 49),
- }
+ if not DoesEntityExist(vehicle) then
+ return
+ end
+
+ local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
+ local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
+ local hasCustomPrimaryColor = GetIsVehiclePrimaryColourCustom(vehicle)
+ local dashboardColor = GetVehicleDashboardColor(vehicle)
+ local interiorColor = GetVehicleInteriorColour(vehicle)
+ local customPrimaryColor = nil
+ if hasCustomPrimaryColor then
+ customPrimaryColor = { GetVehicleCustomPrimaryColour(vehicle) }
+ end
+
+ local hasCustomXenonColor, customXenonColorR, customXenonColorG, customXenonColorB = GetVehicleXenonLightsCustomColor(vehicle)
+ local customXenonColor = nil
+ if hasCustomXenonColor then
+ customXenonColor = { customXenonColorR, customXenonColorG, customXenonColorB }
+ end
+
+ local hasCustomSecondaryColor = GetIsVehicleSecondaryColourCustom(vehicle)
+ local customSecondaryColor = nil
+ if hasCustomSecondaryColor then
+ customSecondaryColor = { GetVehicleCustomSecondaryColour(vehicle) }
+ end
+
+ local extras = {}
+ for extraId = 0, 20 do
+ if DoesExtraExist(vehicle, extraId) then
+ extras[tostring(extraId)] = IsVehicleExtraTurnedOn(vehicle, extraId)
+ end
+ end
+
+ local doorsBroken, windowsBroken, tyreBurst = {}, {}, {}
+ local numWheels = tostring(GetVehicleNumberOfWheels(vehicle))
+
+ local TyresIndex = { -- Wheel index list according to the number of vehicle wheels.
+ ["2"] = { 0, 4 }, -- Bike and cycle.
+ ["3"] = { 0, 1, 4, 5 }, -- Vehicle with 3 wheels (get for wheels because some 3 wheels vehicles have 2 wheels on front and one rear or the reverse).
+ ["4"] = { 0, 1, 4, 5 }, -- Vehicle with 4 wheels.
+ ["6"] = { 0, 1, 2, 3, 4, 5 }, -- Vehicle with 6 wheels.
+ }
+
+ if TyresIndex[numWheels] then
+ for _, idx in pairs(TyresIndex[numWheels]) do
+ tyreBurst[tostring(idx)] = IsVehicleTyreBurst(vehicle, idx, false)
+ end
+ end
+
+ for windowId = 0, 7 do -- 13
+ RollUpWindow(vehicle, windowId) --fix when you put the car away with the window down
+ windowsBroken[tostring(windowId)] = not IsVehicleWindowIntact(vehicle, windowId)
+ end
+
+ local numDoors = GetNumberOfVehicleDoors(vehicle)
+ if numDoors and numDoors > 0 then
+ for doorsId = 0, numDoors do
+ doorsBroken[tostring(doorsId)] = IsVehicleDoorDamaged(vehicle, doorsId)
+ end
+ end
+
+ return {
+ model = GetEntityModel(vehicle),
+ doorsBroken = doorsBroken,
+ windowsBroken = windowsBroken,
+ tyreBurst = tyreBurst,
+ tyresCanBurst = GetVehicleTyresCanBurst(vehicle),
+ plate = ESX.Math.Trim(GetVehicleNumberPlateText(vehicle)),
+ plateIndex = GetVehicleNumberPlateTextIndex(vehicle),
+
+ bodyHealth = ESX.Math.Round(GetVehicleBodyHealth(vehicle), 1),
+ engineHealth = ESX.Math.Round(GetVehicleEngineHealth(vehicle), 1),
+ tankHealth = ESX.Math.Round(GetVehiclePetrolTankHealth(vehicle), 1),
+
+ fuelLevel = ESX.Math.Round(GetVehicleFuelLevel(vehicle), 1),
+ dirtLevel = ESX.Math.Round(GetVehicleDirtLevel(vehicle), 1),
+ color1 = colorPrimary,
+ color2 = colorSecondary,
+ customPrimaryColor = customPrimaryColor,
+ customSecondaryColor = customSecondaryColor,
+
+ pearlescentColor = pearlescentColor,
+ wheelColor = wheelColor,
+
+ dashboardColor = dashboardColor,
+ interiorColor = interiorColor,
+
+ wheels = GetVehicleWheelType(vehicle),
+ windowTint = GetVehicleWindowTint(vehicle),
+ xenonColor = GetVehicleXenonLightsColor(vehicle),
+ customXenonColor = customXenonColor,
+
+ neonEnabled = { IsVehicleNeonLightEnabled(vehicle, 0), IsVehicleNeonLightEnabled(vehicle, 1), IsVehicleNeonLightEnabled(vehicle, 2), IsVehicleNeonLightEnabled(vehicle, 3) },
+
+ neonColor = table.pack(GetVehicleNeonLightsColour(vehicle)),
+ extras = extras,
+ tyreSmokeColor = table.pack(GetVehicleTyreSmokeColor(vehicle)),
+
+ modSpoilers = GetVehicleMod(vehicle, 0),
+ modFrontBumper = GetVehicleMod(vehicle, 1),
+ modRearBumper = GetVehicleMod(vehicle, 2),
+ modSideSkirt = GetVehicleMod(vehicle, 3),
+ modExhaust = GetVehicleMod(vehicle, 4),
+ modFrame = GetVehicleMod(vehicle, 5),
+ modGrille = GetVehicleMod(vehicle, 6),
+ modHood = GetVehicleMod(vehicle, 7),
+ modFender = GetVehicleMod(vehicle, 8),
+ modRightFender = GetVehicleMod(vehicle, 9),
+ modRoof = GetVehicleMod(vehicle, 10),
+ modRoofLivery = GetVehicleRoofLivery(vehicle),
+
+ modEngine = GetVehicleMod(vehicle, 11),
+ modBrakes = GetVehicleMod(vehicle, 12),
+ modTransmission = GetVehicleMod(vehicle, 13),
+ modHorns = GetVehicleMod(vehicle, 14),
+ modSuspension = GetVehicleMod(vehicle, 15),
+ modArmor = GetVehicleMod(vehicle, 16),
+
+ modTurbo = IsToggleModOn(vehicle, 18),
+ modSmokeEnabled = IsToggleModOn(vehicle, 20),
+ modXenon = IsToggleModOn(vehicle, 22),
+
+ modFrontWheels = GetVehicleMod(vehicle, 23),
+ modCustomFrontWheels = GetVehicleModVariation(vehicle, 23),
+ modBackWheels = GetVehicleMod(vehicle, 24),
+ modCustomBackWheels = GetVehicleModVariation(vehicle, 24),
+
+ modPlateHolder = GetVehicleMod(vehicle, 25),
+ modVanityPlate = GetVehicleMod(vehicle, 26),
+ modTrimA = GetVehicleMod(vehicle, 27),
+ modOrnaments = GetVehicleMod(vehicle, 28),
+ modDashboard = GetVehicleMod(vehicle, 29),
+ modDial = GetVehicleMod(vehicle, 30),
+ modDoorSpeaker = GetVehicleMod(vehicle, 31),
+ modSeats = GetVehicleMod(vehicle, 32),
+ modSteeringWheel = GetVehicleMod(vehicle, 33),
+ modShifterLeavers = GetVehicleMod(vehicle, 34),
+ modAPlate = GetVehicleMod(vehicle, 35),
+ modSpeakers = GetVehicleMod(vehicle, 36),
+ modTrunk = GetVehicleMod(vehicle, 37),
+ modHydrolic = GetVehicleMod(vehicle, 38),
+ modEngineBlock = GetVehicleMod(vehicle, 39),
+ modAirFilter = GetVehicleMod(vehicle, 40),
+ modStruts = GetVehicleMod(vehicle, 41),
+ modArchCover = GetVehicleMod(vehicle, 42),
+ modAerials = GetVehicleMod(vehicle, 43),
+ modTrimB = GetVehicleMod(vehicle, 44),
+ modTank = GetVehicleMod(vehicle, 45),
+ modWindows = GetVehicleMod(vehicle, 46),
+ modLivery = GetVehicleMod(vehicle, 48) == -1 and GetVehicleLivery(vehicle) or GetVehicleMod(vehicle, 48),
+ modLightbar = GetVehicleMod(vehicle, 49),
+ }
end
function ESX.Game.SetVehicleProperties(vehicle, props)
- if not DoesEntityExist(vehicle) then
- return
- end
- local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
- local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
- SetVehicleModKit(vehicle, 0)
-
- if props.tyresCanBurst ~= nil then
- SetVehicleTyresCanBurst(vehicle, props.tyresCanBurst)
- end
-
- if props.plate ~= nil then
- SetVehicleNumberPlateText(vehicle, props.plate)
- end
- if props.plateIndex ~= nil then
- SetVehicleNumberPlateTextIndex(vehicle, props.plateIndex)
- end
- if props.bodyHealth ~= nil then
- SetVehicleBodyHealth(vehicle, props.bodyHealth + 0.0)
- end
- if props.engineHealth ~= nil then
- SetVehicleEngineHealth(vehicle, props.engineHealth + 0.0)
- end
- if props.tankHealth ~= nil then
- SetVehiclePetrolTankHealth(vehicle, props.tankHealth + 0.0)
- end
- if props.fuelLevel ~= nil then
- SetVehicleFuelLevel(vehicle, props.fuelLevel + 0.0)
- end
- if props.dirtLevel ~= nil then
- SetVehicleDirtLevel(vehicle, props.dirtLevel + 0.0)
- end
- if props.customPrimaryColor ~= nil then
- SetVehicleCustomPrimaryColour(
- vehicle,
- props.customPrimaryColor[1],
- props.customPrimaryColor[2],
- props.customPrimaryColor[3]
- )
- end
- if props.customSecondaryColor ~= nil then
- SetVehicleCustomSecondaryColour(
- vehicle,
- props.customSecondaryColor[1],
- props.customSecondaryColor[2],
- props.customSecondaryColor[3]
- )
- end
- if props.color1 ~= nil then
- SetVehicleColours(vehicle, props.color1, colorSecondary)
- end
- if props.color2 ~= nil then
- SetVehicleColours(vehicle, props.color1 or colorPrimary, props.color2)
- end
- if props.pearlescentColor ~= nil then
- SetVehicleExtraColours(vehicle, props.pearlescentColor, wheelColor)
- end
-
- if props.interiorColor ~= nil then
- SetVehicleInteriorColor(vehicle, props.interiorColor)
- end
-
- if props.dashboardColor ~= nil then
- SetVehicleDashboardColor(vehicle, props.dashboardColor)
- end
-
- if props.wheelColor ~= nil then
- SetVehicleExtraColours(vehicle, props.pearlescentColor or pearlescentColor, props.wheelColor)
- end
- if props.wheels ~= nil then
- SetVehicleWheelType(vehicle, props.wheels)
- end
- if props.windowTint ~= nil then
- SetVehicleWindowTint(vehicle, props.windowTint)
- end
-
- if props.neonEnabled ~= nil then
- SetVehicleNeonLightEnabled(vehicle, 0, props.neonEnabled[1])
- SetVehicleNeonLightEnabled(vehicle, 1, props.neonEnabled[2])
- SetVehicleNeonLightEnabled(vehicle, 2, props.neonEnabled[3])
- SetVehicleNeonLightEnabled(vehicle, 3, props.neonEnabled[4])
- end
-
- if props.extras ~= nil then
- for extraId, enabled in pairs(props.extras) do
- SetVehicleExtra(vehicle, tonumber(extraId), enabled and 0 or 1)
- end
- end
-
- if props.neonColor ~= nil then
- SetVehicleNeonLightsColour(vehicle, props.neonColor[1], props.neonColor[2], props.neonColor[3])
- end
- if props.xenonColor ~= nil then
- SetVehicleXenonLightsColor(vehicle, props.xenonColor)
- end
- if props.customXenonColor ~= nil then
- SetVehicleXenonLightsCustomColor(
- vehicle,
- props.customXenonColor[1],
- props.customXenonColor[2],
- props.customXenonColor[3]
- )
- end
- if props.modSmokeEnabled ~= nil then
- ToggleVehicleMod(vehicle, 20, true)
- end
- if props.tyreSmokeColor ~= nil then
- SetVehicleTyreSmokeColor(vehicle, props.tyreSmokeColor[1], props.tyreSmokeColor[2], props.tyreSmokeColor[3])
- end
- if props.modSpoilers ~= nil then
- SetVehicleMod(vehicle, 0, props.modSpoilers, false)
- end
- if props.modFrontBumper ~= nil then
- SetVehicleMod(vehicle, 1, props.modFrontBumper, false)
- end
- if props.modRearBumper ~= nil then
- SetVehicleMod(vehicle, 2, props.modRearBumper, false)
- end
- if props.modSideSkirt ~= nil then
- SetVehicleMod(vehicle, 3, props.modSideSkirt, false)
- end
- if props.modExhaust ~= nil then
- SetVehicleMod(vehicle, 4, props.modExhaust, false)
- end
- if props.modFrame ~= nil then
- SetVehicleMod(vehicle, 5, props.modFrame, false)
- end
- if props.modGrille ~= nil then
- SetVehicleMod(vehicle, 6, props.modGrille, false)
- end
- if props.modHood ~= nil then
- SetVehicleMod(vehicle, 7, props.modHood, false)
- end
- if props.modFender ~= nil then
- SetVehicleMod(vehicle, 8, props.modFender, false)
- end
- if props.modRightFender ~= nil then
- SetVehicleMod(vehicle, 9, props.modRightFender, false)
- end
- if props.modRoof ~= nil then
- SetVehicleMod(vehicle, 10, props.modRoof, false)
- end
-
- if props.modRoofLivery ~= nil then
- SetVehicleRoofLivery(vehicle, props.modRoofLivery)
- end
-
- if props.modEngine ~= nil then
- SetVehicleMod(vehicle, 11, props.modEngine, false)
- end
- if props.modBrakes ~= nil then
- SetVehicleMod(vehicle, 12, props.modBrakes, false)
- end
- if props.modTransmission ~= nil then
- SetVehicleMod(vehicle, 13, props.modTransmission, false)
- end
- if props.modHorns ~= nil then
- SetVehicleMod(vehicle, 14, props.modHorns, false)
- end
- if props.modSuspension ~= nil then
- SetVehicleMod(vehicle, 15, props.modSuspension, false)
- end
- if props.modArmor ~= nil then
- SetVehicleMod(vehicle, 16, props.modArmor, false)
- end
- if props.modTurbo ~= nil then
- ToggleVehicleMod(vehicle, 18, props.modTurbo)
- end
- if props.modXenon ~= nil then
- ToggleVehicleMod(vehicle, 22, props.modXenon)
- end
- if props.modFrontWheels ~= nil then
- SetVehicleMod(vehicle, 23, props.modFrontWheels, props.modCustomFrontWheels)
- end
- if props.modBackWheels ~= nil then
- SetVehicleMod(vehicle, 24, props.modBackWheels, props.modCustomBackWheels)
- end
- if props.modPlateHolder ~= nil then
- SetVehicleMod(vehicle, 25, props.modPlateHolder, false)
- end
- if props.modVanityPlate ~= nil then
- SetVehicleMod(vehicle, 26, props.modVanityPlate, false)
- end
- if props.modTrimA ~= nil then
- SetVehicleMod(vehicle, 27, props.modTrimA, false)
- end
- if props.modOrnaments ~= nil then
- SetVehicleMod(vehicle, 28, props.modOrnaments, false)
- end
- if props.modDashboard ~= nil then
- SetVehicleMod(vehicle, 29, props.modDashboard, false)
- end
- if props.modDial ~= nil then
- SetVehicleMod(vehicle, 30, props.modDial, false)
- end
- if props.modDoorSpeaker ~= nil then
- SetVehicleMod(vehicle, 31, props.modDoorSpeaker, false)
- end
- if props.modSeats ~= nil then
- SetVehicleMod(vehicle, 32, props.modSeats, false)
- end
- if props.modSteeringWheel ~= nil then
- SetVehicleMod(vehicle, 33, props.modSteeringWheel, false)
- end
- if props.modShifterLeavers ~= nil then
- SetVehicleMod(vehicle, 34, props.modShifterLeavers, false)
- end
- if props.modAPlate ~= nil then
- SetVehicleMod(vehicle, 35, props.modAPlate, false)
- end
- if props.modSpeakers ~= nil then
- SetVehicleMod(vehicle, 36, props.modSpeakers, false)
- end
- if props.modTrunk ~= nil then
- SetVehicleMod(vehicle, 37, props.modTrunk, false)
- end
- if props.modHydrolic ~= nil then
- SetVehicleMod(vehicle, 38, props.modHydrolic, false)
- end
- if props.modEngineBlock ~= nil then
- SetVehicleMod(vehicle, 39, props.modEngineBlock, false)
- end
- if props.modAirFilter ~= nil then
- SetVehicleMod(vehicle, 40, props.modAirFilter, false)
- end
- if props.modStruts ~= nil then
- SetVehicleMod(vehicle, 41, props.modStruts, false)
- end
- if props.modArchCover ~= nil then
- SetVehicleMod(vehicle, 42, props.modArchCover, false)
- end
- if props.modAerials ~= nil then
- SetVehicleMod(vehicle, 43, props.modAerials, false)
- end
- if props.modTrimB ~= nil then
- SetVehicleMod(vehicle, 44, props.modTrimB, false)
- end
- if props.modTank ~= nil then
- SetVehicleMod(vehicle, 45, props.modTank, false)
- end
- if props.modWindows ~= nil then
- SetVehicleMod(vehicle, 46, props.modWindows, false)
- end
-
- if props.modLivery ~= nil then
- SetVehicleMod(vehicle, 48, props.modLivery, false)
- SetVehicleLivery(vehicle, props.modLivery)
- end
-
- if props.windowsBroken ~= nil then
- for k, v in pairs(props.windowsBroken) do
- if v then
- RemoveVehicleWindow(vehicle, tonumber(k))
- end
- end
- end
-
- if props.doorsBroken ~= nil then
- for k, v in pairs(props.doorsBroken) do
- if v then
- SetVehicleDoorBroken(vehicle, tonumber(k), true)
- end
- end
- end
-
- if props.tyreBurst ~= nil then
- for k, v in pairs(props.tyreBurst) do
- if v then
- SetVehicleTyreBurst(vehicle, tonumber(k), true, 1000.0)
- end
- end
- end
+ if not DoesEntityExist(vehicle) then
+ return
+ end
+ local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
+ local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
+ SetVehicleModKit(vehicle, 0)
+
+ if props.tyresCanBurst ~= nil then
+ SetVehicleTyresCanBurst(vehicle, props.tyresCanBurst)
+ end
+
+ if props.plate ~= nil then
+ SetVehicleNumberPlateText(vehicle, props.plate)
+ end
+ if props.plateIndex ~= nil then
+ SetVehicleNumberPlateTextIndex(vehicle, props.plateIndex)
+ end
+ if props.bodyHealth ~= nil then
+ SetVehicleBodyHealth(vehicle, props.bodyHealth + 0.0)
+ end
+ if props.engineHealth ~= nil then
+ SetVehicleEngineHealth(vehicle, props.engineHealth + 0.0)
+ end
+ if props.tankHealth ~= nil then
+ SetVehiclePetrolTankHealth(vehicle, props.tankHealth + 0.0)
+ end
+ if props.fuelLevel ~= nil then
+ SetVehicleFuelLevel(vehicle, props.fuelLevel + 0.0)
+ end
+ if props.dirtLevel ~= nil then
+ SetVehicleDirtLevel(vehicle, props.dirtLevel + 0.0)
+ end
+ if props.customPrimaryColor ~= nil then
+ SetVehicleCustomPrimaryColour(vehicle, props.customPrimaryColor[1], props.customPrimaryColor[2], props.customPrimaryColor[3])
+ end
+ if props.customSecondaryColor ~= nil then
+ SetVehicleCustomSecondaryColour(vehicle, props.customSecondaryColor[1], props.customSecondaryColor[2], props.customSecondaryColor[3])
+ end
+ if props.color1 ~= nil then
+ SetVehicleColours(vehicle, props.color1, colorSecondary)
+ end
+ if props.color2 ~= nil then
+ SetVehicleColours(vehicle, props.color1 or colorPrimary, props.color2)
+ end
+ if props.pearlescentColor ~= nil then
+ SetVehicleExtraColours(vehicle, props.pearlescentColor, wheelColor)
+ end
+
+ if props.interiorColor ~= nil then
+ SetVehicleInteriorColor(vehicle, props.interiorColor)
+ end
+
+ if props.dashboardColor ~= nil then
+ SetVehicleDashboardColor(vehicle, props.dashboardColor)
+ end
+
+ if props.wheelColor ~= nil then
+ SetVehicleExtraColours(vehicle, props.pearlescentColor or pearlescentColor, props.wheelColor)
+ end
+ if props.wheels ~= nil then
+ SetVehicleWheelType(vehicle, props.wheels)
+ end
+ if props.windowTint ~= nil then
+ SetVehicleWindowTint(vehicle, props.windowTint)
+ end
+
+ if props.neonEnabled ~= nil then
+ SetVehicleNeonLightEnabled(vehicle, 0, props.neonEnabled[1])
+ SetVehicleNeonLightEnabled(vehicle, 1, props.neonEnabled[2])
+ SetVehicleNeonLightEnabled(vehicle, 2, props.neonEnabled[3])
+ SetVehicleNeonLightEnabled(vehicle, 3, props.neonEnabled[4])
+ end
+
+ if props.extras ~= nil then
+ for extraId, enabled in pairs(props.extras) do
+ SetVehicleExtra(vehicle, tonumber(extraId), enabled and 0 or 1)
+ end
+ end
+
+ if props.neonColor ~= nil then
+ SetVehicleNeonLightsColour(vehicle, props.neonColor[1], props.neonColor[2], props.neonColor[3])
+ end
+ if props.xenonColor ~= nil then
+ SetVehicleXenonLightsColor(vehicle, props.xenonColor)
+ end
+ if props.customXenonColor ~= nil then
+ SetVehicleXenonLightsCustomColor(vehicle, props.customXenonColor[1], props.customXenonColor[2], props.customXenonColor[3])
+ end
+ if props.modSmokeEnabled ~= nil then
+ ToggleVehicleMod(vehicle, 20, true)
+ end
+ if props.tyreSmokeColor ~= nil then
+ SetVehicleTyreSmokeColor(vehicle, props.tyreSmokeColor[1], props.tyreSmokeColor[2], props.tyreSmokeColor[3])
+ end
+ if props.modSpoilers ~= nil then
+ SetVehicleMod(vehicle, 0, props.modSpoilers, false)
+ end
+ if props.modFrontBumper ~= nil then
+ SetVehicleMod(vehicle, 1, props.modFrontBumper, false)
+ end
+ if props.modRearBumper ~= nil then
+ SetVehicleMod(vehicle, 2, props.modRearBumper, false)
+ end
+ if props.modSideSkirt ~= nil then
+ SetVehicleMod(vehicle, 3, props.modSideSkirt, false)
+ end
+ if props.modExhaust ~= nil then
+ SetVehicleMod(vehicle, 4, props.modExhaust, false)
+ end
+ if props.modFrame ~= nil then
+ SetVehicleMod(vehicle, 5, props.modFrame, false)
+ end
+ if props.modGrille ~= nil then
+ SetVehicleMod(vehicle, 6, props.modGrille, false)
+ end
+ if props.modHood ~= nil then
+ SetVehicleMod(vehicle, 7, props.modHood, false)
+ end
+ if props.modFender ~= nil then
+ SetVehicleMod(vehicle, 8, props.modFender, false)
+ end
+ if props.modRightFender ~= nil then
+ SetVehicleMod(vehicle, 9, props.modRightFender, false)
+ end
+ if props.modRoof ~= nil then
+ SetVehicleMod(vehicle, 10, props.modRoof, false)
+ end
+
+ if props.modRoofLivery ~= nil then
+ SetVehicleRoofLivery(vehicle, props.modRoofLivery)
+ end
+
+ if props.modEngine ~= nil then
+ SetVehicleMod(vehicle, 11, props.modEngine, false)
+ end
+ if props.modBrakes ~= nil then
+ SetVehicleMod(vehicle, 12, props.modBrakes, false)
+ end
+ if props.modTransmission ~= nil then
+ SetVehicleMod(vehicle, 13, props.modTransmission, false)
+ end
+ if props.modHorns ~= nil then
+ SetVehicleMod(vehicle, 14, props.modHorns, false)
+ end
+ if props.modSuspension ~= nil then
+ SetVehicleMod(vehicle, 15, props.modSuspension, false)
+ end
+ if props.modArmor ~= nil then
+ SetVehicleMod(vehicle, 16, props.modArmor, false)
+ end
+ if props.modTurbo ~= nil then
+ ToggleVehicleMod(vehicle, 18, props.modTurbo)
+ end
+ if props.modXenon ~= nil then
+ ToggleVehicleMod(vehicle, 22, props.modXenon)
+ end
+ if props.modFrontWheels ~= nil then
+ SetVehicleMod(vehicle, 23, props.modFrontWheels, props.modCustomFrontWheels)
+ end
+ if props.modBackWheels ~= nil then
+ SetVehicleMod(vehicle, 24, props.modBackWheels, props.modCustomBackWheels)
+ end
+ if props.modPlateHolder ~= nil then
+ SetVehicleMod(vehicle, 25, props.modPlateHolder, false)
+ end
+ if props.modVanityPlate ~= nil then
+ SetVehicleMod(vehicle, 26, props.modVanityPlate, false)
+ end
+ if props.modTrimA ~= nil then
+ SetVehicleMod(vehicle, 27, props.modTrimA, false)
+ end
+ if props.modOrnaments ~= nil then
+ SetVehicleMod(vehicle, 28, props.modOrnaments, false)
+ end
+ if props.modDashboard ~= nil then
+ SetVehicleMod(vehicle, 29, props.modDashboard, false)
+ end
+ if props.modDial ~= nil then
+ SetVehicleMod(vehicle, 30, props.modDial, false)
+ end
+ if props.modDoorSpeaker ~= nil then
+ SetVehicleMod(vehicle, 31, props.modDoorSpeaker, false)
+ end
+ if props.modSeats ~= nil then
+ SetVehicleMod(vehicle, 32, props.modSeats, false)
+ end
+ if props.modSteeringWheel ~= nil then
+ SetVehicleMod(vehicle, 33, props.modSteeringWheel, false)
+ end
+ if props.modShifterLeavers ~= nil then
+ SetVehicleMod(vehicle, 34, props.modShifterLeavers, false)
+ end
+ if props.modAPlate ~= nil then
+ SetVehicleMod(vehicle, 35, props.modAPlate, false)
+ end
+ if props.modSpeakers ~= nil then
+ SetVehicleMod(vehicle, 36, props.modSpeakers, false)
+ end
+ if props.modTrunk ~= nil then
+ SetVehicleMod(vehicle, 37, props.modTrunk, false)
+ end
+ if props.modHydrolic ~= nil then
+ SetVehicleMod(vehicle, 38, props.modHydrolic, false)
+ end
+ if props.modEngineBlock ~= nil then
+ SetVehicleMod(vehicle, 39, props.modEngineBlock, false)
+ end
+ if props.modAirFilter ~= nil then
+ SetVehicleMod(vehicle, 40, props.modAirFilter, false)
+ end
+ if props.modStruts ~= nil then
+ SetVehicleMod(vehicle, 41, props.modStruts, false)
+ end
+ if props.modArchCover ~= nil then
+ SetVehicleMod(vehicle, 42, props.modArchCover, false)
+ end
+ if props.modAerials ~= nil then
+ SetVehicleMod(vehicle, 43, props.modAerials, false)
+ end
+ if props.modTrimB ~= nil then
+ SetVehicleMod(vehicle, 44, props.modTrimB, false)
+ end
+ if props.modTank ~= nil then
+ SetVehicleMod(vehicle, 45, props.modTank, false)
+ end
+ if props.modWindows ~= nil then
+ SetVehicleMod(vehicle, 46, props.modWindows, false)
+ end
+
+ if props.modLivery ~= nil then
+ SetVehicleMod(vehicle, 48, props.modLivery, false)
+ SetVehicleLivery(vehicle, props.modLivery)
+ end
+
+ if props.windowsBroken ~= nil then
+ for k, v in pairs(props.windowsBroken) do
+ if v then
+ RemoveVehicleWindow(vehicle, tonumber(k))
+ end
+ end
+ end
+
+ if props.doorsBroken ~= nil then
+ for k, v in pairs(props.doorsBroken) do
+ if v then
+ SetVehicleDoorBroken(vehicle, tonumber(k), true)
+ end
+ end
+ end
+
+ if props.tyreBurst ~= nil then
+ for k, v in pairs(props.tyreBurst) do
+ if v then
+ SetVehicleTyreBurst(vehicle, tonumber(k), true, 1000.0)
+ end
+ end
+ end
end
function ESX.Game.Utils.DrawText3D(coords, text, size, font)
- local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
-
- local camCoords = GetFinalRenderedCamCoord()
- local distance = #(vector - camCoords)
-
- size = size or 1
- font = font or 0
-
- local scale = (size / distance) * 2
- local fov = (1 / GetGameplayCamFov()) * 100
- scale = scale * fov
-
- SetTextScale(0.0, 0.55 * scale)
- SetTextFont(font)
- SetTextProportional(1)
- SetTextColour(255, 255, 255, 215)
- BeginTextCommandDisplayText("STRING")
- SetTextCentre(true)
- AddTextComponentSubstringPlayerName(text)
- SetDrawOrigin(vector.xyz, 0)
- EndTextCommandDisplayText(0.0, 0.0)
- ClearDrawOrigin()
+ local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
+
+ local camCoords = GetFinalRenderedCamCoord()
+ local distance = #(vector - camCoords)
+
+ size = size or 1
+ font = font or 0
+
+ local scale = (size / distance) * 2
+ local fov = (1 / GetGameplayCamFov()) * 100
+ scale = scale * fov
+
+ SetTextScale(0.0, 0.55 * scale)
+ SetTextFont(font)
+ SetTextProportional(1)
+ SetTextColour(255, 255, 255, 215)
+ BeginTextCommandDisplayText("STRING")
+ SetTextCentre(true)
+ AddTextComponentSubstringPlayerName(text)
+ SetDrawOrigin(vector.xyz, 0)
+ EndTextCommandDisplayText(0.0, 0.0)
+ ClearDrawOrigin()
end
---@param account string Account name (money/bank/black_money)
---@return table|nil
function ESX.GetAccount(account)
- for i = 1, #ESX.PlayerData.accounts, 1 do
- if ESX.PlayerData.accounts[i].name == account then
- return ESX.PlayerData.accounts[i]
- end
- end
- return nil
+ for i = 1, #ESX.PlayerData.accounts, 1 do
+ if ESX.PlayerData.accounts[i].name == account then
+ return ESX.PlayerData.accounts[i]
+ end
+ end
+ return nil
end
function ESX.ShowInventory()
- if not Config.EnableDefaultInventory then
- return
- end
-
- local playerPed = ESX.PlayerData.ped
- local elements = {
- { unselectable = true, icon = "fas fa-box" },
- }
- local currentWeight = 0
-
- for i = 1, #ESX.PlayerData.accounts do
- if ESX.PlayerData.accounts[i].money > 0 then
- local formattedMoney =
- TranslateCap("locale_currency", ESX.Math.GroupDigits(ESX.PlayerData.accounts[i].money))
- local canDrop = ESX.PlayerData.accounts[i].name ~= "bank"
-
- elements[#elements + 1] = {
- icon = "fas fa-money-bill-wave",
- title = ('%s: %s'):format(
- ESX.PlayerData.accounts[i].label,
- formattedMoney
- ),
- count = ESX.PlayerData.accounts[i].money,
- type = "item_account",
- value = ESX.PlayerData.accounts[i].name,
- usable = false,
- rare = false,
- canRemove = canDrop,
- }
- end
- end
-
- for i = 1, #ESX.PlayerData.inventory do
- local v = ESX.PlayerData.inventory[i]
- if v.count > 0 then
- currentWeight = currentWeight + (v.weight * v.count)
-
- elements[#elements + 1] = {
- icon = "fas fa-box",
- title = ("%s x%s"):format(v.label, v.count),
- count = v.count,
- type = "item_standard",
- value = v.name,
- usable = v.usable,
- rare = v.rare,
- canRemove = v.canRemove,
- }
- end
- end
-
- elements[1].title = TranslateCap("inventory", currentWeight, Config.MaxWeight)
-
- for i = 1, #Config.Weapons do
- local v = Config.Weapons[i]
- local weaponHash = joaat(v.name)
-
- if HasPedGotWeapon(playerPed, weaponHash, false) then
- local ammo = GetAmmoInPedWeapon(playerPed, weaponHash)
-
- elements[#elements + 1] = {
- icon = "fas fa-gun",
- title = v.ammo and ("%s - %s %s"):format(v.label, ammo, v.ammo.label) or v.label,
- count = 1,
- type = "item_weapon",
- value = v.name,
- usable = false,
- rare = false,
- ammo = ammo,
- canGiveAmmo = (v.ammo ~= nil),
- canRemove = true,
- }
- end
- end
-
- ESX.CloseContext()
-
- ESX.OpenContext("right", elements, function(_, element)
- local player, distance = ESX.Game.GetClosestPlayer()
-
- local elements2 = {}
-
- if element.usable then
- elements2[#elements2 + 1] = {
- icon = "fas fa-utensils",
- title = TranslateCap("use"),
- action = "use",
- type = element.type,
- value = element.value,
- }
- end
-
- if element.canRemove then
- if player ~= -1 and distance <= 3.0 then
- elements2[#elements2 + 1] = {
- icon = "fas fa-hands",
- title = TranslateCap("give"),
- action = "give",
- type = element.type,
- value = element.value,
- }
- end
-
- elements2[#elements2 + 1] = {
- icon = "fas fa-trash",
- title = TranslateCap("remove"),
- action = "remove",
- type = element.type,
- value = element.value,
- }
- end
-
- if
- element.type == "item_weapon"
- and element.canGiveAmmo
- and element.ammo > 0
- and player ~= -1
- and distance <= 3.0
- then
- elements2[#elements2 + 1] = {
- icon = "fas fa-gun",
- title = TranslateCap("giveammo"),
- action = "give_ammo",
- type = element.type,
- value = element.value,
- }
- end
-
- elements2[#elements2 + 1] = {
- icon = "fas fa-arrow-left",
- title = TranslateCap("return"),
- action = "return",
- }
-
- ESX.OpenContext("right", elements2, function(_, element2)
- local item, itemType = element2.value, element2.type
-
- if element2.action == "give" then
- local playersNearby = ESX.Game.GetPlayersInArea(GetEntityCoords(playerPed), 3.0)
-
- if #playersNearby > 0 then
- local players = {}
- local elements3 = {
- { unselectable = true, icon = "fas fa-users", title = "Nearby Players" },
- }
-
- for _, playerNearby in ipairs(playersNearby) do
- players[GetPlayerServerId(playerNearby)] = true
- end
-
- ESX.TriggerServerCallback("esx:getPlayerNames", function(returnedPlayers)
- for playerId, playerName in pairs(returnedPlayers) do
- elements3[#elements3 + 1] = {
- icon = "fas fa-user",
- title = playerName,
- playerId = playerId,
- }
- end
-
- ESX.OpenContext("right", elements3, function(_, element3)
- local selectedPlayer, selectedPlayerId =
- GetPlayerFromServerId(element3.playerId), element3.playerId
- playersNearby = ESX.Game.GetPlayersInArea(GetEntityCoords(playerPed), 3.0)
- playersNearby = ESX.Table.Set(playersNearby)
-
- if playersNearby[selectedPlayer] then
- local selectedPlayerPed = GetPlayerPed(selectedPlayer)
-
- if IsPedOnFoot(selectedPlayerPed) and not IsPedFalling(selectedPlayerPed) then
- if itemType == "item_weapon" then
- TriggerServerEvent(
- "esx:giveInventoryItem",
- selectedPlayerId,
- itemType,
- item,
- nil
- )
- ESX.CloseContext()
- else
- local elementsG = {
- { unselectable = true, icon = "fas fa-trash", title = element.title },
- {
- icon = "fas fa-tally",
- title = "Amount.",
- input = true,
- inputType = "number",
- inputPlaceholder = "Amount to give..",
- inputMin = 1,
- inputMax = 1000,
- },
- { icon = "fas fa-check-double", title = "Confirm", val = "confirm" },
- }
-
- ESX.OpenContext("right", elementsG, function(menuG, _)
- local quantity = tonumber(menuG.eles[2].inputValue)
-
- if quantity and quantity > 0 and element.count >= quantity then
- TriggerServerEvent(
- "esx:giveInventoryItem",
- selectedPlayerId,
- itemType,
- item,
- quantity
- )
- ESX.CloseContext()
- else
- ESX.ShowNotification(TranslateCap("amount_invalid"))
- end
- end)
- end
- else
- ESX.ShowNotification(TranslateCap("in_vehicle"))
- end
- else
- ESX.ShowNotification(TranslateCap("players_nearby"))
- ESX.CloseContext()
- end
- end)
- end, players)
- end
- elseif element2.action == "remove" then
- if IsPedOnFoot(playerPed) and not IsPedFalling(playerPed) then
- local dict, anim = "weapons@first_person@aim_rng@generic@projectile@sticky_bomb@", "plant_floor"
- ESX.Streaming.RequestAnimDict(dict)
-
- if itemType == "item_weapon" then
- ESX.CloseContext()
- TaskPlayAnim(playerPed, dict, anim, 8.0, 1.0, 1000, 16, 0.0, false, false, false)
- RemoveAnimDict(dict)
- Wait(1000)
- TriggerServerEvent("esx:removeInventoryItem", itemType, item)
- else
- local elementsR = {
- { unselectable = true, icon = "fas fa-trash", title = element.title },
- {
- icon = "fas fa-tally",
- title = "Amount.",
- input = true,
- inputType = "number",
- inputPlaceholder = "Amount to remove..",
- inputMin = 1,
- inputMax = 1000,
- },
- { icon = "fas fa-check-double", title = "Confirm", val = "confirm" },
- }
-
- ESX.OpenContext("right", elementsR, function(menuR, _)
- local quantity = tonumber(menuR.eles[2].inputValue)
-
- if quantity and quantity > 0 and element.count >= quantity then
- ESX.CloseContext()
- TaskPlayAnim(playerPed, dict, anim, 8.0, 1.0, 1000, 16, 0.0, false, false, false)
- RemoveAnimDict(dict)
- Wait(1000)
- TriggerServerEvent("esx:removeInventoryItem", itemType, item, quantity)
- else
- ESX.ShowNotification(TranslateCap("amount_invalid"))
- end
- end)
- end
- end
- elseif element2.action == "use" then
- ESX.CloseContext()
- TriggerServerEvent("esx:useItem", item)
- elseif element2.action == "return" then
- ESX.CloseContext()
- ESX.ShowInventory()
- elseif element2.action == "give_ammo" then
- local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
- local closestPed = GetPlayerPed(closestPlayer)
- local pedAmmo = GetAmmoInPedWeapon(playerPed, joaat(item))
-
- if IsPedOnFoot(closestPed) and not IsPedFalling(closestPed) then
- if closestPlayer ~= -1 and closestDistance < 3.0 then
- if pedAmmo > 0 then
- local elementsGA = {
- { unselectable = true, icon = "fas fa-trash", title = element.title },
- {
- icon = "fas fa-tally",
- title = "Amount.",
- input = true,
- inputType = "number",
- inputPlaceholder = "Amount to give..",
- inputMin = 1,
- inputMax = 1000,
- },
- { icon = "fas fa-check-double", title = "Confirm", val = "confirm" },
- }
-
- ESX.OpenContext("right", elementsGA, function(menuGA, _)
- local quantity = tonumber(menuGA.eles[2].inputValue)
-
- if quantity and quantity > 0 then
- if pedAmmo >= quantity then
- TriggerServerEvent(
- "esx:giveInventoryItem",
- GetPlayerServerId(closestPlayer),
- "item_ammo",
- item,
- quantity
- )
- ESX.CloseContext()
- else
- ESX.ShowNotification(TranslateCap("noammo"))
- end
- else
- ESX.ShowNotification(TranslateCap("amount_invalid"))
- end
- end)
- else
- ESX.ShowNotification(TranslateCap("noammo"))
- end
- else
- ESX.ShowNotification(TranslateCap("players_nearby"))
- end
- else
- ESX.ShowNotification(TranslateCap("in_vehicle"))
- end
- end
- end)
- end)
+ if not Config.EnableDefaultInventory then
+ return
+ end
+
+ local playerPed = ESX.PlayerData.ped
+ local elements = {
+ { unselectable = true, icon = "fas fa-box" },
+ }
+ local currentWeight = 0
+
+ for i = 1, #ESX.PlayerData.accounts do
+ if ESX.PlayerData.accounts[i].money > 0 then
+ local formattedMoney = TranslateCap("locale_currency", ESX.Math.GroupDigits(ESX.PlayerData.accounts[i].money))
+ local canDrop = ESX.PlayerData.accounts[i].name ~= "bank"
+
+ elements[#elements + 1] = {
+ icon = "fas fa-money-bill-wave",
+ title = ('%s: %s'):format(ESX.PlayerData.accounts[i].label, formattedMoney),
+ count = ESX.PlayerData.accounts[i].money,
+ type = "item_account",
+ value = ESX.PlayerData.accounts[i].name,
+ usable = false,
+ rare = false,
+ canRemove = canDrop,
+ }
+ end
+ end
+
+ for i = 1, #ESX.PlayerData.inventory do
+ local v = ESX.PlayerData.inventory[i]
+ if v.count > 0 then
+ currentWeight = currentWeight + (v.weight * v.count)
+
+ elements[#elements + 1] = {
+ icon = "fas fa-box",
+ title = ("%s x%s"):format(v.label, v.count),
+ count = v.count,
+ type = "item_standard",
+ value = v.name,
+ usable = v.usable,
+ rare = v.rare,
+ canRemove = v.canRemove,
+ }
+ end
+ end
+
+ elements[1].title = TranslateCap("inventory", currentWeight, Config.MaxWeight)
+
+ for i = 1, #Config.Weapons do
+ local v = Config.Weapons[i]
+ local weaponHash = joaat(v.name)
+
+ if HasPedGotWeapon(playerPed, weaponHash, false) then
+ local ammo = GetAmmoInPedWeapon(playerPed, weaponHash)
+
+ elements[#elements + 1] = {
+ icon = "fas fa-gun",
+ title = v.ammo and ("%s - %s %s"):format(v.label, ammo, v.ammo.label) or v.label,
+ count = 1,
+ type = "item_weapon",
+ value = v.name,
+ usable = false,
+ rare = false,
+ ammo = ammo,
+ canGiveAmmo = (v.ammo ~= nil),
+ canRemove = true,
+ }
+ end
+ end
+
+ ESX.CloseContext()
+
+ ESX.OpenContext("right", elements, function(_, element)
+ local player, distance = ESX.Game.GetClosestPlayer()
+
+ local elements2 = {}
+
+ if element.usable then
+ elements2[#elements2 + 1] = {
+ icon = "fas fa-utensils",
+ title = TranslateCap("use"),
+ action = "use",
+ type = element.type,
+ value = element.value,
+ }
+ end
+
+ if element.canRemove then
+ if player ~= -1 and distance <= 3.0 then
+ elements2[#elements2 + 1] = {
+ icon = "fas fa-hands",
+ title = TranslateCap("give"),
+ action = "give",
+ type = element.type,
+ value = element.value,
+ }
+ end
+
+ elements2[#elements2 + 1] = {
+ icon = "fas fa-trash",
+ title = TranslateCap("remove"),
+ action = "remove",
+ type = element.type,
+ value = element.value,
+ }
+ end
+
+ if element.type == "item_weapon" and element.canGiveAmmo and element.ammo > 0 and player ~= -1 and distance <= 3.0 then
+ elements2[#elements2 + 1] = {
+ icon = "fas fa-gun",
+ title = TranslateCap("giveammo"),
+ action = "give_ammo",
+ type = element.type,
+ value = element.value,
+ }
+ end
+
+ elements2[#elements2 + 1] = {
+ icon = "fas fa-arrow-left",
+ title = TranslateCap("return"),
+ action = "return",
+ }
+
+ ESX.OpenContext("right", elements2, function(_, element2)
+ local item, itemType = element2.value, element2.type
+
+ if element2.action == "give" then
+ local playersNearby = ESX.Game.GetPlayersInArea(GetEntityCoords(playerPed), 3.0)
+
+ if #playersNearby > 0 then
+ local players = {}
+ local elements3 = {
+ { unselectable = true, icon = "fas fa-users", title = "Nearby Players" },
+ }
+
+ for _, playerNearby in ipairs(playersNearby) do
+ players[GetPlayerServerId(playerNearby)] = true
+ end
+
+ ESX.TriggerServerCallback("esx:getPlayerNames", function(returnedPlayers)
+ for playerId, playerName in pairs(returnedPlayers) do
+ elements3[#elements3 + 1] = {
+ icon = "fas fa-user",
+ title = playerName,
+ playerId = playerId,
+ }
+ end
+
+ ESX.OpenContext("right", elements3, function(_, element3)
+ local selectedPlayer, selectedPlayerId = GetPlayerFromServerId(element3.playerId), element3.playerId
+ playersNearby = ESX.Game.GetPlayersInArea(GetEntityCoords(playerPed), 3.0)
+ playersNearby = ESX.Table.Set(playersNearby)
+
+ if playersNearby[selectedPlayer] then
+ local selectedPlayerPed = GetPlayerPed(selectedPlayer)
+
+ if IsPedOnFoot(selectedPlayerPed) and not IsPedFalling(selectedPlayerPed) then
+ if itemType == "item_weapon" then
+ TriggerServerEvent("esx:giveInventoryItem", selectedPlayerId, itemType, item, nil)
+ ESX.CloseContext()
+ else
+ local elementsG = {
+ { unselectable = true, icon = "fas fa-trash", title = element.title },
+ { icon = "fas fa-tally", title = "Amount.", input = true, inputType = "number", inputPlaceholder = "Amount to give..", inputMin = 1, inputMax = 1000 },
+ { icon = "fas fa-check-double", title = "Confirm", val = "confirm" },
+ }
+
+ ESX.OpenContext("right", elementsG, function(menuG, _)
+ local quantity = tonumber(menuG.eles[2].inputValue)
+
+ if quantity and quantity > 0 and element.count >= quantity then
+ TriggerServerEvent("esx:giveInventoryItem", selectedPlayerId, itemType, item, quantity)
+ ESX.CloseContext()
+ else
+ ESX.ShowNotification(TranslateCap("amount_invalid"))
+ end
+ end)
+ end
+ else
+ ESX.ShowNotification(TranslateCap("in_vehicle"))
+ end
+ else
+ ESX.ShowNotification(TranslateCap("players_nearby"))
+ ESX.CloseContext()
+ end
+ end)
+ end, players)
+ end
+ elseif element2.action == "remove" then
+ if IsPedOnFoot(playerPed) and not IsPedFalling(playerPed) then
+ local dict, anim = "weapons@first_person@aim_rng@generic@projectile@sticky_bomb@", "plant_floor"
+ ESX.Streaming.RequestAnimDict(dict)
+
+ if itemType == "item_weapon" then
+ ESX.CloseContext()
+ TaskPlayAnim(playerPed, dict, anim, 8.0, 1.0, 1000, 16, 0.0, false, false, false)
+ RemoveAnimDict(dict)
+ Wait(1000)
+ TriggerServerEvent("esx:removeInventoryItem", itemType, item)
+ else
+ local elementsR = {
+ { unselectable = true, icon = "fas fa-trash", title = element.title },
+ { icon = "fas fa-tally", title = "Amount.", input = true, inputType = "number", inputPlaceholder = "Amount to remove..", inputMin = 1, inputMax = 1000 },
+ { icon = "fas fa-check-double", title = "Confirm", val = "confirm" },
+ }
+
+ ESX.OpenContext("right", elementsR, function(menuR, _)
+ local quantity = tonumber(menuR.eles[2].inputValue)
+
+ if quantity and quantity > 0 and element.count >= quantity then
+ ESX.CloseContext()
+ TaskPlayAnim(playerPed, dict, anim, 8.0, 1.0, 1000, 16, 0.0, false, false, false)
+ RemoveAnimDict(dict)
+ Wait(1000)
+ TriggerServerEvent("esx:removeInventoryItem", itemType, item, quantity)
+ else
+ ESX.ShowNotification(TranslateCap("amount_invalid"))
+ end
+ end)
+ end
+ end
+ elseif element2.action == "use" then
+ ESX.CloseContext()
+ TriggerServerEvent("esx:useItem", item)
+ elseif element2.action == "return" then
+ ESX.CloseContext()
+ ESX.ShowInventory()
+ elseif element2.action == "give_ammo" then
+ local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
+ local closestPed = GetPlayerPed(closestPlayer)
+ local pedAmmo = GetAmmoInPedWeapon(playerPed, joaat(item))
+
+ if IsPedOnFoot(closestPed) and not IsPedFalling(closestPed) then
+ if closestPlayer ~= -1 and closestDistance < 3.0 then
+ if pedAmmo > 0 then
+ local elementsGA = {
+ { unselectable = true, icon = "fas fa-trash", title = element.title },
+ { icon = "fas fa-tally", title = "Amount.", input = true, inputType = "number", inputPlaceholder = "Amount to give..", inputMin = 1, inputMax = 1000 },
+ { icon = "fas fa-check-double", title = "Confirm", val = "confirm" },
+ }
+
+ ESX.OpenContext("right", elementsGA, function(menuGA, _)
+ local quantity = tonumber(menuGA.eles[2].inputValue)
+
+ if quantity and quantity > 0 then
+ if pedAmmo >= quantity then
+ TriggerServerEvent("esx:giveInventoryItem", GetPlayerServerId(closestPlayer), "item_ammo", item, quantity)
+ ESX.CloseContext()
+ else
+ ESX.ShowNotification(TranslateCap("noammo"))
+ end
+ else
+ ESX.ShowNotification(TranslateCap("amount_invalid"))
+ end
+ end)
+ else
+ ESX.ShowNotification(TranslateCap("noammo"))
+ end
+ else
+ ESX.ShowNotification(TranslateCap("players_nearby"))
+ end
+ else
+ ESX.ShowNotification(TranslateCap("in_vehicle"))
+ end
+ end
+ end)
+ end)
end
RegisterNetEvent("esx:showNotification")
AddEventHandler("esx:showNotification", function(msg, notifyType, length)
- ESX.ShowNotification(msg, notifyType, length)
+ ESX.ShowNotification(msg, notifyType, length)
end)
RegisterNetEvent("esx:showAdvancedNotification")
-AddEventHandler(
- "esx:showAdvancedNotification",
- function(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
- ESX.ShowAdvancedNotification(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
- end
-)
+AddEventHandler("esx:showAdvancedNotification", function(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
+ ESX.ShowAdvancedNotification(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
+end)
RegisterNetEvent("esx:showHelpNotification")
AddEventHandler("esx:showHelpNotification", function(msg, thisFrame, beep, duration)
- ESX.ShowHelpNotification(msg, thisFrame, beep, duration)
+ ESX.ShowHelpNotification(msg, thisFrame, beep, duration)
end)
AddEventHandler("onResourceStop", function(resourceName)
- for i = 1, #ESX.UI.Menu.Opened, 1 do
- if ESX.UI.Menu.Opened[i] then
- if
- ESX.UI.Menu.Opened[i].resourceName == resourceName
- or ESX.UI.Menu.Opened[i].namespace == resourceName
- then
- ESX.UI.Menu.Opened[i].close()
- ESX.UI.Menu.Opened[i] = nil
- end
- end
- end
+ for i = 1, #ESX.UI.Menu.Opened, 1 do
+ if ESX.UI.Menu.Opened[i] then
+ if ESX.UI.Menu.Opened[i].resourceName == resourceName or ESX.UI.Menu.Opened[i].namespace == resourceName then
+ ESX.UI.Menu.Opened[i].close()
+ ESX.UI.Menu.Opened[i] = nil
+ end
+ end
+ end
end)
-- Credits to txAdmin for the list.
local mismatchedTypes = {
- [`airtug`] = "automobile", -- trailer
- [`avisa`] = "submarine", -- boat
- [`blimp`] = "heli", -- plane
- [`blimp2`] = "heli", -- plane
- [`blimp3`] = "heli", -- plane
- [`caddy`] = "automobile", -- trailer
- [`caddy2`] = "automobile", -- trailer
- [`caddy3`] = "automobile", -- trailer
- [`chimera`] = "automobile", -- bike
- [`docktug`] = "automobile", -- trailer
- [`forklift`] = "automobile", -- trailer
- [`kosatka`] = "submarine", -- boat
- [`mower`] = "automobile", -- trailer
- [`policeb`] = "bike", -- automobile
- [`ripley`] = "automobile", -- trailer
- [`rrocket`] = "automobile", -- bike
- [`sadler`] = "automobile", -- trailer
- [`sadler2`] = "automobile", -- trailer
- [`scrap`] = "automobile", -- trailer
- [`slamtruck`] = "automobile", -- trailer
- [`Stryder`] = "automobile", -- bike
- [`submersible`] = "submarine", -- boat
- [`submersible2`] = "submarine", -- boat
- [`thruster`] = "heli", -- automobile
- [`towtruck`] = "automobile", -- trailer
- [`towtruck2`] = "automobile", -- trailer
- [`tractor`] = "automobile", -- trailer
- [`tractor2`] = "automobile", -- trailer
- [`tractor3`] = "automobile", -- trailer
- [`trailersmall2`] = "trailer", -- automobile
- [`utillitruck`] = "automobile", -- trailer
- [`utillitruck2`] = "automobile", -- trailer
- [`utillitruck3`] = "automobile", -- trailer
+ [`airtug`] = "automobile", -- trailer
+ [`avisa`] = "submarine", -- boat
+ [`blimp`] = "heli", -- plane
+ [`blimp2`] = "heli", -- plane
+ [`blimp3`] = "heli", -- plane
+ [`caddy`] = "automobile", -- trailer
+ [`caddy2`] = "automobile", -- trailer
+ [`caddy3`] = "automobile", -- trailer
+ [`chimera`] = "automobile", -- bike
+ [`docktug`] = "automobile", -- trailer
+ [`forklift`] = "automobile", -- trailer
+ [`kosatka`] = "submarine", -- boat
+ [`mower`] = "automobile", -- trailer
+ [`policeb`] = "bike", -- automobile
+ [`ripley`] = "automobile", -- trailer
+ [`rrocket`] = "automobile", -- bike
+ [`sadler`] = "automobile", -- trailer
+ [`sadler2`] = "automobile", -- trailer
+ [`scrap`] = "automobile", -- trailer
+ [`slamtruck`] = "automobile", -- trailer
+ [`Stryder`] = "automobile", -- bike
+ [`submersible`] = "submarine", -- boat
+ [`submersible2`] = "submarine", -- boat
+ [`thruster`] = "heli", -- automobile
+ [`towtruck`] = "automobile", -- trailer
+ [`towtruck2`] = "automobile", -- trailer
+ [`tractor`] = "automobile", -- trailer
+ [`tractor2`] = "automobile", -- trailer
+ [`tractor3`] = "automobile", -- trailer
+ [`trailersmall2`] = "trailer", -- automobile
+ [`utillitruck`] = "automobile", -- trailer
+ [`utillitruck2`] = "automobile", -- trailer
+ [`utillitruck3`] = "automobile", -- trailer
}
---@param model number|string
---@return string
function ESX.GetVehicleType(model)
- model = type(model) == "string" and joaat(model) or model
- if not IsModelInCdimage(model) then
- return
- end
- if mismatchedTypes[model] then
- return mismatchedTypes[model]
- end
-
- local vehicleType = GetVehicleClassFromName(model)
- local types = {
- [8] = "bike",
- [11] = "trailer",
- [13] = "bike",
- [14] = "boat",
- [15] = "heli",
- [16] = "plane",
- [21] = "train",
- }
-
- return types[vehicleType] or "automobile"
+ model = type(model) == "string" and joaat(model) or model
+ if not IsModelInCdimage(model) then
+ return
+ end
+ if mismatchedTypes[model] then
+ return mismatchedTypes[model]
+ end
+
+ local vehicleType = GetVehicleClassFromName(model)
+ local types = {
+ [8] = "bike",
+ [11] = "trailer",
+ [13] = "bike",
+ [14] = "boat",
+ [15] = "heli",
+ [16] = "plane",
+ [21] = "train",
+ }
+
+ return types[vehicleType] or "automobile"
end
diff --git a/server-data/resources/[esx]/es_extended/client/main.lua b/server-data/resources/[esx]/es_extended/client/main.lua
index b0271c8cf..daccaa1d4 100644
--- a/server-data/resources/[esx]/es_extended/client/main.lua
+++ b/server-data/resources/[esx]/es_extended/client/main.lua
@@ -1,662 +1,608 @@
local pickups = {}
CreateThread(function()
- while not Config.Multichar do
- Wait(100)
-
- if NetworkIsPlayerActive(PlayerId()) then
- exports.spawnmanager:setAutoSpawn(false)
- DoScreenFadeOut(0)
- Wait(500)
- TriggerServerEvent("esx:onPlayerJoined")
- break
- end
- end
+ while not Config.Multichar do
+ Wait(100)
+
+ if NetworkIsPlayerActive(PlayerId()) then
+ exports.spawnmanager:setAutoSpawn(false)
+ DoScreenFadeOut(0)
+ Wait(500)
+ TriggerServerEvent("esx:onPlayerJoined")
+ break
+ end
+ end
end)
RegisterNetEvent("esx:requestModel", function(model)
- ESX.Streaming.RequestModel(model)
+ ESX.Streaming.RequestModel(model)
end)
function ESX.SpawnPlayer(skin, coords, cb)
- local p = promise.new()
- TriggerEvent("skinchanger:loadSkin", skin, function()
- p:resolve()
- end)
- Citizen.Await(p)
-
- local playerPed = PlayerPedId()
- FreezeEntityPosition(playerPed, true)
- SetEntityCoordsNoOffset(playerPed, coords.x, coords.y, coords.z, false, false, false, true)
- SetEntityHeading(playerPed, coords.heading)
- while not HasCollisionLoadedAroundEntity(playerPed) do
- Wait(0)
- end
- FreezeEntityPosition(playerPed, false)
- NetworkResurrectLocalPlayer(coords.x, coords.y, coords.z, coords.heading, true, true, false)
- TriggerEvent("playerSpawned", coords)
- cb()
+ local p = promise.new()
+ TriggerEvent("skinchanger:loadSkin", skin, function()
+ p:resolve()
+ end)
+ Citizen.Await(p)
+
+ local playerPed = PlayerPedId()
+ FreezeEntityPosition(playerPed, true)
+ SetEntityCoordsNoOffset(playerPed, coords.x, coords.y, coords.z, false, false, false, true)
+ SetEntityHeading(playerPed, coords.heading)
+ while not HasCollisionLoadedAroundEntity(playerPed) do
+ Wait(0)
+ end
+ FreezeEntityPosition(playerPed, false)
+ NetworkResurrectLocalPlayer(coords.x, coords.y, coords.z, coords.heading, true, true, false)
+ TriggerEvent('playerSpawned', coords)
+ cb()
end
RegisterNetEvent("esx:playerLoaded")
AddEventHandler("esx:playerLoaded", function(xPlayer, _, skin)
- ESX.PlayerData = xPlayer
-
- if not Config.Multichar then
- ESX.SpawnPlayer(skin, ESX.PlayerData.coords, function()
- TriggerEvent("esx:onPlayerSpawn")
- TriggerEvent("esx:restoreLoadout")
- TriggerServerEvent("esx:onPlayerSpawn")
- TriggerEvent("esx:loadingScreenOff")
- ShutdownLoadingScreen()
- ShutdownLoadingScreenNui()
- end)
- end
-
- while not DoesEntityExist(ESX.PlayerData.ped) do
- Wait(20)
- end
-
- ESX.PlayerLoaded = true
-
- local metadata = ESX.PlayerData.metadata
-
- if metadata.health then
- SetEntityHealth(ESX.PlayerData.ped, metadata.health)
- end
-
- if metadata.armor and metadata.armor > 0 then
- SetPedArmour(ESX.PlayerData.ped, metadata.armor)
- end
-
- local timer = GetGameTimer()
- while not HaveAllStreamingRequestsCompleted(ESX.PlayerData.ped) and (GetGameTimer() - timer) < 2000 do
- Wait(0)
- end
-
- if Config.EnablePVP then
- SetCanAttackFriendly(ESX.PlayerData.ped, true, false)
- NetworkSetFriendlyFireOption(true)
- end
-
- local playerId = PlayerId()
- -- RemoveHudComponents
- for i = 1, #Config.RemoveHudComponents do
- if Config.RemoveHudComponents[i] then
- SetHudComponentPosition(i, 999999.0, 999999.0)
- end
- end
-
- -- DisableNPCDrops
- if Config.DisableNPCDrops then
- local weaponPickups = { `PICKUP_WEAPON_CARBINERIFLE`, `PICKUP_WEAPON_PISTOL`, `PICKUP_WEAPON_PUMPSHOTGUN` }
- for i = 1, #weaponPickups do
- ToggleUsePickupsForPlayer(playerId, weaponPickups[i], false)
- end
- end
-
- if Config.DisableVehicleSeatShuff then
- AddEventHandler("esx:enteredVehicle", function(vehicle, _, seat)
- if seat == 0 then
- SetPedIntoVehicle(ESX.PlayerData.ped, vehicle, 0)
- SetPedConfigFlag(ESX.PlayerData.ped, 184, true)
- end
- end)
- end
-
- if Config.DisableHealthRegeneration then
- SetPlayerHealthRechargeMultiplier(playerId, 0.0)
- end
-
- if Config.DisableWeaponWheel or Config.DisableAimAssist or Config.DisableVehicleRewards then
- CreateThread(function()
- while true do
- if Config.DisableDisplayAmmo then
- DisplayAmmoThisFrame(false)
- end
-
- if Config.DisableWeaponWheel then
- BlockWeaponWheelThisFrame()
- DisableControlAction(0, 37, true)
- end
-
- if Config.DisableAimAssist then
- if IsPedArmed(ESX.PlayerData.ped, 4) then
- SetPlayerLockonRangeOverride(playerId, 2.0)
- end
- end
-
- if Config.DisableVehicleRewards then
- DisablePlayerVehicleRewards(playerId)
- end
-
- Wait(0)
- end
- end)
- end
-
- -- Disable Dispatch services
- if Config.DisableDispatchServices then
- for i = 1, 15 do
- EnableDispatchService(i, false)
- end
- end
-
- -- Disable Scenarios
- if Config.DisableScenarios then
- local scenarios = {
- "WORLD_VEHICLE_ATTRACTOR",
- "WORLD_VEHICLE_AMBULANCE",
- "WORLD_VEHICLE_BICYCLE_BMX",
- "WORLD_VEHICLE_BICYCLE_BMX_BALLAS",
- "WORLD_VEHICLE_BICYCLE_BMX_FAMILY",
- "WORLD_VEHICLE_BICYCLE_BMX_HARMONY",
- "WORLD_VEHICLE_BICYCLE_BMX_VAGOS",
- "WORLD_VEHICLE_BICYCLE_MOUNTAIN",
- "WORLD_VEHICLE_BICYCLE_ROAD",
- "WORLD_VEHICLE_BIKE_OFF_ROAD_RACE",
- "WORLD_VEHICLE_BIKER",
- "WORLD_VEHICLE_BOAT_IDLE",
- "WORLD_VEHICLE_BOAT_IDLE_ALAMO",
- "WORLD_VEHICLE_BOAT_IDLE_MARQUIS",
- "WORLD_VEHICLE_BOAT_IDLE_MARQUIS",
- "WORLD_VEHICLE_BROKEN_DOWN",
- "WORLD_VEHICLE_BUSINESSMEN",
- "WORLD_VEHICLE_HELI_LIFEGUARD",
- "WORLD_VEHICLE_CLUCKIN_BELL_TRAILER",
- "WORLD_VEHICLE_CONSTRUCTION_SOLO",
- "WORLD_VEHICLE_CONSTRUCTION_PASSENGERS",
- "WORLD_VEHICLE_DRIVE_PASSENGERS",
- "WORLD_VEHICLE_DRIVE_PASSENGERS_LIMITED",
- "WORLD_VEHICLE_DRIVE_SOLO",
- "WORLD_VEHICLE_FIRE_TRUCK",
- "WORLD_VEHICLE_EMPTY",
- "WORLD_VEHICLE_MARIACHI",
- "WORLD_VEHICLE_MECHANIC",
- "WORLD_VEHICLE_MILITARY_PLANES_BIG",
- "WORLD_VEHICLE_MILITARY_PLANES_SMALL",
- "WORLD_VEHICLE_PARK_PARALLEL",
- "WORLD_VEHICLE_PARK_PERPENDICULAR_NOSE_IN",
- "WORLD_VEHICLE_PASSENGER_EXIT",
- "WORLD_VEHICLE_POLICE_BIKE",
- "WORLD_VEHICLE_POLICE_CAR",
- "WORLD_VEHICLE_POLICE",
- "WORLD_VEHICLE_POLICE_NEXT_TO_CAR",
- "WORLD_VEHICLE_QUARRY",
- "WORLD_VEHICLE_SALTON",
- "WORLD_VEHICLE_SALTON_DIRT_BIKE",
- "WORLD_VEHICLE_SECURITY_CAR",
- "WORLD_VEHICLE_STREETRACE",
- "WORLD_VEHICLE_TOURBUS",
- "WORLD_VEHICLE_TOURIST",
- "WORLD_VEHICLE_TANDL",
- "WORLD_VEHICLE_TRACTOR",
- "WORLD_VEHICLE_TRACTOR_BEACH",
- "WORLD_VEHICLE_TRUCK_LOGS",
- "WORLD_VEHICLE_TRUCKS_TRAILERS",
- "WORLD_VEHICLE_DISTANT_EMPTY_GROUND",
- "WORLD_HUMAN_PAPARAZZI",
- }
-
- for _, v in pairs(scenarios) do
- SetScenarioTypeEnabled(v, false)
- end
- end
-
- if IsScreenFadedOut() then
- DoScreenFadeIn(500)
- end
-
- SetDefaultVehicleNumberPlateTextPattern(-1, Config.CustomAIPlates)
- StartServerSyncLoops()
+ ESX.PlayerData = xPlayer
+
+ if not Config.Multichar then
+ ESX.SpawnPlayer(skin, ESX.PlayerData.coords, function()
+ TriggerEvent("esx:onPlayerSpawn")
+ TriggerEvent("esx:restoreLoadout")
+ TriggerServerEvent("esx:onPlayerSpawn")
+ TriggerEvent("esx:loadingScreenOff")
+ ShutdownLoadingScreen()
+ ShutdownLoadingScreenNui()
+ end)
+ end
+
+ while not DoesEntityExist(ESX.PlayerData.ped) do
+ Wait(20)
+ end
+
+ ESX.PlayerLoaded = true
+
+ local metadata = ESX.PlayerData.metadata
+
+ if metadata.health then
+ SetEntityHealth(ESX.PlayerData.ped, metadata.health)
+ end
+
+ if metadata.armor and metadata.armor > 0 then
+ SetPedArmour(ESX.PlayerData.ped, metadata.armor)
+ end
+
+ local timer = GetGameTimer()
+ while not HaveAllStreamingRequestsCompleted(ESX.PlayerData.ped) and (GetGameTimer() - timer) < 2000 do
+ Wait(0)
+ end
+
+ if Config.EnablePVP then
+ SetCanAttackFriendly(ESX.PlayerData.ped, true, false)
+ NetworkSetFriendlyFireOption(true)
+ end
+
+ local playerId = PlayerId()
+ -- RemoveHudComponents
+ for i = 1, #Config.RemoveHudComponents do
+ if Config.RemoveHudComponents[i] then
+ SetHudComponentPosition(i, 999999.0, 999999.0)
+ end
+ end
+
+ -- DisableNPCDrops
+ if Config.DisableNPCDrops then
+ local weaponPickups = { `PICKUP_WEAPON_CARBINERIFLE`, `PICKUP_WEAPON_PISTOL`, `PICKUP_WEAPON_PUMPSHOTGUN` }
+ for i = 1, #weaponPickups do
+ ToggleUsePickupsForPlayer(playerId, weaponPickups[i], false)
+ end
+ end
+
+ if Config.DisableVehicleSeatShuff then
+ AddEventHandler("esx:enteredVehicle", function(vehicle, _, seat)
+ if seat == 0 then
+ SetPedIntoVehicle(ESX.PlayerData.ped, vehicle, 0)
+ SetPedConfigFlag(ESX.PlayerData.ped, 184, true)
+ end
+ end)
+ end
+
+ if Config.DisableHealthRegeneration then
+ SetPlayerHealthRechargeMultiplier(playerId, 0.0)
+ end
+
+ if Config.DisableWeaponWheel or Config.DisableAimAssist or Config.DisableVehicleRewards then
+ CreateThread(function()
+ while true do
+ if Config.DisableDisplayAmmo then
+ DisplayAmmoThisFrame(false)
+ end
+
+ if Config.DisableWeaponWheel then
+ BlockWeaponWheelThisFrame()
+ DisableControlAction(0, 37, true)
+ end
+
+ if Config.DisableAimAssist then
+ if IsPedArmed(ESX.PlayerData.ped, 4) then
+ SetPlayerLockonRangeOverride(playerId, 2.0)
+ end
+ end
+
+ if Config.DisableVehicleRewards then
+ DisablePlayerVehicleRewards(playerId)
+ end
+
+ Wait(0)
+ end
+ end)
+ end
+
+ -- Disable Dispatch services
+ if Config.DisableDispatchServices then
+ for i = 1, 15 do
+ EnableDispatchService(i, false)
+ end
+ end
+
+ -- Disable Scenarios
+ if Config.DisableScenarios then
+ local scenarios = {
+ "WORLD_VEHICLE_ATTRACTOR",
+ "WORLD_VEHICLE_AMBULANCE",
+ "WORLD_VEHICLE_BICYCLE_BMX",
+ "WORLD_VEHICLE_BICYCLE_BMX_BALLAS",
+ "WORLD_VEHICLE_BICYCLE_BMX_FAMILY",
+ "WORLD_VEHICLE_BICYCLE_BMX_HARMONY",
+ "WORLD_VEHICLE_BICYCLE_BMX_VAGOS",
+ "WORLD_VEHICLE_BICYCLE_MOUNTAIN",
+ "WORLD_VEHICLE_BICYCLE_ROAD",
+ "WORLD_VEHICLE_BIKE_OFF_ROAD_RACE",
+ "WORLD_VEHICLE_BIKER",
+ "WORLD_VEHICLE_BOAT_IDLE",
+ "WORLD_VEHICLE_BOAT_IDLE_ALAMO",
+ "WORLD_VEHICLE_BOAT_IDLE_MARQUIS",
+ "WORLD_VEHICLE_BOAT_IDLE_MARQUIS",
+ "WORLD_VEHICLE_BROKEN_DOWN",
+ "WORLD_VEHICLE_BUSINESSMEN",
+ "WORLD_VEHICLE_HELI_LIFEGUARD",
+ "WORLD_VEHICLE_CLUCKIN_BELL_TRAILER",
+ "WORLD_VEHICLE_CONSTRUCTION_SOLO",
+ "WORLD_VEHICLE_CONSTRUCTION_PASSENGERS",
+ "WORLD_VEHICLE_DRIVE_PASSENGERS",
+ "WORLD_VEHICLE_DRIVE_PASSENGERS_LIMITED",
+ "WORLD_VEHICLE_DRIVE_SOLO",
+ "WORLD_VEHICLE_FIRE_TRUCK",
+ "WORLD_VEHICLE_EMPTY",
+ "WORLD_VEHICLE_MARIACHI",
+ "WORLD_VEHICLE_MECHANIC",
+ "WORLD_VEHICLE_MILITARY_PLANES_BIG",
+ "WORLD_VEHICLE_MILITARY_PLANES_SMALL",
+ "WORLD_VEHICLE_PARK_PARALLEL",
+ "WORLD_VEHICLE_PARK_PERPENDICULAR_NOSE_IN",
+ "WORLD_VEHICLE_PASSENGER_EXIT",
+ "WORLD_VEHICLE_POLICE_BIKE",
+ "WORLD_VEHICLE_POLICE_CAR",
+ "WORLD_VEHICLE_POLICE",
+ "WORLD_VEHICLE_POLICE_NEXT_TO_CAR",
+ "WORLD_VEHICLE_QUARRY",
+ "WORLD_VEHICLE_SALTON",
+ "WORLD_VEHICLE_SALTON_DIRT_BIKE",
+ "WORLD_VEHICLE_SECURITY_CAR",
+ "WORLD_VEHICLE_STREETRACE",
+ "WORLD_VEHICLE_TOURBUS",
+ "WORLD_VEHICLE_TOURIST",
+ "WORLD_VEHICLE_TANDL",
+ "WORLD_VEHICLE_TRACTOR",
+ "WORLD_VEHICLE_TRACTOR_BEACH",
+ "WORLD_VEHICLE_TRUCK_LOGS",
+ "WORLD_VEHICLE_TRUCKS_TRAILERS",
+ "WORLD_VEHICLE_DISTANT_EMPTY_GROUND",
+ "WORLD_HUMAN_PAPARAZZI",
+ }
+
+ for _, v in pairs(scenarios) do
+ SetScenarioTypeEnabled(v, false)
+ end
+ end
+
+ if IsScreenFadedOut() then
+ DoScreenFadeIn(500)
+ end
+
+ SetDefaultVehicleNumberPlateTextPattern(-1, Config.CustomAIPlates)
+ StartServerSyncLoops()
end)
+
RegisterNetEvent("esx:onPlayerLogout")
AddEventHandler("esx:onPlayerLogout", function()
- ESX.PlayerLoaded = false
+ ESX.PlayerLoaded = false
end)
RegisterNetEvent("esx:setMaxWeight")
AddEventHandler("esx:setMaxWeight", function(newMaxWeight)
- ESX.SetPlayerData("maxWeight", newMaxWeight)
+ ESX.SetPlayerData("maxWeight", newMaxWeight)
end)
local function onPlayerSpawn()
- ESX.SetPlayerData("ped", PlayerPedId())
- ESX.SetPlayerData("dead", false)
+ ESX.SetPlayerData("ped", PlayerPedId())
+ ESX.SetPlayerData("dead", false)
end
AddEventHandler("playerSpawned", onPlayerSpawn)
AddEventHandler("esx:onPlayerSpawn", onPlayerSpawn)
AddEventHandler("esx:onPlayerDeath", function()
- ESX.SetPlayerData("ped", PlayerPedId())
- ESX.SetPlayerData("dead", true)
+ ESX.SetPlayerData("ped", PlayerPedId())
+ ESX.SetPlayerData("dead", true)
end)
AddEventHandler("skinchanger:modelLoaded", function()
- while not ESX.PlayerLoaded do
- Wait(100)
- end
- TriggerEvent("esx:restoreLoadout")
+ while not ESX.PlayerLoaded do
+ Wait(100)
+ end
+ TriggerEvent("esx:restoreLoadout")
end)
AddEventHandler("esx:restoreLoadout", function()
- ESX.SetPlayerData("ped", PlayerPedId())
+ ESX.SetPlayerData("ped", PlayerPedId())
- if not Config.OxInventory then
- local ammoTypes = {}
- RemoveAllPedWeapons(ESX.PlayerData.ped, true)
+ if not Config.OxInventory then
+ local ammoTypes = {}
+ RemoveAllPedWeapons(ESX.PlayerData.ped, true)
- for _, v in ipairs(ESX.PlayerData.loadout) do
- local weaponName = v.name
- local weaponHash = joaat(weaponName)
+ for _, v in ipairs(ESX.PlayerData.loadout) do
+ local weaponName = v.name
+ local weaponHash = joaat(weaponName)
- GiveWeaponToPed(ESX.PlayerData.ped, weaponHash, 0, false, false)
- SetPedWeaponTintIndex(ESX.PlayerData.ped, weaponHash, v.tintIndex)
+ GiveWeaponToPed(ESX.PlayerData.ped, weaponHash, 0, false, false)
+ SetPedWeaponTintIndex(ESX.PlayerData.ped, weaponHash, v.tintIndex)
- local ammoType = GetPedAmmoTypeFromWeapon(ESX.PlayerData.ped, weaponHash)
+ local ammoType = GetPedAmmoTypeFromWeapon(ESX.PlayerData.ped, weaponHash)
- for _, v2 in ipairs(v.components) do
- local componentHash = ESX.GetWeaponComponent(weaponName, v2).hash
- GiveWeaponComponentToPed(ESX.PlayerData.ped, weaponHash, componentHash)
- end
+ for _, v2 in ipairs(v.components) do
+ local componentHash = ESX.GetWeaponComponent(weaponName, v2).hash
+ GiveWeaponComponentToPed(ESX.PlayerData.ped, weaponHash, componentHash)
+ end
- if not ammoTypes[ammoType] then
- AddAmmoToPed(ESX.PlayerData.ped, weaponHash, v.ammo)
- ammoTypes[ammoType] = true
- end
- end
- end
+ if not ammoTypes[ammoType] then
+ AddAmmoToPed(ESX.PlayerData.ped, weaponHash, v.ammo)
+ ammoTypes[ammoType] = true
+ end
+ end
+ end
end)
--- Credit: https://github.com/LukeWasTakenn, https://github.com/LukeWasTakenn/luke_garages/blob/master/client/client.lua#L331-L352
AddStateBagChangeHandler("VehicleProperties", nil, function(bagName, _, value)
- if not value then
- return
- end
-
- local netId = bagName:gsub("entity:", "")
- local timer = GetGameTimer()
- while not NetworkDoesEntityExistWithNetworkId(tonumber(netId)) do
- Wait(0)
- if GetGameTimer() - timer > 10000 then
- return
- end
- end
-
- local vehicle = NetToVeh(tonumber(netId))
- local timer2 = GetGameTimer()
- while NetworkGetEntityOwner(vehicle) ~= PlayerId() do
- Wait(0)
- if GetGameTimer() - timer2 > 10000 then
- return
- end
- end
-
- ESX.Game.SetVehicleProperties(vehicle, value)
-end)
+ if not value then
+ return
+ end
+
+ local netId = bagName:gsub("entity:", "")
+ local vehicle = NetToVeh(tonumber(netId))
+
+ ESX.Game.SetVehicleProperties(vehicle, value)
+end)
RegisterNetEvent("esx:setAccountMoney")
AddEventHandler("esx:setAccountMoney", function(account)
- for i = 1, #ESX.PlayerData.accounts do
- if ESX.PlayerData.accounts[i].name == account.name then
- ESX.PlayerData.accounts[i] = account
- break
- end
- end
-
- ESX.SetPlayerData("accounts", ESX.PlayerData.accounts)
+ for i = 1, #ESX.PlayerData.accounts do
+ if ESX.PlayerData.accounts[i].name == account.name then
+ ESX.PlayerData.accounts[i] = account
+ break
+ end
+ end
+
+ ESX.SetPlayerData("accounts", ESX.PlayerData.accounts)
end)
if not Config.OxInventory then
- RegisterNetEvent("esx:addInventoryItem")
- AddEventHandler("esx:addInventoryItem", function(item, count, showNotification)
- for k, v in ipairs(ESX.PlayerData.inventory) do
- if v.name == item then
- ESX.UI.ShowInventoryItemNotification(true, v.label, count - v.count)
- ESX.PlayerData.inventory[k].count = count
- break
- end
- end
-
- if showNotification then
- ESX.UI.ShowInventoryItemNotification(true, item, count)
- end
- end)
-
- RegisterNetEvent("esx:removeInventoryItem")
- AddEventHandler("esx:removeInventoryItem", function(item, count, showNotification)
- for i = 1, #ESX.PlayerData.inventory do
- if ESX.PlayerData.inventory[i].name == item then
- ESX.UI.ShowInventoryItemNotification(
- false,
- ESX.PlayerData.inventory[i].label,
- ESX.PlayerData.inventory[i].count - count
- )
- ESX.PlayerData.inventory[i].count = count
- break
- end
- end
-
- if showNotification then
- ESX.UI.ShowInventoryItemNotification(false, item, count)
- end
- end)
-
- RegisterNetEvent("esx:addWeapon")
- AddEventHandler("esx:addWeapon", function()
- print("[^1ERROR^7] event ^5'esx:addWeapon'^7 Has Been Removed. Please use ^5xPlayer.addWeapon^7 Instead!")
- end)
-
- RegisterNetEvent("esx:addWeaponComponent")
- AddEventHandler("esx:addWeaponComponent", function()
- print(
- "[^1ERROR^7] event ^5'esx:addWeaponComponent'^7 Has Been Removed. Please use ^5xPlayer.addWeaponComponent^7 Instead!"
- )
- end)
-
- RegisterNetEvent("esx:setWeaponAmmo")
- AddEventHandler("esx:setWeaponAmmo", function()
- print(
- "[^1ERROR^7] event ^5'esx:setWeaponAmmo'^7 Has Been Removed. Please use ^5xPlayer.addWeaponAmmo^7 Instead!"
- )
- end)
-
- RegisterNetEvent("esx:setWeaponTint")
- AddEventHandler("esx:setWeaponTint", function(weapon, weaponTintIndex)
- SetPedWeaponTintIndex(ESX.PlayerData.ped, joaat(weapon), weaponTintIndex)
- end)
-
- RegisterNetEvent("esx:removeWeapon")
- AddEventHandler("esx:removeWeapon", function()
- print("[^1ERROR^7] event ^5'esx:removeWeapon'^7 Has Been Removed. Please use ^5xPlayer.removeWeapon^7 Instead!")
- end)
-
- RegisterNetEvent("esx:removeWeaponComponent")
- AddEventHandler("esx:removeWeaponComponent", function(weapon, weaponComponent)
- local componentHash = ESX.GetWeaponComponent(weapon, weaponComponent).hash
- RemoveWeaponComponentFromPed(ESX.PlayerData.ped, joaat(weapon), componentHash)
- end)
+ RegisterNetEvent("esx:addInventoryItem")
+ AddEventHandler("esx:addInventoryItem", function(item, count, showNotification)
+ for k, v in ipairs(ESX.PlayerData.inventory) do
+ if v.name == item then
+ ESX.UI.ShowInventoryItemNotification(true, v.label, count - v.count)
+ ESX.PlayerData.inventory[k].count = count
+ break
+ end
+ end
+
+ if showNotification then
+ ESX.UI.ShowInventoryItemNotification(true, item, count)
+ end
+ end)
+
+ RegisterNetEvent("esx:removeInventoryItem")
+ AddEventHandler("esx:removeInventoryItem", function(item, count, showNotification)
+ for i = 1, #ESX.PlayerData.inventory do
+ if ESX.PlayerData.inventory[i].name == item then
+ ESX.UI.ShowInventoryItemNotification(false, ESX.PlayerData.inventory[i].label, ESX.PlayerData.inventory[i].count - count)
+ ESX.PlayerData.inventory[i].count = count
+ break
+ end
+ end
+
+ if showNotification then
+ ESX.UI.ShowInventoryItemNotification(false, item, count)
+ end
+ end)
+
+ RegisterNetEvent("esx:addWeapon")
+ AddEventHandler("esx:addWeapon", function()
+ print("[^1ERROR^7] event ^5'esx:addWeapon'^7 Has Been Removed. Please use ^5xPlayer.addWeapon^7 Instead!")
+ end)
+
+ RegisterNetEvent("esx:addWeaponComponent")
+ AddEventHandler("esx:addWeaponComponent", function()
+ print("[^1ERROR^7] event ^5'esx:addWeaponComponent'^7 Has Been Removed. Please use ^5xPlayer.addWeaponComponent^7 Instead!")
+ end)
+
+ RegisterNetEvent("esx:setWeaponAmmo")
+ AddEventHandler("esx:setWeaponAmmo", function()
+ print("[^1ERROR^7] event ^5'esx:setWeaponAmmo'^7 Has Been Removed. Please use ^5xPlayer.addWeaponAmmo^7 Instead!")
+ end)
+
+ RegisterNetEvent("esx:setWeaponTint")
+ AddEventHandler("esx:setWeaponTint", function(weapon, weaponTintIndex)
+ SetPedWeaponTintIndex(ESX.PlayerData.ped, joaat(weapon), weaponTintIndex)
+ end)
+
+ RegisterNetEvent("esx:removeWeapon")
+ AddEventHandler("esx:removeWeapon", function()
+ print("[^1ERROR^7] event ^5'esx:removeWeapon'^7 Has Been Removed. Please use ^5xPlayer.removeWeapon^7 Instead!")
+ end)
+
+ RegisterNetEvent("esx:removeWeaponComponent")
+ AddEventHandler("esx:removeWeaponComponent", function(weapon, weaponComponent)
+ local componentHash = ESX.GetWeaponComponent(weapon, weaponComponent).hash
+ RemoveWeaponComponentFromPed(ESX.PlayerData.ped, joaat(weapon), componentHash)
+ end)
end
RegisterNetEvent("esx:setJob")
AddEventHandler("esx:setJob", function(Job)
- ESX.SetPlayerData("job", Job)
+ ESX.SetPlayerData("job", Job)
end)
if not Config.OxInventory then
- RegisterNetEvent("esx:createPickup")
- AddEventHandler("esx:createPickup", function(pickupId, label, coords, itemType, name, components, tintIndex)
- local function setObjectProperties(object)
- SetEntityAsMissionEntity(object, true, false)
- PlaceObjectOnGroundProperly(object)
- FreezeEntityPosition(object, true)
- SetEntityCollision(object, false, true)
-
- pickups[pickupId] = {
- obj = object,
- label = label,
- inRange = false,
- coords = coords,
- }
- end
-
- if itemType == "item_weapon" then
- local weaponHash = joaat(name)
- ESX.Streaming.RequestWeaponAsset(weaponHash)
- local pickupObject = CreateWeaponObject(weaponHash, 50, coords.x, coords.y, coords.z, true, 1.0, 0)
- SetWeaponObjectTintIndex(pickupObject, tintIndex)
-
- for _, v in ipairs(components) do
- local component = ESX.GetWeaponComponent(name, v)
- GiveWeaponComponentToWeaponObject(pickupObject, component.hash)
- end
-
- setObjectProperties(pickupObject)
- else
- ESX.Game.SpawnLocalObject("prop_money_bag_01", coords, setObjectProperties)
- end
- end)
-
- RegisterNetEvent("esx:createMissingPickups")
- AddEventHandler("esx:createMissingPickups", function(missingPickups)
- for pickupId, pickup in pairs(missingPickups) do
- TriggerEvent(
- "esx:createPickup",
- pickupId,
- pickup.label,
- vector3(pickup.coords.x, pickup.coords.y, pickup.coords.z - 1.0),
- pickup.type,
- pickup.name,
- pickup.components,
- pickup.tintIndex
- )
- end
- end)
+ RegisterNetEvent("esx:createPickup")
+ AddEventHandler("esx:createPickup", function(pickupId, label, coords, itemType, name, components, tintIndex)
+ local function setObjectProperties(object)
+ SetEntityAsMissionEntity(object, true, false)
+ PlaceObjectOnGroundProperly(object)
+ FreezeEntityPosition(object, true)
+ SetEntityCollision(object, false, true)
+
+ pickups[pickupId] = {
+ obj = object,
+ label = label,
+ inRange = false,
+ coords = coords,
+ }
+ end
+
+ if itemType == "item_weapon" then
+ local weaponHash = joaat(name)
+ ESX.Streaming.RequestWeaponAsset(weaponHash)
+ local pickupObject = CreateWeaponObject(weaponHash, 50, coords.x, coords.y, coords.z, true, 1.0, 0)
+ SetWeaponObjectTintIndex(pickupObject, tintIndex)
+
+ for _, v in ipairs(components) do
+ local component = ESX.GetWeaponComponent(name, v)
+ GiveWeaponComponentToWeaponObject(pickupObject, component.hash)
+ end
+
+ setObjectProperties(pickupObject)
+ else
+ ESX.Game.SpawnLocalObject("prop_money_bag_01", coords, setObjectProperties)
+ end
+ end)
+
+ RegisterNetEvent("esx:createMissingPickups")
+ AddEventHandler("esx:createMissingPickups", function(missingPickups)
+ for pickupId, pickup in pairs(missingPickups) do
+ TriggerEvent("esx:createPickup", pickupId, pickup.label, vector3(pickup.coords.x, pickup.coords.y, pickup.coords.z - 1.0), pickup.type, pickup.name, pickup.components, pickup.tintIndex)
+ end
+ end)
end
RegisterNetEvent("esx:registerSuggestions")
AddEventHandler("esx:registerSuggestions", function(registeredCommands)
- for name, command in pairs(registeredCommands) do
- if command.suggestion then
- TriggerEvent(
- "chat:addSuggestion",
- ("/%s"):format(name),
- command.suggestion.help,
- command.suggestion.arguments
- )
- end
- end
+ for name, command in pairs(registeredCommands) do
+ if command.suggestion then
+ TriggerEvent("chat:addSuggestion", ("/%s"):format(name), command.suggestion.help, command.suggestion.arguments)
+ end
+ end
end)
if not Config.OxInventory then
- RegisterNetEvent("esx:removePickup")
- AddEventHandler("esx:removePickup", function(pickupId)
- if pickups[pickupId] and pickups[pickupId].obj then
- ESX.Game.DeleteObject(pickups[pickupId].obj)
- pickups[pickupId] = nil
- end
- end)
+ RegisterNetEvent("esx:removePickup")
+ AddEventHandler("esx:removePickup", function(pickupId)
+ if pickups[pickupId] and pickups[pickupId].obj then
+ ESX.Game.DeleteObject(pickups[pickupId].obj)
+ pickups[pickupId] = nil
+ end
+ end)
end
function StartServerSyncLoops()
- if not Config.OxInventory then
- -- keep track of ammo
-
- CreateThread(function()
- local currentWeapon = { Ammo = 0 }
- while ESX.PlayerLoaded do
- local sleep = 1500
- if GetSelectedPedWeapon(ESX.PlayerData.ped) ~= -1569615261 then
- sleep = 1000
- local _, weaponHash = GetCurrentPedWeapon(ESX.PlayerData.ped, true)
- local weapon = ESX.GetWeaponFromHash(weaponHash)
- if weapon then
- local ammoCount = GetAmmoInPedWeapon(ESX.PlayerData.ped, weaponHash)
- if weapon.name ~= currentWeapon.name then
- currentWeapon.Ammo = ammoCount
- currentWeapon.name = weapon.name
- else
- if ammoCount ~= currentWeapon.Ammo then
- currentWeapon.Ammo = ammoCount
- TriggerServerEvent("esx:updateWeaponAmmo", weapon.name, ammoCount)
- end
- end
- end
- end
- Wait(sleep)
- end
- end)
- end
+ if not Config.OxInventory then
+ -- keep track of ammo
+
+ CreateThread(function()
+ local currentWeapon = { Ammo = 0 }
+ while ESX.PlayerLoaded do
+ local sleep = 1500
+ if GetSelectedPedWeapon(ESX.PlayerData.ped) ~= -1569615261 then
+ sleep = 1000
+ local _, weaponHash = GetCurrentPedWeapon(ESX.PlayerData.ped, true)
+ local weapon = ESX.GetWeaponFromHash(weaponHash)
+ if weapon then
+ local ammoCount = GetAmmoInPedWeapon(ESX.PlayerData.ped, weaponHash)
+ if weapon.name ~= currentWeapon.name then
+ currentWeapon.Ammo = ammoCount
+ currentWeapon.name = weapon.name
+ else
+ if ammoCount ~= currentWeapon.Ammo then
+ currentWeapon.Ammo = ammoCount
+ TriggerServerEvent("esx:updateWeaponAmmo", weapon.name, ammoCount)
+ end
+ end
+ end
+ end
+ Wait(sleep)
+ end
+ end)
+ end
end
if not Config.OxInventory and Config.EnableDefaultInventory then
- ESX.RegisterInput("showinv", TranslateCap("keymap_showinventory"), "keyboard", "F2", function()
- if not ESX.PlayerData.dead then
- ESX.ShowInventory()
- end
- end)
+ ESX.RegisterInput("showinv", TranslateCap("keymap_showinventory"), "keyboard", "F2", function()
+ if not ESX.PlayerData.dead then
+ ESX.ShowInventory()
+ end
+ end)
end
-- disable wanted level
if not Config.EnableWantedLevel then
- ClearPlayerWantedLevel(PlayerId())
- SetMaxWantedLevel(0)
+ ClearPlayerWantedLevel(PlayerId())
+ SetMaxWantedLevel(0)
end
if not Config.OxInventory then
- CreateThread(function()
- while true do
- local Sleep = 1500
- local playerCoords = GetEntityCoords(ESX.PlayerData.ped)
- local _, closestDistance = ESX.Game.GetClosestPlayer(playerCoords)
-
- for pickupId, pickup in pairs(pickups) do
- local distance = #(playerCoords - pickup.coords)
-
- if distance < 5 then
- Sleep = 0
- local label = pickup.label
-
- if distance < 1 then
- if IsControlJustReleased(0, 38) then
- if
- IsPedOnFoot(ESX.PlayerData.ped)
- and (closestDistance == -1 or closestDistance > 3)
- and not pickup.inRange
- then
- pickup.inRange = true
-
- local dict, anim =
- "weapons@first_person@aim_rng@generic@projectile@sticky_bomb@", "plant_floor"
- ESX.Streaming.RequestAnimDict(dict)
- TaskPlayAnim(
- ESX.PlayerData.ped,
- dict,
- anim,
- 8.0,
- 1.0,
- 1000,
- 16,
- 0.0,
- false,
- false,
- false
- )
- RemoveAnimDict(dict)
- Wait(1000)
-
- TriggerServerEvent("esx:onPickup", pickupId)
- PlaySoundFrontend(-1, "PICK_UP", "HUD_FRONTEND_DEFAULT_SOUNDSET", false)
- end
- end
-
- label = ("%s~n~%s"):format(label, TranslateCap("threw_pickup_prompt"))
- end
-
- ESX.Game.Utils.DrawText3D({
- x = pickup.coords.x,
- y = pickup.coords.y,
- z = pickup.coords.z + 0.25,
- }, label, 1.2, 1)
- elseif pickup.inRange then
- pickup.inRange = false
- end
- end
- Wait(Sleep)
- end
- end)
+ CreateThread(function()
+ while true do
+ local Sleep = 1500
+ local playerCoords = GetEntityCoords(ESX.PlayerData.ped)
+ local _, closestDistance = ESX.Game.GetClosestPlayer(playerCoords)
+
+ for pickupId, pickup in pairs(pickups) do
+ local distance = #(playerCoords - pickup.coords)
+
+ if distance < 5 then
+ Sleep = 0
+ local label = pickup.label
+
+ if distance < 1 then
+ if IsControlJustReleased(0, 38) then
+ if IsPedOnFoot(ESX.PlayerData.ped) and (closestDistance == -1 or closestDistance > 3) and not pickup.inRange then
+ pickup.inRange = true
+
+ local dict, anim = "weapons@first_person@aim_rng@generic@projectile@sticky_bomb@", "plant_floor"
+ ESX.Streaming.RequestAnimDict(dict)
+ TaskPlayAnim(ESX.PlayerData.ped, dict, anim, 8.0, 1.0, 1000, 16, 0.0, false, false, false)
+ RemoveAnimDict(dict)
+ Wait(1000)
+
+ TriggerServerEvent("esx:onPickup", pickupId)
+ PlaySoundFrontend(-1, "PICK_UP", "HUD_FRONTEND_DEFAULT_SOUNDSET", false)
+ end
+ end
+
+ label = ("%s~n~%s"):format(label, TranslateCap("threw_pickup_prompt"))
+ end
+
+ ESX.Game.Utils.DrawText3D({
+ x = pickup.coords.x,
+ y = pickup.coords.y,
+ z = pickup.coords.z + 0.25,
+ }, label, 1.2, 1)
+ elseif pickup.inRange then
+ pickup.inRange = false
+ end
+ end
+ Wait(Sleep)
+ end
+ end)
end
----- Admin commands from esx_adminplus
RegisterNetEvent("esx:tpm")
AddEventHandler("esx:tpm", function()
- local GetEntityCoords = GetEntityCoords
- local GetGroundZFor_3dCoord = GetGroundZFor_3dCoord
- local GetFirstBlipInfoId = GetFirstBlipInfoId
- local DoesBlipExist = DoesBlipExist
- local DoScreenFadeOut = DoScreenFadeOut
- local GetBlipInfoIdCoord = GetBlipInfoIdCoord
- local GetVehiclePedIsIn = GetVehiclePedIsIn
-
- ESX.TriggerServerCallback("esx:isUserAdmin", function(admin)
- if not admin then
- return
- end
- local blipMarker = GetFirstBlipInfoId(8)
- if not DoesBlipExist(blipMarker) then
- ESX.ShowNotification(TranslateCap("tpm_nowaypoint"), true, false, 140)
- return "marker"
- end
-
- -- Fade screen to hide how clients get teleported.
- DoScreenFadeOut(650)
- while not IsScreenFadedOut() do
- Wait(0)
- end
-
- local ped, coords = ESX.PlayerData.ped, GetBlipInfoIdCoord(blipMarker)
- local vehicle = GetVehiclePedIsIn(ped, false)
- local oldCoords = GetEntityCoords(ped)
-
- -- Unpack coords instead of having to unpack them while iterating.
- -- 825.0 seems to be the max a player can reach while 0.0 being the lowest.
- local x, y, groundZ, Z_START = coords["x"], coords["y"], 850.0, 950.0
- local found = false
- FreezeEntityPosition(vehicle > 0 and vehicle or ped, true)
-
- for i = Z_START, 0, -25.0 do
- local z = i
- if (i % 2) ~= 0 then
- z = Z_START - i
- end
-
- NewLoadSceneStart(x, y, z, x, y, z, 50.0, 0)
- local curTime = GetGameTimer()
- while IsNetworkLoadingScene() do
- if GetGameTimer() - curTime > 1000 then
- break
- end
- Wait(0)
- end
- NewLoadSceneStop()
- SetPedCoordsKeepVehicle(ped, x, y, z)
-
- while not HasCollisionLoadedAroundEntity(ped) do
- RequestCollisionAtCoord(x, y, z)
- if GetGameTimer() - curTime > 1000 then
- break
- end
- Wait(0)
- end
-
- -- Get ground coord. As mentioned in the natives, this only works if the client is in render distance.
- found, groundZ = GetGroundZFor_3dCoord(x, y, z, false)
- if found then
- Wait(0)
- SetPedCoordsKeepVehicle(ped, x, y, groundZ)
- break
- end
- Wait(0)
- end
-
- -- Remove black screen once the loop has ended.
- DoScreenFadeIn(650)
- FreezeEntityPosition(vehicle > 0 and vehicle or ped, false)
-
- if not found then
- -- If we can't find the coords, set the coords to the old ones.
- -- We don't unpack them before since they aren't in a loop and only called once.
- SetPedCoordsKeepVehicle(ped, oldCoords["x"], oldCoords["y"], oldCoords["z"] - 1.0)
- ESX.ShowNotification(TranslateCap("tpm_success"), true, false, 140)
- end
-
- -- If Z coord was found, set coords in found coords.
- SetPedCoordsKeepVehicle(ped, x, y, groundZ)
- ESX.ShowNotification(TranslateCap("tpm_success"), true, false, 140)
- end)
+ local GetEntityCoords = GetEntityCoords
+ local GetGroundZFor_3dCoord = GetGroundZFor_3dCoord
+ local GetFirstBlipInfoId = GetFirstBlipInfoId
+ local DoesBlipExist = DoesBlipExist
+ local DoScreenFadeOut = DoScreenFadeOut
+ local GetBlipInfoIdCoord = GetBlipInfoIdCoord
+ local GetVehiclePedIsIn = GetVehiclePedIsIn
+
+ ESX.TriggerServerCallback("esx:isUserAdmin", function(admin)
+ if not admin then
+ return
+ end
+ local blipMarker = GetFirstBlipInfoId(8)
+ if not DoesBlipExist(blipMarker) then
+ ESX.ShowNotification(TranslateCap("tpm_nowaypoint"), true, false, 140)
+ return "marker"
+ end
+
+ -- Fade screen to hide how clients get teleported.
+ DoScreenFadeOut(650)
+ while not IsScreenFadedOut() do
+ Wait(0)
+ end
+
+ local ped, coords = ESX.PlayerData.ped, GetBlipInfoIdCoord(blipMarker)
+ local vehicle = GetVehiclePedIsIn(ped, false)
+ local oldCoords = GetEntityCoords(ped)
+
+ -- Unpack coords instead of having to unpack them while iterating.
+ -- 825.0 seems to be the max a player can reach while 0.0 being the lowest.
+ local x, y, groundZ, Z_START = coords["x"], coords["y"], 850.0, 950.0
+ local found = false
+ FreezeEntityPosition(vehicle > 0 and vehicle or ped, true)
+
+ for i = Z_START, 0, -25.0 do
+ local z = i
+ if (i % 2) ~= 0 then
+ z = Z_START - i
+ end
+
+ NewLoadSceneStart(x, y, z, x, y, z, 50.0, 0)
+ local curTime = GetGameTimer()
+ while IsNetworkLoadingScene() do
+ if GetGameTimer() - curTime > 1000 then
+ break
+ end
+ Wait(0)
+ end
+ NewLoadSceneStop()
+ SetPedCoordsKeepVehicle(ped, x, y, z)
+
+ while not HasCollisionLoadedAroundEntity(ped) do
+ RequestCollisionAtCoord(x, y, z)
+ if GetGameTimer() - curTime > 1000 then
+ break
+ end
+ Wait(0)
+ end
+
+ -- Get ground coord. As mentioned in the natives, this only works if the client is in render distance.
+ found, groundZ = GetGroundZFor_3dCoord(x, y, z, false)
+ if found then
+ Wait(0)
+ SetPedCoordsKeepVehicle(ped, x, y, groundZ)
+ break
+ end
+ Wait(0)
+ end
+
+ -- Remove black screen once the loop has ended.
+ DoScreenFadeIn(650)
+ FreezeEntityPosition(vehicle > 0 and vehicle or ped, false)
+
+ if not found then
+ -- If we can't find the coords, set the coords to the old ones.
+ -- We don't unpack them before since they aren't in a loop and only called once.
+ SetPedCoordsKeepVehicle(ped, oldCoords["x"], oldCoords["y"], oldCoords["z"] - 1.0)
+ ESX.ShowNotification(TranslateCap("tpm_success"), true, false, 140)
+ end
+
+ -- If Z coord was found, set coords in found coords.
+ SetPedCoordsKeepVehicle(ped, x, y, groundZ)
+ ESX.ShowNotification(TranslateCap("tpm_success"), true, false, 140)
+ end)
end)
local noclip = false
@@ -664,105 +610,100 @@ local noclip_pos = vector3(0, 0, 70)
local heading = 0
local function noclipThread()
- while noclip do
- SetEntityCoordsNoOffset(ESX.PlayerData.ped, noclip_pos.x, noclip_pos.y, noclip_pos.z, 0, 0, 0)
-
- if IsControlPressed(1, 34) then
- heading = heading + 1.5
- if heading > 360 then
- heading = 0
- end
-
- SetEntityHeading(ESX.PlayerData.ped, heading)
- end
-
- if IsControlPressed(1, 9) then
- heading = heading - 1.5
- if heading < 0 then
- heading = 360
- end
-
- SetEntityHeading(ESX.PlayerData.ped, heading)
- end
-
- if IsControlPressed(1, 8) then
- noclip_pos = GetOffsetFromEntityInWorldCoords(ESX.PlayerData.ped, 0.0, 1.0, 0.0)
- end
-
- if IsControlPressed(1, 32) then
- noclip_pos = GetOffsetFromEntityInWorldCoords(ESX.PlayerData.ped, 0.0, -1.0, 0.0)
- end
-
- if IsControlPressed(1, 27) then
- noclip_pos = GetOffsetFromEntityInWorldCoords(ESX.PlayerData.ped, 0.0, 0.0, 1.0)
- end
-
- if IsControlPressed(1, 173) then
- noclip_pos = GetOffsetFromEntityInWorldCoords(ESX.PlayerData.ped, 0.0, 0.0, -1.0)
- end
- Wait(0)
- end
+ while noclip do
+ SetEntityCoordsNoOffset(ESX.PlayerData.ped, noclip_pos.x, noclip_pos.y, noclip_pos.z, 0, 0, 0)
+
+ if IsControlPressed(1, 34) then
+ heading = heading + 1.5
+ if heading > 360 then
+ heading = 0
+ end
+
+ SetEntityHeading(ESX.PlayerData.ped, heading)
+ end
+
+ if IsControlPressed(1, 9) then
+ heading = heading - 1.5
+ if heading < 0 then
+ heading = 360
+ end
+
+ SetEntityHeading(ESX.PlayerData.ped, heading)
+ end
+
+ if IsControlPressed(1, 8) then
+ noclip_pos = GetOffsetFromEntityInWorldCoords(ESX.PlayerData.ped, 0.0, 1.0, 0.0)
+ end
+
+ if IsControlPressed(1, 32) then
+ noclip_pos = GetOffsetFromEntityInWorldCoords(ESX.PlayerData.ped, 0.0, -1.0, 0.0)
+ end
+
+ if IsControlPressed(1, 27) then
+ noclip_pos = GetOffsetFromEntityInWorldCoords(ESX.PlayerData.ped, 0.0, 0.0, 1.0)
+ end
+
+ if IsControlPressed(1, 173) then
+ noclip_pos = GetOffsetFromEntityInWorldCoords(ESX.PlayerData.ped, 0.0, 0.0, -1.0)
+ end
+ Wait(0)
+ end
end
RegisterNetEvent("esx:noclip")
AddEventHandler("esx:noclip", function()
- ESX.TriggerServerCallback("esx:isUserAdmin", function(admin)
- if not admin then
- return
- end
-
- if not noclip then
- noclip_pos = GetEntityCoords(ESX.PlayerData.ped, false)
- heading = GetEntityHeading(ESX.PlayerData.ped)
- end
-
- noclip = not noclip
- if noclip then
- CreateThread(noclipThread)
- end
-
- ESX.ShowNotification(
- TranslateCap("noclip_message", noclip and Translate("enabled") or Translate("disabled")),
- true,
- false,
- 140
- )
- end)
+ ESX.TriggerServerCallback("esx:isUserAdmin", function(admin)
+ if not admin then
+ return
+ end
+
+ if not noclip then
+ noclip_pos = GetEntityCoords(ESX.PlayerData.ped, false)
+ heading = GetEntityHeading(ESX.PlayerData.ped)
+ end
+
+ noclip = not noclip
+ if noclip then
+ CreateThread(noclipThread)
+ end
+
+ ESX.ShowNotification(TranslateCap("noclip_message", noclip and Translate("enabled") or Translate("disabled")), true, false, 140)
+ end)
end)
RegisterNetEvent("esx:killPlayer")
AddEventHandler("esx:killPlayer", function()
- SetEntityHealth(ESX.PlayerData.ped, 0)
+ SetEntityHealth(ESX.PlayerData.ped, 0)
end)
RegisterNetEvent("esx:repairPedVehicle")
AddEventHandler("esx:repairPedVehicle", function()
- local ped = ESX.PlayerData.ped
- local vehicle = GetVehiclePedIsIn(ped, false)
- SetVehicleEngineHealth(vehicle, 1000)
- SetVehicleEngineOn(vehicle, true, true)
- SetVehicleFixed(vehicle)
- SetVehicleDirtLevel(vehicle, 0)
+ local ped = ESX.PlayerData.ped
+ local vehicle = GetVehiclePedIsIn(ped, false)
+ SetVehicleEngineHealth(vehicle, 1000)
+ SetVehicleEngineOn(vehicle, true, true)
+ SetVehicleFixed(vehicle)
+ SetVehicleDirtLevel(vehicle, 0)
end)
RegisterNetEvent("esx:freezePlayer")
AddEventHandler("esx:freezePlayer", function(input)
- local player = PlayerId()
- if input == "freeze" then
- SetEntityCollision(ESX.PlayerData.ped, false)
- FreezeEntityPosition(ESX.PlayerData.ped, true)
- SetPlayerInvincible(player, true)
- elseif input == "unfreeze" then
- SetEntityCollision(ESX.PlayerData.ped, true)
- FreezeEntityPosition(ESX.PlayerData.ped, false)
- SetPlayerInvincible(player, false)
- end
+ local player = PlayerId()
+ if input == "freeze" then
+ SetEntityCollision(ESX.PlayerData.ped, false)
+ FreezeEntityPosition(ESX.PlayerData.ped, true)
+ SetPlayerInvincible(player, true)
+ elseif input == "unfreeze" then
+ SetEntityCollision(ESX.PlayerData.ped, true)
+ FreezeEntityPosition(ESX.PlayerData.ped, false)
+ SetPlayerInvincible(player, false)
+ end
end)
ESX.RegisterClientCallback("esx:GetVehicleType", function(cb, model)
- cb(ESX.GetVehicleType(model))
+ cb(ESX.GetVehicleType(model))
end)
AddStateBagChangeHandler("metadata", "player:" .. tostring(GetPlayerServerId(PlayerId())), function(_, key, val)
- ESX.SetPlayerData(key, val)
+ ESX.SetPlayerData(key, val)
end)
diff --git a/server-data/resources/[esx]/es_extended/client/modules/actions.lua b/server-data/resources/[esx]/es_extended/client/modules/actions.lua
index de94e476b..0fec45849 100644
--- a/server-data/resources/[esx]/es_extended/client/modules/actions.lua
+++ b/server-data/resources/[esx]/es_extended/client/modules/actions.lua
@@ -3,168 +3,118 @@ local playerPed = PlayerPedId()
local current = {}
local function GetPedVehicleSeat(ped, vehicle)
- for i = -1, 16 do
- if GetPedInVehicleSeat(vehicle, i) == ped then
- return i
- end
- end
- return -1
+ for i = -1, 16 do
+ if GetPedInVehicleSeat(vehicle, i) == ped then
+ return i
+ end
+ end
+ return -1
end
local function GetData(vehicle)
- if not DoesEntityExist(vehicle) then
- return
- end
- local model = GetEntityModel(vehicle)
- local displayName = GetDisplayNameFromVehicleModel(model)
- local netId = vehicle
- if NetworkGetEntityIsNetworked(vehicle) then
- netId = VehToNet(vehicle)
- end
- return displayName, netId
+ if not DoesEntityExist(vehicle) then
+ return
+ end
+ local model = GetEntityModel(vehicle)
+ local displayName = GetDisplayNameFromVehicleModel(model)
+ local netId = vehicle
+ if NetworkGetEntityIsNetworked(vehicle) then
+ netId = VehToNet(vehicle)
+ end
+ return displayName, netId
end
CreateThread(function()
- while not ESX.PlayerLoaded do
- Wait(200)
- end
- while true do
- ESX.SetPlayerData("coords", GetEntityCoords(playerPed))
- if playerPed ~= PlayerPedId() then
- playerPed = PlayerPedId()
- ESX.SetPlayerData("ped", playerPed)
- TriggerEvent("esx:playerPedChanged", playerPed)
- TriggerServerEvent("esx:playerPedChanged", PedToNet(playerPed))
- if Config.DisableHealthRegeneration then
- SetPlayerHealthRechargeMultiplier(PlayerId(), 0.0)
- end
- end
+ while not ESX.PlayerLoaded do Wait(200) end
+ while true do
+ ESX.SetPlayerData("coords", GetEntityCoords(playerPed))
+ if playerPed ~= PlayerPedId() then
+ playerPed = PlayerPedId()
+ ESX.SetPlayerData("ped", playerPed)
+ TriggerEvent("esx:playerPedChanged", playerPed)
+ TriggerServerEvent("esx:playerPedChanged", PedToNet(playerPed))
+ if Config.DisableHealthRegeneration then
+ SetPlayerHealthRechargeMultiplier(PlayerId(), 0.0)
+ end
+ end
- if IsPedJumping(playerPed) and not isJumping then
- isJumping = true
- TriggerEvent("esx:playerJumping")
- TriggerServerEvent("esx:playerJumping")
- elseif not IsPedJumping(playerPed) and isJumping then
- isJumping = false
- end
+ if IsPedJumping(playerPed) and not isJumping then
+ isJumping = true
+ TriggerEvent("esx:playerJumping")
+ TriggerServerEvent("esx:playerJumping")
+ elseif not IsPedJumping(playerPed) and isJumping then
+ isJumping = false
+ end
- if IsPauseMenuActive() and not inPauseMenu then
- inPauseMenu = true
- TriggerEvent("esx:pauseMenuActive", inPauseMenu)
- elseif not IsPauseMenuActive() and inPauseMenu then
- inPauseMenu = false
- TriggerEvent("esx:pauseMenuActive", inPauseMenu)
- end
+ if IsPauseMenuActive() and not inPauseMenu then
+ inPauseMenu = true
+ TriggerEvent("esx:pauseMenuActive", inPauseMenu)
+ elseif not IsPauseMenuActive() and inPauseMenu then
+ inPauseMenu = false
+ TriggerEvent("esx:pauseMenuActive", inPauseMenu)
+ end
- if not isInVehicle and not IsPlayerDead(PlayerId()) then
- if DoesEntityExist(GetVehiclePedIsTryingToEnter(playerPed)) and not isEnteringVehicle then
- -- trying to enter a vehicle!
- local vehicle = GetVehiclePedIsTryingToEnter(playerPed)
- local plate = GetVehicleNumberPlateText(vehicle)
- local seat = GetSeatPedIsTryingToEnter(playerPed)
- local _, netId = GetData(vehicle)
- isEnteringVehicle = true
- TriggerEvent("esx:enteringVehicle", vehicle, plate, seat, netId)
- TriggerServerEvent("esx:enteringVehicle", plate, seat, netId)
- elseif
- not DoesEntityExist(GetVehiclePedIsTryingToEnter(playerPed))
- and not IsPedInAnyVehicle(playerPed, true)
- and isEnteringVehicle
- then
- -- vehicle entering aborted
- TriggerEvent("esx:enteringVehicleAborted")
- TriggerServerEvent("esx:enteringVehicleAborted")
- isEnteringVehicle = false
- elseif IsPedInAnyVehicle(playerPed, false) then
- -- suddenly appeared in a vehicle, possible teleport
- isEnteringVehicle = false
- isInVehicle = true
- current.vehicle = GetVehiclePedIsUsing(playerPed)
- current.seat = GetPedVehicleSeat(playerPed, current.vehicle)
- current.plate = GetVehicleNumberPlateText(current.vehicle)
- current.displayName, current.netId = GetData(current.vehicle)
- TriggerEvent(
- "esx:enteredVehicle",
- current.vehicle,
- current.plate,
- current.seat,
- current.displayName,
- current.netId
- )
- TriggerServerEvent(
- "esx:enteredVehicle",
- current.plate,
- current.seat,
- current.displayName,
- current.netId
- )
- end
- elseif isInVehicle then
- if not IsPedInAnyVehicle(playerPed, false) or IsPlayerDead(PlayerId()) then
- -- bye, vehicle
- TriggerEvent(
- "esx:exitedVehicle",
- current.vehicle,
- current.plate,
- current.seat,
- current.displayName,
- current.netId
- )
- TriggerServerEvent("esx:exitedVehicle", current.plate, current.seat, current.displayName, current.netId)
- isInVehicle = false
- current = {}
- end
- end
- Wait(200)
- end
+ if not isInVehicle and not IsPlayerDead(PlayerId()) then
+ if DoesEntityExist(GetVehiclePedIsTryingToEnter(playerPed)) and not isEnteringVehicle then
+ -- trying to enter a vehicle!
+ local vehicle = GetVehiclePedIsTryingToEnter(playerPed)
+ local plate = GetVehicleNumberPlateText(vehicle)
+ local seat = GetSeatPedIsTryingToEnter(playerPed)
+ local _, netId = GetData(vehicle)
+ isEnteringVehicle = true
+ TriggerEvent("esx:enteringVehicle", vehicle, plate, seat, netId)
+ TriggerServerEvent("esx:enteringVehicle", plate, seat, netId)
+ elseif not DoesEntityExist(GetVehiclePedIsTryingToEnter(playerPed)) and not IsPedInAnyVehicle(playerPed, true) and isEnteringVehicle then
+ -- vehicle entering aborted
+ TriggerEvent("esx:enteringVehicleAborted")
+ TriggerServerEvent("esx:enteringVehicleAborted")
+ isEnteringVehicle = false
+ elseif IsPedInAnyVehicle(playerPed, false) then
+ -- suddenly appeared in a vehicle, possible teleport
+ isEnteringVehicle = false
+ isInVehicle = true
+ current.vehicle = GetVehiclePedIsUsing(playerPed)
+ current.seat = GetPedVehicleSeat(playerPed, current.vehicle)
+ current.plate = GetVehicleNumberPlateText(current.vehicle)
+ current.displayName, current.netId = GetData(current.vehicle)
+ TriggerEvent("esx:enteredVehicle", current.vehicle, current.plate, current.seat, current.displayName, current.netId)
+ TriggerServerEvent("esx:enteredVehicle", current.plate, current.seat, current.displayName, current.netId)
+ end
+ elseif isInVehicle then
+ if not IsPedInAnyVehicle(playerPed, false) or IsPlayerDead(PlayerId()) then
+ -- bye, vehicle
+ TriggerEvent("esx:exitedVehicle", current.vehicle, current.plate, current.seat, current.displayName, current.netId)
+ TriggerServerEvent("esx:exitedVehicle", current.plate, current.seat, current.displayName, current.netId)
+ isInVehicle = false
+ current = {}
+ end
+ end
+ Wait(200)
+ end
end)
if Config.EnableDebug then
- AddEventHandler("esx:playerPedChanged", function(netId)
- print("esx:playerPedChanged", netId)
- end)
+ AddEventHandler("esx:playerPedChanged", function(netId)
+ print("esx:playerPedChanged", netId)
+ end)
- AddEventHandler("esx:playerJumping", function()
- print("esx:playerJumping")
- end)
+ AddEventHandler("esx:playerJumping", function()
+ print("esx:playerJumping")
+ end)
- AddEventHandler("esx:enteringVehicle", function(vehicle, plate, seat, netId)
- print("esx:enteringVehicle", "vehicle", vehicle, "plate", plate, "seat", seat, "netId", netId)
- end)
+ AddEventHandler("esx:enteringVehicle", function(vehicle, plate, seat, netId)
+ print("esx:enteringVehicle", "vehicle", vehicle, "plate", plate, "seat", seat, "netId", netId)
+ end)
- AddEventHandler("esx:enteringVehicleAborted", function()
- print("esx:enteringVehicleAborted")
- end)
+ AddEventHandler("esx:enteringVehicleAborted", function()
+ print("esx:enteringVehicleAborted")
+ end)
- AddEventHandler("esx:enteredVehicle", function(vehicle, plate, seat, displayName, netId)
- print(
- "esx:enteredVehicle",
- "vehicle",
- vehicle,
- "plate",
- plate,
- "seat",
- seat,
- "displayName",
- displayName,
- "netId",
- netId
- )
- end)
+ AddEventHandler("esx:enteredVehicle", function(vehicle, plate, seat, displayName, netId)
+ print("esx:enteredVehicle", "vehicle", vehicle, "plate", plate, "seat", seat, "displayName", displayName, "netId", netId)
+ end)
- AddEventHandler("esx:exitedVehicle", function(vehicle, plate, seat, displayName, netId)
- print(
- "esx:exitedVehicle",
- "vehicle",
- vehicle,
- "plate",
- plate,
- "seat",
- seat,
- "displayName",
- displayName,
- "netId",
- netId
- )
- end)
+ AddEventHandler("esx:exitedVehicle", function(vehicle, plate, seat, displayName, netId)
+ print("esx:exitedVehicle", "vehicle", vehicle, "plate", plate, "seat", seat, "displayName", displayName, "netId", netId)
+ end)
end
diff --git a/server-data/resources/[esx]/es_extended/client/modules/callback.lua b/server-data/resources/[esx]/es_extended/client/modules/callback.lua
index c77000786..cf58c391c 100644
--- a/server-data/resources/[esx]/es_extended/client/modules/callback.lua
+++ b/server-data/resources/[esx]/es_extended/client/modules/callback.lua
@@ -7,44 +7,34 @@ local clientCallbacks = {}
---@param callback function
---@param ... any
ESX.TriggerServerCallback = function(eventName, callback, ...)
- serverRequests[RequestId] = callback
+ serverRequests[RequestId] = callback
- TriggerServerEvent("esx:triggerServerCallback", eventName, RequestId, GetInvokingResource() or "unknown", ...)
+ TriggerServerEvent("esx:triggerServerCallback", eventName, RequestId, GetInvokingResource() or "unknown", ...)
- RequestId = RequestId + 1
+ RequestId = RequestId + 1
end
RegisterNetEvent("esx:serverCallback", function(requestId, invoker, ...)
- if not serverRequests[requestId] then
- return print(
- ("[^1ERROR^7] Server Callback with requestId ^5%s^7 Was Called by ^5%s^7 but does not exist."):format(
- requestId,
- invoker
- )
- )
- end
-
- serverRequests[requestId](...)
- serverRequests[requestId] = nil
+ if not serverRequests[requestId] then
+ return print(("[^1ERROR^7] Server Callback with requestId ^5%s^7 Was Called by ^5%s^7 but does not exist."):format(requestId, invoker))
+ end
+
+ serverRequests[requestId](...)
+ serverRequests[requestId] = nil
end)
---@param eventName string
---@param callback function
ESX.RegisterClientCallback = function(eventName, callback)
- clientCallbacks[eventName] = callback
+ clientCallbacks[eventName] = callback
end
RegisterNetEvent("esx:triggerClientCallback", function(eventName, requestId, invoker, ...)
- if not clientCallbacks[eventName] then
- return print(
- ("[^1ERROR^7] Client Callback not registered, name: ^5%s^7, invoker resource: ^5%s^7"):format(
- eventName,
- invoker
- )
- )
- end
-
- clientCallbacks[eventName](function(...)
- TriggerServerEvent("esx:clientCallback", requestId, invoker, ...)
- end, ...)
+ if not clientCallbacks[eventName] then
+ return print(("[^1ERROR^7] Client Callback not registered, name: ^5%s^7, invoker resource: ^5%s^7"):format(eventName, invoker))
+ end
+
+ clientCallbacks[eventName](function(...)
+ TriggerServerEvent("esx:clientCallback", requestId, invoker, ...)
+ end, ...)
end)
diff --git a/server-data/resources/[esx]/es_extended/client/modules/death.lua b/server-data/resources/[esx]/es_extended/client/modules/death.lua
index eac7f86ef..ed3347f07 100644
--- a/server-data/resources/[esx]/es_extended/client/modules/death.lua
+++ b/server-data/resources/[esx]/es_extended/client/modules/death.lua
@@ -1,72 +1,56 @@
AddEventHandler("gameEventTriggered", function(event, data)
- if event ~= "CEventNetworkEntityDamage" then
- return
- end
- local victim, victimDied = data[1], data[4]
- if not IsPedAPlayer(victim) then
- return
- end
- local player = PlayerId()
- local playerPed = PlayerPedId()
- if
- victimDied
- and NetworkGetPlayerIndexFromPed(victim) == player
- and (IsPedDeadOrDying(victim, true) or IsPedFatallyInjured(victim))
- then
- local killerEntity, deathCause = GetPedSourceOfDeath(playerPed), GetPedCauseOfDeath(playerPed)
- local killerClientId = NetworkGetPlayerIndexFromPed(killerEntity)
- if killerEntity ~= playerPed and killerClientId and NetworkIsPlayerActive(killerClientId) then
- PlayerKilledByPlayer(GetPlayerServerId(killerClientId), killerClientId, deathCause)
- else
- PlayerKilled(deathCause)
- end
- end
+ if event ~= "CEventNetworkEntityDamage" then
+ return
+ end
+ local victim, victimDied = data[1], data[4]
+ if not IsPedAPlayer(victim) then
+ return
+ end
+ local player = PlayerId()
+ local playerPed = PlayerPedId()
+ if victimDied and NetworkGetPlayerIndexFromPed(victim) == player and (IsPedDeadOrDying(victim, true) or IsPedFatallyInjured(victim)) then
+ local killerEntity, deathCause = GetPedSourceOfDeath(playerPed), GetPedCauseOfDeath(playerPed)
+ local killerClientId = NetworkGetPlayerIndexFromPed(killerEntity)
+ if killerEntity ~= playerPed and killerClientId and NetworkIsPlayerActive(killerClientId) then
+ PlayerKilledByPlayer(GetPlayerServerId(killerClientId), killerClientId, deathCause)
+ else
+ PlayerKilled(deathCause)
+ end
+ end
end)
function PlayerKilledByPlayer(killerServerId, killerClientId, deathCause)
- local victimCoords = GetEntityCoords(PlayerPedId())
- local killerCoords = GetEntityCoords(GetPlayerPed(killerClientId))
- local distance = #(victimCoords - killerCoords)
+ local victimCoords = GetEntityCoords(PlayerPedId())
+ local killerCoords = GetEntityCoords(GetPlayerPed(killerClientId))
+ local distance = #(victimCoords - killerCoords)
- local data = {
- victimCoords = {
- x = ESX.Math.Round(victimCoords.x, 1),
- y = ESX.Math.Round(victimCoords.y, 1),
- z = ESX.Math.Round(victimCoords.z, 1),
- },
- killerCoords = {
- x = ESX.Math.Round(killerCoords.x, 1),
- y = ESX.Math.Round(killerCoords.y, 1),
- z = ESX.Math.Round(killerCoords.z, 1),
- },
+ local data = {
+ victimCoords = { x = ESX.Math.Round(victimCoords.x, 1), y = ESX.Math.Round(victimCoords.y, 1), z = ESX.Math.Round(victimCoords.z, 1) },
+ killerCoords = { x = ESX.Math.Round(killerCoords.x, 1), y = ESX.Math.Round(killerCoords.y, 1), z = ESX.Math.Round(killerCoords.z, 1) },
- killedByPlayer = true,
- deathCause = deathCause,
- distance = ESX.Math.Round(distance, 1),
+ killedByPlayer = true,
+ deathCause = deathCause,
+ distance = ESX.Math.Round(distance, 1),
- killerServerId = killerServerId,
- killerClientId = killerClientId,
- }
+ killerServerId = killerServerId,
+ killerClientId = killerClientId,
+ }
- TriggerEvent("esx:onPlayerDeath", data)
- TriggerServerEvent("esx:onPlayerDeath", data)
+ TriggerEvent("esx:onPlayerDeath", data)
+ TriggerServerEvent("esx:onPlayerDeath", data)
end
function PlayerKilled(deathCause)
- local playerPed = PlayerPedId()
- local victimCoords = GetEntityCoords(playerPed)
+ local playerPed = PlayerPedId()
+ local victimCoords = GetEntityCoords(playerPed)
- local data = {
- victimCoords = {
- x = ESX.Math.Round(victimCoords.x, 1),
- y = ESX.Math.Round(victimCoords.y, 1),
- z = ESX.Math.Round(victimCoords.z, 1),
- },
+ local data = {
+ victimCoords = { x = ESX.Math.Round(victimCoords.x, 1), y = ESX.Math.Round(victimCoords.y, 1), z = ESX.Math.Round(victimCoords.z, 1) },
- killedByPlayer = false,
- deathCause = deathCause,
- }
+ killedByPlayer = false,
+ deathCause = deathCause,
+ }
- TriggerEvent("esx:onPlayerDeath", data)
- TriggerServerEvent("esx:onPlayerDeath", data)
+ TriggerEvent("esx:onPlayerDeath", data)
+ TriggerServerEvent("esx:onPlayerDeath", data)
end
diff --git a/server-data/resources/[esx]/es_extended/client/modules/npwd.lua b/server-data/resources/[esx]/es_extended/client/modules/npwd.lua
index ddbe3b5b8..fd88354aa 100644
--- a/server-data/resources/[esx]/es_extended/client/modules/npwd.lua
+++ b/server-data/resources/[esx]/es_extended/client/modules/npwd.lua
@@ -1,57 +1,57 @@
local npwd = GetResourceState("npwd"):find("start") and exports.npwd or nil
local function checkPhone()
- if not npwd then
- return
- end
+ if not npwd then
+ return
+ end
- local phoneItem = ESX.SearchInventory("phone")
- npwd:setPhoneDisabled((phoneItem and phoneItem.count or 0) <= 0)
+ local phoneItem = ESX.SearchInventory("phone")
+ npwd:setPhoneDisabled((phoneItem and phoneItem.count or 0) <= 0)
end
RegisterNetEvent("esx:playerLoaded", checkPhone)
AddEventHandler("onClientResourceStart", function(resource)
- if resource ~= "npwd" then
- return
- end
+ if resource ~= "npwd" then
+ return
+ end
- npwd = GetResourceState("npwd"):find("start") and exports.npwd or nil
+ npwd = GetResourceState("npwd"):find("start") and exports.npwd or nil
- if ESX.PlayerLoaded then
- checkPhone()
- end
+ if ESX.PlayerLoaded then
+ checkPhone()
+ end
end)
AddEventHandler("onClientResourceStop", function(resource)
- if resource == "npwd" then
- npwd = nil
- end
+ if resource == "npwd" then
+ npwd = nil
+ end
end)
RegisterNetEvent("esx:onPlayerLogout", function()
- if not npwd then
- return
- end
+ if not npwd then
+ return
+ end
- npwd:setPhoneVisible(false)
- npwd:setPhoneDisabled(true)
+ npwd:setPhoneVisible(false)
+ npwd:setPhoneDisabled(true)
end)
RegisterNetEvent("esx:removeInventoryItem", function(item, count)
- if not npwd then
- return
- end
+ if not npwd then
+ return
+ end
- if item == "phone" and count == 0 then
- npwd:setPhoneDisabled(true)
- end
+ if item == "phone" and count == 0 then
+ npwd:setPhoneDisabled(true)
+ end
end)
RegisterNetEvent("esx:addInventoryItem", function(item)
- if not npwd or item ~= "phone" then
- return
- end
+ if not npwd or item ~= "phone" then
+ return
+ end
- npwd:setPhoneDisabled(false)
+ npwd:setPhoneDisabled(false)
end)
diff --git a/server-data/resources/[esx]/es_extended/client/modules/scaleform.lua b/server-data/resources/[esx]/es_extended/client/modules/scaleform.lua
index fa61a2732..46e20e125 100644
--- a/server-data/resources/[esx]/es_extended/client/modules/scaleform.lua
+++ b/server-data/resources/[esx]/es_extended/client/modules/scaleform.lua
@@ -1,98 +1,98 @@
function ESX.Scaleform.ShowFreemodeMessage(title, msg, sec)
- local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie("MP_BIG_MESSAGE_FREEMODE")
+ local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie("MP_BIG_MESSAGE_FREEMODE")
- BeginScaleformMovieMethod(scaleform, "SHOW_SHARD_WASTED_MP_MESSAGE")
- ScaleformMovieMethodAddParamTextureNameString(title)
- ScaleformMovieMethodAddParamTextureNameString(msg)
- EndScaleformMovieMethod()
+ BeginScaleformMovieMethod(scaleform, "SHOW_SHARD_WASTED_MP_MESSAGE")
+ ScaleformMovieMethodAddParamTextureNameString(title)
+ ScaleformMovieMethodAddParamTextureNameString(msg)
+ EndScaleformMovieMethod()
- while sec > 0 do
- Wait(0)
- sec = sec - 0.01
+ while sec > 0 do
+ Wait(0)
+ sec = sec - 0.01
- DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255)
- end
+ DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255)
+ end
- SetScaleformMovieAsNoLongerNeeded(scaleform)
+ SetScaleformMovieAsNoLongerNeeded(scaleform)
end
function ESX.Scaleform.ShowBreakingNews(title, msg, bottom, sec)
- local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie("BREAKING_NEWS")
+ local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie("BREAKING_NEWS")
- BeginScaleformMovieMethod(scaleform, "SET_TEXT")
- ScaleformMovieMethodAddParamTextureNameString(msg)
- ScaleformMovieMethodAddParamTextureNameString(bottom)
- EndScaleformMovieMethod()
+ BeginScaleformMovieMethod(scaleform, "SET_TEXT")
+ ScaleformMovieMethodAddParamTextureNameString(msg)
+ ScaleformMovieMethodAddParamTextureNameString(bottom)
+ EndScaleformMovieMethod()
- BeginScaleformMovieMethod(scaleform, "SET_SCROLL_TEXT")
- ScaleformMovieMethodAddParamInt(0) -- top ticker
- ScaleformMovieMethodAddParamInt(0) -- Since this is the first string, start at 0
- ScaleformMovieMethodAddParamTextureNameString(title)
+ BeginScaleformMovieMethod(scaleform, "SET_SCROLL_TEXT")
+ ScaleformMovieMethodAddParamInt(0) -- top ticker
+ ScaleformMovieMethodAddParamInt(0) -- Since this is the first string, start at 0
+ ScaleformMovieMethodAddParamTextureNameString(title)
- EndScaleformMovieMethod()
+ EndScaleformMovieMethod()
- BeginScaleformMovieMethod(scaleform, "DISPLAY_SCROLL_TEXT")
- ScaleformMovieMethodAddParamInt(0) -- Top ticker
- ScaleformMovieMethodAddParamInt(0) -- Index of string
+ BeginScaleformMovieMethod(scaleform, "DISPLAY_SCROLL_TEXT")
+ ScaleformMovieMethodAddParamInt(0) -- Top ticker
+ ScaleformMovieMethodAddParamInt(0) -- Index of string
- EndScaleformMovieMethod()
+ EndScaleformMovieMethod()
- while sec > 0 do
- Wait(0)
- sec = sec - 0.01
+ while sec > 0 do
+ Wait(0)
+ sec = sec - 0.01
- DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255)
- end
+ DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255)
+ end
- SetScaleformMovieAsNoLongerNeeded(scaleform)
+ SetScaleformMovieAsNoLongerNeeded(scaleform)
end
function ESX.Scaleform.ShowPopupWarning(title, msg, bottom, sec)
- local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie("POPUP_WARNING")
+ local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie("POPUP_WARNING")
- BeginScaleformMovieMethod(scaleform, "SHOW_POPUP_WARNING")
+ BeginScaleformMovieMethod(scaleform, "SHOW_POPUP_WARNING")
- ScaleformMovieMethodAddParamFloat(500.0) -- black background
- ScaleformMovieMethodAddParamTextureNameString(title)
- ScaleformMovieMethodAddParamTextureNameString(msg)
- ScaleformMovieMethodAddParamTextureNameString(bottom)
- ScaleformMovieMethodAddParamBool(true)
+ ScaleformMovieMethodAddParamFloat(500.0) -- black background
+ ScaleformMovieMethodAddParamTextureNameString(title)
+ ScaleformMovieMethodAddParamTextureNameString(msg)
+ ScaleformMovieMethodAddParamTextureNameString(bottom)
+ ScaleformMovieMethodAddParamBool(true)
- EndScaleformMovieMethod()
+ EndScaleformMovieMethod()
- while sec > 0 do
- Wait(0)
- sec = sec - 0.01
+ while sec > 0 do
+ Wait(0)
+ sec = sec - 0.01
- DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255)
- end
+ DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255)
+ end
- SetScaleformMovieAsNoLongerNeeded(scaleform)
+ SetScaleformMovieAsNoLongerNeeded(scaleform)
end
function ESX.Scaleform.ShowTrafficMovie(sec)
- local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie("TRAFFIC_CAM")
+ local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie("TRAFFIC_CAM")
- BeginScaleformMovieMethod(scaleform, "PLAY_CAM_MOVIE")
+ BeginScaleformMovieMethod(scaleform, "PLAY_CAM_MOVIE")
- EndScaleformMovieMethod()
+ EndScaleformMovieMethod()
- while sec > 0 do
- Wait(0)
- sec = sec - 0.01
+ while sec > 0 do
+ Wait(0)
+ sec = sec - 0.01
- DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255)
- end
+ DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255)
+ end
- SetScaleformMovieAsNoLongerNeeded(scaleform)
+ SetScaleformMovieAsNoLongerNeeded(scaleform)
end
function ESX.Scaleform.Utils.RequestScaleformMovie(movie)
- local scaleform = RequestScaleformMovie(movie)
+ local scaleform = RequestScaleformMovie(movie)
- while not HasScaleformMovieLoaded(scaleform) do
- Wait(0)
- end
+ while not HasScaleformMovieLoaded(scaleform) do
+ Wait(0)
+ end
- return scaleform
+ return scaleform
end
diff --git a/server-data/resources/[esx]/es_extended/client/modules/streaming.lua b/server-data/resources/[esx]/es_extended/client/modules/streaming.lua
index 207a72c31..958509783 100644
--- a/server-data/resources/[esx]/es_extended/client/modules/streaming.lua
+++ b/server-data/resources/[esx]/es_extended/client/modules/streaming.lua
@@ -1,85 +1,85 @@
function ESX.Streaming.RequestModel(modelHash, cb)
- modelHash = (type(modelHash) == "number" and modelHash or joaat(modelHash))
+ modelHash = (type(modelHash) == "number" and modelHash or joaat(modelHash))
- if not HasModelLoaded(modelHash) and IsModelInCdimage(modelHash) then
- RequestModel(modelHash)
+ if not HasModelLoaded(modelHash) and IsModelInCdimage(modelHash) then
+ RequestModel(modelHash)
- while not HasModelLoaded(modelHash) do
- Wait(0)
- end
- end
+ while not HasModelLoaded(modelHash) do
+ Wait(0)
+ end
+ end
- if cb ~= nil then
- cb()
- end
+ if cb ~= nil then
+ cb()
+ end
end
function ESX.Streaming.RequestStreamedTextureDict(textureDict, cb)
- if not HasStreamedTextureDictLoaded(textureDict) then
- RequestStreamedTextureDict(textureDict)
+ if not HasStreamedTextureDictLoaded(textureDict) then
+ RequestStreamedTextureDict(textureDict)
- while not HasStreamedTextureDictLoaded(textureDict) do
- Wait(0)
- end
- end
+ while not HasStreamedTextureDictLoaded(textureDict) do
+ Wait(0)
+ end
+ end
- if cb ~= nil then
- cb()
- end
+ if cb ~= nil then
+ cb()
+ end
end
function ESX.Streaming.RequestNamedPtfxAsset(assetName, cb)
- if not HasNamedPtfxAssetLoaded(assetName) then
- RequestNamedPtfxAsset(assetName)
+ if not HasNamedPtfxAssetLoaded(assetName) then
+ RequestNamedPtfxAsset(assetName)
- while not HasNamedPtfxAssetLoaded(assetName) do
- Wait(0)
- end
- end
+ while not HasNamedPtfxAssetLoaded(assetName) do
+ Wait(0)
+ end
+ end
- if cb ~= nil then
- cb()
- end
+ if cb ~= nil then
+ cb()
+ end
end
function ESX.Streaming.RequestAnimSet(animSet, cb)
- if not HasAnimSetLoaded(animSet) then
- RequestAnimSet(animSet)
+ if not HasAnimSetLoaded(animSet) then
+ RequestAnimSet(animSet)
- while not HasAnimSetLoaded(animSet) do
- Wait(0)
- end
- end
+ while not HasAnimSetLoaded(animSet) do
+ Wait(0)
+ end
+ end
- if cb ~= nil then
- cb()
- end
+ if cb ~= nil then
+ cb()
+ end
end
function ESX.Streaming.RequestAnimDict(animDict, cb)
- if not HasAnimDictLoaded(animDict) then
- RequestAnimDict(animDict)
+ if not HasAnimDictLoaded(animDict) then
+ RequestAnimDict(animDict)
- while not HasAnimDictLoaded(animDict) do
- Wait(0)
- end
- end
+ while not HasAnimDictLoaded(animDict) do
+ Wait(0)
+ end
+ end
- if cb ~= nil then
- cb()
- end
+ if cb ~= nil then
+ cb()
+ end
end
function ESX.Streaming.RequestWeaponAsset(weaponHash, cb)
- if not HasWeaponAssetLoaded(weaponHash) then
- RequestWeaponAsset(weaponHash)
+ if not HasWeaponAssetLoaded(weaponHash) then
+ RequestWeaponAsset(weaponHash)
- while not HasWeaponAssetLoaded(weaponHash) do
- Wait(0)
- end
- end
+ while not HasWeaponAssetLoaded(weaponHash) do
+ Wait(0)
+ end
+ end
- if cb ~= nil then
- cb()
- end
+ if cb ~= nil then
+ cb()
+ end
end
diff --git a/server-data/resources/[esx]/es_extended/client/wrapper.lua b/server-data/resources/[esx]/es_extended/client/wrapper.lua
index c6fd62b21..10247fefe 100644
--- a/server-data/resources/[esx]/es_extended/client/wrapper.lua
+++ b/server-data/resources/[esx]/es_extended/client/wrapper.lua
@@ -1,14 +1,14 @@
local Chunks = {}
RegisterNUICallback("__chunk", function(data, cb)
- Chunks[data.id] = Chunks[data.id] or ""
- Chunks[data.id] = Chunks[data.id] .. data.chunk
+ Chunks[data.id] = Chunks[data.id] or ""
+ Chunks[data.id] = Chunks[data.id] .. data.chunk
- if data["end"] then
- local msg = json.decode(Chunks[data.id])
- TriggerEvent(GetCurrentResourceName() .. ":message:" .. data.__type, msg)
- Chunks[data.id] = nil
- end
+ if data["end"] then
+ local msg = json.decode(Chunks[data.id])
+ TriggerEvent(GetCurrentResourceName() .. ":message:" .. data.__type, msg)
+ Chunks[data.id] = nil
+ end
- cb("")
+ cb("")
end)
diff --git a/server-data/resources/[esx]/es_extended/common/functions.lua b/server-data/resources/[esx]/es_extended/common/functions.lua
index d3478f7f6..f6414bdc8 100644
--- a/server-data/resources/[esx]/es_extended/common/functions.lua
+++ b/server-data/resources/[esx]/es_extended/common/functions.lua
@@ -1,108 +1,108 @@
local Charset = {}
for i = 48, 57 do
- table.insert(Charset, string.char(i))
+ table.insert(Charset, string.char(i))
end
for i = 65, 90 do
- table.insert(Charset, string.char(i))
+ table.insert(Charset, string.char(i))
end
for i = 97, 122 do
- table.insert(Charset, string.char(i))
+ table.insert(Charset, string.char(i))
end
local weaponsByName = {}
local weaponsByHash = {}
CreateThread(function()
- for index, weapon in pairs(Config.Weapons) do
- weaponsByName[weapon.name] = index
- weaponsByHash[joaat(weapon.name)] = weapon
- end
+ for index, weapon in pairs(Config.Weapons) do
+ weaponsByName[weapon.name] = index
+ weaponsByHash[joaat(weapon.name)] = weapon
+ end
end)
function ESX.GetRandomString(length)
- math.randomseed(GetGameTimer())
+ math.randomseed(GetGameTimer())
- return length > 0 and ESX.GetRandomString(length - 1) .. Charset[math.random(1, #Charset)] or ""
+ return length > 0 and ESX.GetRandomString(length - 1) .. Charset[math.random(1, #Charset)] or ""
end
function ESX.GetConfig()
- return Config
+ return Config
end
function ESX.GetWeapon(weaponName)
- weaponName = string.upper(weaponName)
+ weaponName = string.upper(weaponName)
- assert(weaponsByName[weaponName], "Invalid weapon name!")
+ assert(weaponsByName[weaponName], "Invalid weapon name!")
- local index = weaponsByName[weaponName]
- return index, Config.Weapons[index]
+ local index = weaponsByName[weaponName]
+ return index, Config.Weapons[index]
end
function ESX.GetWeaponFromHash(weaponHash)
- weaponHash = type(weaponHash) == "string" and joaat(weaponHash) or weaponHash
+ weaponHash = type(weaponHash) == "string" and joaat(weaponHash) or weaponHash
- return weaponsByHash[weaponHash]
+ return weaponsByHash[weaponHash]
end
function ESX.GetWeaponList(byHash)
- return byHash and weaponsByHash or Config.Weapons
+ return byHash and weaponsByHash or Config.Weapons
end
function ESX.GetWeaponLabel(weaponName)
- weaponName = string.upper(weaponName)
+ weaponName = string.upper(weaponName)
- assert(weaponsByName[weaponName], "Invalid weapon name!")
+ assert(weaponsByName[weaponName], "Invalid weapon name!")
- local index = weaponsByName[weaponName]
- return Config.Weapons[index].label or ""
+ local index = weaponsByName[weaponName]
+ return Config.Weapons[index].label or ""
end
function ESX.GetWeaponComponent(weaponName, weaponComponent)
- weaponName = string.upper(weaponName)
+ weaponName = string.upper(weaponName)
- assert(weaponsByName[weaponName], "Invalid weapon name!")
- local weapon = Config.Weapons[weaponsByName[weaponName]]
+ assert(weaponsByName[weaponName], "Invalid weapon name!")
+ local weapon = Config.Weapons[weaponsByName[weaponName]]
- for _, component in ipairs(weapon.components) do
- if component.name == weaponComponent then
- return component
- end
- end
+ for _, component in ipairs(weapon.components) do
+ if component.name == weaponComponent then
+ return component
+ end
+ end
end
function ESX.DumpTable(table, nb)
- if nb == nil then
- nb = 0
- end
-
- if type(table) == "table" then
- local s = ""
- for _ = 1, nb + 1, 1 do
- s = s .. " "
- end
-
- s = "{\n"
- for k, v in pairs(table) do
- if type(k) ~= "number" then
- k = '"' .. k .. '"'
- end
- for _ = 1, nb, 1 do
- s = s .. " "
- end
- s = s .. "[" .. k .. "] = " .. ESX.DumpTable(v, nb + 1) .. ",\n"
- end
-
- for _ = 1, nb, 1 do
- s = s .. " "
- end
-
- return s .. "}"
- else
- return tostring(table)
- end
+ if nb == nil then
+ nb = 0
+ end
+
+ if type(table) == "table" then
+ local s = ""
+ for _ = 1, nb + 1, 1 do
+ s = s .. " "
+ end
+
+ s = "{\n"
+ for k, v in pairs(table) do
+ if type(k) ~= "number" then
+ k = '"' .. k .. '"'
+ end
+ for _ = 1, nb, 1 do
+ s = s .. " "
+ end
+ s = s .. "[" .. k .. "] = " .. ESX.DumpTable(v, nb + 1) .. ",\n"
+ end
+
+ for _ = 1, nb, 1 do
+ s = s .. " "
+ end
+
+ return s .. "}"
+ else
+ return tostring(table)
+ end
end
function ESX.Round(value, numDecimalPlaces)
- return ESX.Math.Round(value, numDecimalPlaces)
+ return ESX.Math.Round(value, numDecimalPlaces)
end
diff --git a/server-data/resources/[esx]/es_extended/common/modules/math.lua b/server-data/resources/[esx]/es_extended/common/modules/math.lua
index e620d48a9..9910d17e8 100644
--- a/server-data/resources/[esx]/es_extended/common/modules/math.lua
+++ b/server-data/resources/[esx]/es_extended/common/modules/math.lua
@@ -1,27 +1,25 @@
ESX.Math = {}
function ESX.Math.Round(value, numDecimalPlaces)
- if numDecimalPlaces then
- local power = 10 ^ numDecimalPlaces
- return math.floor((value * power) + 0.5) / power
- else
- return math.floor(value + 0.5)
- end
+ if numDecimalPlaces then
+ local power = 10 ^ numDecimalPlaces
+ return math.floor((value * power) + 0.5) / power
+ else
+ return math.floor(value + 0.5)
+ end
end
-- credit http://richard.warburton.it
function ESX.Math.GroupDigits(value)
- local left, num, right = string.match(value, "^([^%d]*%d)(%d*)(.-)$")
+ local left, num, right = string.match(value, "^([^%d]*%d)(%d*)(.-)$")
- return left
- .. (num:reverse():gsub("(%d%d%d)", "%1" .. TranslateCap("locale_digit_grouping_symbol")):reverse())
- .. right
+ return left .. (num:reverse():gsub("(%d%d%d)", "%1" .. TranslateCap("locale_digit_grouping_symbol")):reverse()) .. right
end
function ESX.Math.Trim(value)
- if value then
- return (string.gsub(value, "^%s*(.-)%s*$", "%1"))
- else
- return nil
- end
+ if value then
+ return (string.gsub(value, "^%s*(.-)%s*$", "%1"))
+ else
+ return nil
+ end
end
diff --git a/server-data/resources/[esx]/es_extended/common/modules/table.lua b/server-data/resources/[esx]/es_extended/common/modules/table.lua
index 957cb68c8..860f68c7f 100644
--- a/server-data/resources/[esx]/es_extended/common/modules/table.lua
+++ b/server-data/resources/[esx]/es_extended/common/modules/table.lua
@@ -2,186 +2,186 @@ ESX.Table = {}
-- nil proof alternative to #table
function ESX.Table.SizeOf(t)
- local count = 0
+ local count = 0
- for _, _ in pairs(t) do
- count = count + 1
- end
+ for _, _ in pairs(t) do
+ count = count + 1
+ end
- return count
+ return count
end
function ESX.Table.Set(t)
- local set = {}
- for _, v in ipairs(t) do
- set[v] = true
- end
- return set
+ local set = {}
+ for _, v in ipairs(t) do
+ set[v] = true
+ end
+ return set
end
function ESX.Table.IndexOf(t, value)
- for i = 1, #t, 1 do
- if t[i] == value then
- return i
- end
- end
+ for i = 1, #t, 1 do
+ if t[i] == value then
+ return i
+ end
+ end
- return -1
+ return -1
end
function ESX.Table.LastIndexOf(t, value)
- for i = #t, 1, -1 do
- if t[i] == value then
- return i
- end
- end
+ for i = #t, 1, -1 do
+ if t[i] == value then
+ return i
+ end
+ end
- return -1
+ return -1
end
function ESX.Table.Find(t, cb)
- for i = 1, #t, 1 do
- if cb(t[i]) then
- return t[i]
- end
- end
+ for i = 1, #t, 1 do
+ if cb(t[i]) then
+ return t[i]
+ end
+ end
- return nil
+ return nil
end
function ESX.Table.FindIndex(t, cb)
- for i = 1, #t, 1 do
- if cb(t[i]) then
- return i
- end
- end
+ for i = 1, #t, 1 do
+ if cb(t[i]) then
+ return i
+ end
+ end
- return -1
+ return -1
end
function ESX.Table.Filter(t, cb)
- local newTable = {}
+ local newTable = {}
- for i = 1, #t, 1 do
- if cb(t[i]) then
- table.insert(newTable, t[i])
- end
- end
+ for i = 1, #t, 1 do
+ if cb(t[i]) then
+ table.insert(newTable, t[i])
+ end
+ end
- return newTable
+ return newTable
end
function ESX.Table.Map(t, cb)
- local newTable = {}
+ local newTable = {}
- for i = 1, #t, 1 do
- newTable[i] = cb(t[i], i)
- end
+ for i = 1, #t, 1 do
+ newTable[i] = cb(t[i], i)
+ end
- return newTable
+ return newTable
end
function ESX.Table.Reverse(t)
- local newTable = {}
+ local newTable = {}
- for i = #t, 1, -1 do
- table.insert(newTable, t[i])
- end
+ for i = #t, 1, -1 do
+ table.insert(newTable, t[i])
+ end
- return newTable
+ return newTable
end
function ESX.Table.Clone(t)
- if type(t) ~= "table" then
- return t
- end
+ if type(t) ~= "table" then
+ return t
+ end
- local meta = getmetatable(t)
- local target = {}
+ local meta = getmetatable(t)
+ local target = {}
- for k, v in pairs(t) do
- if type(v) == "table" then
- target[k] = ESX.Table.Clone(v)
- else
- target[k] = v
- end
- end
+ for k, v in pairs(t) do
+ if type(v) == "table" then
+ target[k] = ESX.Table.Clone(v)
+ else
+ target[k] = v
+ end
+ end
- setmetatable(target, meta)
+ setmetatable(target, meta)
- return target
+ return target
end
function ESX.Table.Concat(t1, t2)
- local t3 = ESX.Table.Clone(t1)
+ local t3 = ESX.Table.Clone(t1)
- for i = 1, #t2, 1 do
- table.insert(t3, t2[i])
- end
+ for i = 1, #t2, 1 do
+ table.insert(t3, t2[i])
+ end
- return t3
+ return t3
end
function ESX.Table.Join(t, sep)
- local str = ""
+ local str = ""
- for i = 1, #t, 1 do
- if i > 1 then
- str = str .. (sep or ",")
- end
+ for i = 1, #t, 1 do
+ if i > 1 then
+ str = str .. (sep or ",")
+ end
- str = str .. t[i]
- end
+ str = str .. t[i]
+ end
- return str
+ return str
end
-- Credits: https://github.com/JonasDev99/qb-garages/blob/b0335d67cb72a6b9ac60f62a87fb3946f5c2f33d/server/main.lua#L5
function ESX.Table.TableContains(tab, val)
- if type(val) == "table" then
- for _, value in pairs(tab) do
- if ESX.Table.TableContains(val, value) then
- return true
- end
- end
- return false
- else
- for _, value in pairs(tab) do
- if value == val then
- return true
- end
- end
- end
- return false
+ if type(val) == "table" then
+ for _, value in pairs(tab) do
+ if ESX.Table.TableContains(val, value) then
+ return true
+ end
+ end
+ return false
+ else
+ for _, value in pairs(tab) do
+ if value == val then
+ return true
+ end
+ end
+ end
+ return false
end
-- Credit: https://stackoverflow.com/a/15706820
-- Description: sort function for pairs
function ESX.Table.Sort(t, order)
- -- collect the keys
- local keys = {}
-
- for k, _ in pairs(t) do
- keys[#keys + 1] = k
- end
-
- -- if order function given, sort by it by passing the table and keys a, b,
- -- otherwise just sort the keys
- if order then
- table.sort(keys, function(a, b)
- return order(t, a, b)
- end)
- else
- table.sort(keys)
- end
-
- -- return the iterator function
- local i = 0
-
- return function()
- i = i + 1
- if keys[i] then
- return keys[i], t[keys[i]]
- end
- end
+ -- collect the keys
+ local keys = {}
+
+ for k, _ in pairs(t) do
+ keys[#keys + 1] = k
+ end
+
+ -- if order function given, sort by it by passing the table and keys a, b,
+ -- otherwise just sort the keys
+ if order then
+ table.sort(keys, function(a, b)
+ return order(t, a, b)
+ end)
+ else
+ table.sort(keys)
+ end
+
+ -- return the iterator function
+ local i = 0
+
+ return function()
+ i = i + 1
+ if keys[i] then
+ return keys[i], t[keys[i]]
+ end
+ end
end
diff --git a/server-data/resources/[esx]/es_extended/common/modules/timeout.lua b/server-data/resources/[esx]/es_extended/common/modules/timeout.lua
index 814b086ce..381cbbcc3 100644
--- a/server-data/resources/[esx]/es_extended/common/modules/timeout.lua
+++ b/server-data/resources/[esx]/es_extended/common/modules/timeout.lua
@@ -2,22 +2,22 @@ local TimeoutCount = 0
local CancelledTimeouts = {}
ESX.SetTimeout = function(msec, cb)
- local id = TimeoutCount + 1
+ local id = TimeoutCount + 1
- SetTimeout(msec, function()
- if CancelledTimeouts[id] then
- CancelledTimeouts[id] = nil
- return
- end
+ SetTimeout(msec, function()
+ if CancelledTimeouts[id] then
+ CancelledTimeouts[id] = nil
+ return
+ end
- cb()
- end)
+ cb()
+ end)
- TimeoutCount = id
+ TimeoutCount = id
- return id
+ return id
end
ESX.ClearTimeout = function(id)
- CancelledTimeouts[id] = true
+ CancelledTimeouts[id] = true
end
diff --git a/server-data/resources/[esx]/es_extended/config.logs.lua b/server-data/resources/[esx]/es_extended/config.logs.lua
index 92cdfc3ae..34c013a03 100644
--- a/server-data/resources/[esx]/es_extended/config.logs.lua
+++ b/server-data/resources/[esx]/es_extended/config.logs.lua
@@ -1,23 +1,23 @@
Config.DiscordLogs = {
- Webhooks = {
- default = "",
- test = "",
- Chat = "",
- UserActions = "",
- Resources = "",
- Paycheck = "",
- },
+ Webhooks = {
+ default = "",
+ test = "",
+ Chat = "",
+ UserActions = "",
+ Resources = "",
+ Paycheck = "",
+ },
- Colors = { -- https://www.spycolor.com/
- default = 14423100,
- blue = 255,
- red = 16711680,
- green = 65280,
- white = 16777215,
- black = 0,
- orange = 16744192,
- yellow = 16776960,
- pink = 16761035,
- lightgreen = 65309,
- },
+ Colors = { -- https://www.spycolor.com/
+ default = 14423100,
+ blue = 255,
+ red = 16711680,
+ green = 65280,
+ white = 16777215,
+ black = 0,
+ orange = 16744192,
+ yellow = 16776960,
+ pink = 16761035,
+ lightgreen = 65309,
+ },
}
diff --git a/server-data/resources/[esx]/es_extended/config.lua b/server-data/resources/[esx]/es_extended/config.lua
index 45b4c9fe7..3d82a1f00 100644
--- a/server-data/resources/[esx]/es_extended/config.lua
+++ b/server-data/resources/[esx]/es_extended/config.lua
@@ -1,59 +1,58 @@
Config = {}
Config.Locale = GetConvar("esx:locale", "en")
-Config.OxInventory = GetResourceState("ox_inventory") ~= "missing"
+Config.OxInventory = GetResourceState("ox_inventory") ~= 'missing'
Config.Accounts = {
- bank = {
- label = TranslateCap("account_bank"),
- round = true,
- },
- black_money = {
- label = TranslateCap("account_black_money"),
- round = true,
- },
- money = {
- label = TranslateCap("account_money"),
- round = true,
- },
+ bank = {
+ label = TranslateCap("account_bank"),
+ round = true,
+ },
+ black_money = {
+ label = TranslateCap("account_black_money"),
+ round = true,
+ },
+ money = {
+ label = TranslateCap("account_money"),
+ round = true,
+ },
}
Config.StartingAccountMoney = { bank = 50000 }
Config.StartingInventoryItems = false -- table/false
-Config.DefaultSpawns =
- { -- If you want to have more spawn positions and select them randomly uncomment commented code or add more locations
- { x = 222.2027, y = -864.0162, z = 30.2922, heading = 1.0 },
- --{x = 224.9865, y = -865.0871, z = 30.2922, heading = 1.0},
- --{x = 227.8436, y = -866.0400, z = 30.2922, heading = 1.0},
- --{x = 230.6051, y = -867.1450, z = 30.2922, heading = 1.0},
- --{x = 233.5459, y = -868.2626, z = 30.2922, heading = 1.0}
- }
+Config.DefaultSpawns = { -- If you want to have more spawn positions and select them randomly uncomment commented code or add more locations
+ { x = 222.2027, y = -864.0162, z = 30.2922, heading = 1.0 },
+ --{x = 224.9865, y = -865.0871, z = 30.2922, heading = 1.0},
+ --{x = 227.8436, y = -866.0400, z = 30.2922, heading = 1.0},
+ --{x = 230.6051, y = -867.1450, z = 30.2922, heading = 1.0},
+ --{x = 233.5459, y = -868.2626, z = 30.2922, heading = 1.0}
+}
Config.AdminGroups = {
- ["owner"] = true,
- ["admin"] = true,
+ ["owner"] = true,
+ ["admin"] = true,
}
Config.EnablePaycheck = true -- enable paycheck
Config.LogPaycheck = false -- Logs paychecks to a nominated Discord channel via webhook (default is false)
Config.EnableSocietyPayouts = false -- pay from the society account that the player is employed at? Requirement: esx_society
-Config.MaxWeight = 24 -- the max inventory weight without backpack
-Config.PaycheckInterval = 7 * 60000 -- how often to recieve pay checks in milliseconds
+Config.MaxWeight = 24 -- the max inventory weight without a backpack
+Config.PaycheckInterval = 7 * 60000 -- how often to receive paychecks in milliseconds
Config.EnableDebug = false -- Use Debug options?
Config.EnableDefaultInventory = true -- Display the default Inventory ( F2 )
Config.EnableWantedLevel = false -- Use Normal GTA wanted Level?
Config.EnablePVP = true -- Allow Player to player combat
Config.Multichar = GetResourceState("esx_multicharacter") ~= "missing"
-Config.Identity = true -- Select a characters identity data before they have loaded in (this happens by default with multichar)
+Config.Identity = true -- Select a character identity data before they have loaded in (this happens by default with multichar)
Config.DistanceGive = 4.0 -- Max distance when giving items, weapons etc.
Config.AdminLogging = false -- Logs the usage of certain commands by those with group.admin ace permissions (default is false)
Config.DisableHealthRegeneration = false -- Player will no longer regenerate health
-Config.DisableVehicleRewards = false -- Disables Player Recieving weapons from vehicles
+Config.DisableVehicleRewards = false -- Disables Player Receiving weapons from vehicles
Config.DisableNPCDrops = false -- stops NPCs from dropping weapons on death
Config.DisableDispatchServices = false -- Disable Dispatch services
Config.DisableScenarios = false -- Disable Scenarios
@@ -62,36 +61,36 @@ Config.DisableAimAssist = false -- disables AIM assist (mainly on controllers)
Config.DisableVehicleSeatShuff = false -- Disables vehicle seat shuff
Config.DisableDisplayAmmo = false -- Disable ammunition display
Config.RemoveHudComponents = {
- [1] = false, --WANTED_STARS,
- [2] = false, --WEAPON_ICON
- [3] = false, --CASH
- [4] = false, --MP_CASH
- [5] = false, --MP_MESSAGE
- [6] = false, --VEHICLE_NAME
- [7] = false, -- AREA_NAME
- [8] = false, -- VEHICLE_CLASS
- [9] = false, --STREET_NAME
- [10] = false, --HELP_TEXT
- [11] = false, --FLOATING_HELP_TEXT_1
- [12] = false, --FLOATING_HELP_TEXT_2
- [13] = false, --CASH_CHANGE
- [14] = false, --RETICLE
- [15] = false, --SUBTITLE_TEXT
- [16] = false, --RADIO_STATIONS
- [17] = false, --SAVING_GAME,
- [18] = false, --GAME_STREAM
- [19] = false, --WEAPON_WHEEL
- [20] = false, --WEAPON_WHEEL_STATS
- [21] = false, --HUD_COMPONENTS
- [22] = false, --HUD_WEAPONS
+ [1] = false, --WANTED_STARS,
+ [2] = false, --WEAPON_ICON
+ [3] = false, --CASH
+ [4] = false, --MP_CASH
+ [5] = false, --MP_MESSAGE
+ [6] = false, --VEHICLE_NAME
+ [7] = false, -- AREA_NAME
+ [8] = false, -- VEHICLE_CLASS
+ [9] = false, --STREET_NAME
+ [10] = false, --HELP_TEXT
+ [11] = false, --FLOATING_HELP_TEXT_1
+ [12] = false, --FLOATING_HELP_TEXT_2
+ [13] = false, --CASH_CHANGE
+ [14] = false, --RETICLE
+ [15] = false, --SUBTITLE_TEXT
+ [16] = false, --RADIO_STATIONS
+ [17] = false, --SAVING_GAME,
+ [18] = false, --GAME_STREAM
+ [19] = false, --WEAPON_WHEEL
+ [20] = false, --WEAPON_WHEEL_STATS
+ [21] = false, --HUD_COMPONENTS
+ [22] = false, --HUD_WEAPONS
}
-Config.SpawnVehMaxUpgrades = true -- admin vehicles spawn with max vehcle settings
+Config.SpawnVehMaxUpgrades = true -- admin vehicles spawn with max vehicle settings
Config.CustomAIPlates = "........" -- Custom plates for AI vehicles
-- Pattern string format
--1 will lead to a random number from 0-9.
--A will lead to a random letter from A-Z.
--- . will lead to a random letter or number, with 50% probability of being either.
+-- . will lead to a random letter or number, with a 50% probability of being either.
--^1 will lead to a literal 1 being emitted.
--^A will lead to a literal A being emitted.
--Any other character will lead to said character being emitted.
diff --git a/server-data/resources/[esx]/es_extended/config.weapons.lua b/server-data/resources/[esx]/es_extended/config.weapons.lua
index 0dbdb5203..cbeecb54d 100644
--- a/server-data/resources/[esx]/es_extended/config.weapons.lua
+++ b/server-data/resources/[esx]/es_extended/config.weapons.lua
@@ -1,2714 +1,1036 @@
Config.DefaultWeaponTints = {
- [0] = TranslateCap("tint_default"),
- [1] = TranslateCap("tint_green"),
- [2] = TranslateCap("tint_gold"),
- [3] = TranslateCap("tint_pink"),
- [4] = TranslateCap("tint_army"),
- [5] = TranslateCap("tint_lspd"),
- [6] = TranslateCap("tint_orange"),
- [7] = TranslateCap("tint_platinum"),
+ [0] = TranslateCap("tint_default"),
+ [1] = TranslateCap("tint_green"),
+ [2] = TranslateCap("tint_gold"),
+ [3] = TranslateCap("tint_pink"),
+ [4] = TranslateCap("tint_army"),
+ [5] = TranslateCap("tint_lspd"),
+ [6] = TranslateCap("tint_orange"),
+ [7] = TranslateCap("tint_platinum"),
}
Config.Weapons = {
- -- Melee
- { name = "WEAPON_DAGGER", label = TranslateCap("weapon_dagger"), components = {} },
- { name = "WEAPON_BAT", label = TranslateCap("weapon_bat"), components = {} },
- { name = "WEAPON_BATTLEAXE", label = TranslateCap("weapon_battleaxe"), components = {} },
- {
- name = "WEAPON_KNUCKLE",
- label = TranslateCap("weapon_knuckle"),
- components = {
- {
- name = "knuckle_base",
- label = TranslateCap("component_knuckle_base"),
- hash = `COMPONENT_KNUCKLE_VARMOD_BASE`,
- },
- {
- name = "knuckle_pimp",
- label = TranslateCap("component_knuckle_pimp"),
- hash = `COMPONENT_KNUCKLE_VARMOD_PIMP`,
- },
- {
- name = "knuckle_ballas",
- label = TranslateCap("component_knuckle_ballas"),
- hash = `COMPONENT_KNUCKLE_VARMOD_BALLAS`,
- },
- {
- name = "knuckle_dollar",
- label = TranslateCap("component_knuckle_dollar"),
- hash = `COMPONENT_KNUCKLE_VARMOD_DOLLAR`,
- },
- {
- name = "knuckle_diamond",
- label = TranslateCap("component_knuckle_diamond"),
- hash = `COMPONENT_KNUCKLE_VARMOD_DIAMOND`,
- },
- {
- name = "knuckle_hate",
- label = TranslateCap("component_knuckle_hate"),
- hash = `COMPONENT_KNUCKLE_VARMOD_HATE`,
- },
- {
- name = "knuckle_love",
- label = TranslateCap("component_knuckle_love"),
- hash = `COMPONENT_KNUCKLE_VARMOD_LOVE`,
- },
- {
- name = "knuckle_player",
- label = TranslateCap("component_knuckle_player"),
- hash = `COMPONENT_KNUCKLE_VARMOD_PLAYER`,
- },
- {
- name = "knuckle_king",
- label = TranslateCap("component_knuckle_king"),
- hash = `COMPONENT_KNUCKLE_VARMOD_KING`,
- },
- {
- name = "knuckle_vagos",
- label = TranslateCap("component_knuckle_vagos"),
- hash = `COMPONENT_KNUCKLE_VARMOD_VAGOS`,
- },
- },
- },
- { name = "WEAPON_BOTTLE", label = TranslateCap("weapon_bottle"), components = {} },
- { name = "WEAPON_CROWBAR", label = TranslateCap("weapon_crowbar"), components = {} },
- { name = "WEAPON_FLASHLIGHT", label = TranslateCap("weapon_flashlight"), components = {} },
- { name = "WEAPON_GOLFCLUB", label = TranslateCap("weapon_golfclub"), components = {} },
- { name = "WEAPON_HAMMER", label = TranslateCap("weapon_hammer"), components = {} },
- { name = "WEAPON_HATCHET", label = TranslateCap("weapon_hatchet"), components = {} },
- { name = "WEAPON_KNIFE", label = TranslateCap("weapon_knife"), components = {} },
- { name = "WEAPON_MACHETE", label = TranslateCap("weapon_machete"), components = {} },
- { name = "WEAPON_NIGHTSTICK", label = TranslateCap("weapon_nightstick"), components = {} },
- { name = "WEAPON_WRENCH", label = TranslateCap("weapon_wrench"), components = {} },
- { name = "WEAPON_POOLCUE", label = TranslateCap("weapon_poolcue"), components = {} },
- { name = "WEAPON_STONE_HATCHET", label = TranslateCap("weapon_stone_hatchet"), components = {} },
- {
- name = "WEAPON_SWITCHBLADE",
- label = TranslateCap("weapon_switchblade"),
- components = {
- {
- name = "handle_default",
- label = TranslateCap("component_handle_default"),
- hash = `COMPONENT_SWITCHBLADE_VARMOD_BASE`,
- },
- {
- name = "handle_vip",
- label = TranslateCap("component_handle_vip"),
- hash = `COMPONENT_SWITCHBLADE_VARMOD_VAR1`,
- },
- {
- name = "handle_bodyguard",
- label = TranslateCap("component_handle_bodyguard"),
- hash = `COMPONENT_SWITCHBLADE_VARMOD_VAR2`,
- },
- },
- },
- -- Handguns
- {
- name = "WEAPON_APPISTOL",
- label = TranslateCap("weapon_appistol"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_APPISTOL_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_APPISTOL_CLIP_02`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_APPISTOL_VARMOD_LUXE`,
- },
- },
- },
- {
- name = "WEAPON_CERAMICPISTOL",
- label = TranslateCap("weapon_ceramicpistol"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- },
- {
- name = "WEAPON_COMBATPISTOL",
- label = TranslateCap("weapon_combatpistol"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_COMBATPISTOL_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_COMBATPISTOL_CLIP_02`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_COMBATPISTOL_VARMOD_LOWRIDER`,
- },
- },
- },
- {
- name = "WEAPON_DOUBLEACTION",
- label = TranslateCap("weapon_doubleaction"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- },
- {
- name = "WEAPON_NAVYREVOLVER",
- label = TranslateCap("weapon_navyrevolver"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- },
- {
- name = "WEAPON_FLAREGUN",
- label = TranslateCap("weapon_flaregun"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_flaregun"), hash = `AMMO_FLAREGUN` },
- },
- {
- name = "WEAPON_GADGETPISTOL",
- label = TranslateCap("weapon_gadgetpistol"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- },
- {
- name = "WEAPON_HEAVYPISTOL",
- label = TranslateCap("weapon_heavypistol"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_HEAVYPISTOL_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_HEAVYPISTOL_CLIP_02`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_HEAVYPISTOL_VARMOD_LUXE`,
- },
- },
- },
- {
- name = "WEAPON_REVOLVER",
- label = TranslateCap("weapon_revolver"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_REVOLVER_CLIP_01`,
- },
- {
- name = "vip_finish",
- label = TranslateCap("component_vip_finish"),
- hash = `COMPONENT_REVOLVER_VARMOD_BOSS`,
- },
- {
- name = "bodyguard_finish",
- label = TranslateCap("component_bodyguard_finish"),
- hash = `COMPONENT_REVOLVER_VARMOD_GOON`,
- },
- },
- },
- {
- name = "WEAPON_REVOLVER_MK2",
- label = TranslateCap("weapon_revolver_mk2"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_REVOLVER_MK2_CLIP_01`,
- },
- {
- name = "ammo_tracer",
- label = TranslateCap("component_ammo_tracer"),
- hash = `COMPONENT_REVOLVER_MK2_CLIP_TRACER`,
- },
- {
- name = "ammo_incendiary",
- label = TranslateCap("component_ammo_incendiary"),
- hash = `COMPONENT_REVOLVER_MK2_CLIP_INCENDIARY`,
- },
- {
- name = "ammo_hollowpoint",
- label = TranslateCap("component_ammo_hollowpoint"),
- hash = `COMPONENT_REVOLVER_MK2_CLIP_HOLLOWPOINT`,
- },
- { name = "ammo_fmj", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_REVOLVER_MK2_CLIP_FMJ` },
- { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
- { name = "scope_small", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_AT_SCOPE_MACRO_MK2` },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH` },
- { name = "compensator", label = TranslateCap("component_compensator"), hash = `COMPONENT_AT_PI_COMP_03` },
- {
- name = "camo_finish",
- label = TranslateCap("component_camo_finish"),
- hash = `COMPONENT_REVOLVER_MK2_CAMO`,
- },
- {
- name = "camo_finish2",
- label = TranslateCap("component_camo_finish2"),
- hash = `COMPONENT_REVOLVER_MK2_CAMO_02`,
- },
- {
- name = "camo_finish3",
- label = TranslateCap("component_camo_finish3"),
- hash = `COMPONENT_REVOLVER_MK2_CAMO_03`,
- },
- {
- name = "camo_finish4",
- label = TranslateCap("component_camo_finish4"),
- hash = `COMPONENT_REVOLVER_MK2_CAMO_04`,
- },
- {
- name = "camo_finish5",
- label = TranslateCap("component_camo_finish5"),
- hash = `COMPONENT_REVOLVER_MK2_CAMO_05`,
- },
- {
- name = "camo_finish6",
- label = TranslateCap("component_camo_finish6"),
- hash = `COMPONENT_REVOLVER_MK2_CAMO_06`,
- },
- {
- name = "camo_finish7",
- label = TranslateCap("component_camo_finish7"),
- hash = `COMPONENT_REVOLVER_MK2_CAMO_07`,
- },
- {
- name = "camo_finish8",
- label = TranslateCap("component_camo_finish8"),
- hash = `COMPONENT_REVOLVER_MK2_CAMO_08`,
- },
- {
- name = "camo_finish9",
- label = TranslateCap("component_camo_finish9"),
- hash = `COMPONENT_REVOLVER_MK2_CAMO_09`,
- },
- {
- name = "camo_finish10",
- label = TranslateCap("component_camo_finish10"),
- hash = `COMPONENT_REVOLVER_MK2_CAMO_10`,
- },
- {
- name = "camo_finish11",
- label = TranslateCap("component_camo_finish11"),
- hash = `COMPONENT_REVOLVER_MK2_CAMO_IND_01`,
- },
- },
- },
- {
- name = "WEAPON_MARKSMANPISTOL",
- label = TranslateCap("weapon_marksmanpistol"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- },
- {
- name = "WEAPON_PISTOL",
- label = TranslateCap("weapon_pistol"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_PISTOL_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_PISTOL_CLIP_02`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP_02` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_PISTOL_VARMOD_LUXE`,
- },
- },
- },
- {
- name = "WEAPON_PISTOL_MK2",
- label = TranslateCap("weapon_pistol_mk2"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_PISTOL_MK2_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_PISTOL_MK2_CLIP_02`,
- },
- {
- name = "ammo_tracer",
- label = TranslateCap("component_ammo_tracer"),
- hash = `COMPONENT_PISTOL_MK2_CLIP_TRACER`,
- },
- {
- name = "ammo_incendiary",
- label = TranslateCap("component_ammo_incendiary"),
- hash = `COMPONENT_PISTOL_MK2_CLIP_INCENDIARY`,
- },
- {
- name = "ammo_hollowpoint",
- label = TranslateCap("component_ammo_hollowpoint"),
- hash = `COMPONENT_PISTOL_MK2_CLIP_HOLLOWPOINT`,
- },
- { name = "ammo_fmj", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_PISTOL_MK2_CLIP_FMJ` },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_PI_RAIL` },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH_02` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP_02` },
- { name = "compensator", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_COMP` },
- { name = "camo_finish", label = TranslateCap("component_camo_finish"), hash = `COMPONENT_PISTOL_MK2_CAMO` },
- {
- name = "camo_finish2",
- label = TranslateCap("component_camo_finish2"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_02`,
- },
- {
- name = "camo_finish3",
- label = TranslateCap("component_camo_finish3"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_03`,
- },
- {
- name = "camo_finish4",
- label = TranslateCap("component_camo_finish4"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_04`,
- },
- {
- name = "camo_finish5",
- label = TranslateCap("component_camo_finish5"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_05`,
- },
- {
- name = "camo_finish6",
- label = TranslateCap("component_camo_finish6"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_06`,
- },
- {
- name = "camo_finish7",
- label = TranslateCap("component_camo_finish7"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_07`,
- },
- {
- name = "camo_finish8",
- label = TranslateCap("component_camo_finish8"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_08`,
- },
- {
- name = "camo_finish9",
- label = TranslateCap("component_camo_finish9"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_09`,
- },
- {
- name = "camo_finish10",
- label = TranslateCap("component_camo_finish10"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_10`,
- },
- {
- name = "camo_finish11",
- label = TranslateCap("component_camo_finish11"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_IND_01`,
- },
- {
- name = "camo_slide_finish",
- label = TranslateCap("component_camo_slide_finish"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_SLIDE`,
- },
- {
- name = "camo_slide_finish2",
- label = TranslateCap("component_camo_slide_finish2"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_02_SLIDE`,
- },
- {
- name = "camo_slide_finish3",
- label = TranslateCap("component_camo_slide_finish3"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_03_SLIDE`,
- },
- {
- name = "camo_slide_finish4",
- label = TranslateCap("component_camo_slide_finish4"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_04_SLIDE`,
- },
- {
- name = "camo_slide_finish5",
- label = TranslateCap("component_camo_slide_finish5"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_05_SLIDE`,
- },
- {
- name = "camo_slide_finish6",
- label = TranslateCap("component_camo_slide_finish6"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_06_SLIDE`,
- },
- {
- name = "camo_slide_finish7",
- label = TranslateCap("component_camo_slide_finish7"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_07_SLIDE`,
- },
- {
- name = "camo_slide_finish8",
- label = TranslateCap("component_camo_slide_finish8"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_08_SLIDE`,
- },
- {
- name = "camo_slide_finish9",
- label = TranslateCap("component_camo_slide_finish9"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_09_SLIDE`,
- },
- {
- name = "camo_slide_finish10",
- label = TranslateCap("component_camo_slide_finish10"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_10_SLIDE`,
- },
- {
- name = "camo_slide_finish11",
- label = TranslateCap("component_camo_slide_finish11"),
- hash = `COMPONENT_PISTOL_MK2_CAMO_IND_01_SLIDE`,
- },
- },
- },
- {
- name = "WEAPON_PISTOL50",
- label = TranslateCap("weapon_pistol50"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_PISTOL50_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_PISTOL50_CLIP_02`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_PISTOL50_VARMOD_LUXE`,
- },
- },
- },
- {
- name = "WEAPON_SNSPISTOL",
- label = TranslateCap("weapon_snspistol"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_SNSPISTOL_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_SNSPISTOL_CLIP_02`,
- },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_SNSPISTOL_VARMOD_LOWRIDER`,
- },
- },
- },
- {
- name = "WEAPON_SNSPISTOL_MK2",
- label = TranslateCap("weapon_snspistol_mk2"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_SNSPISTOL_MK2_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_SNSPISTOL_MK2_CLIP_02`,
- },
- {
- name = "ammo_tracer",
- label = TranslateCap("component_ammo_tracer"),
- hash = `COMPONENT_SNSPISTOL_MK2_CLIP_TRACER`,
- },
- {
- name = "ammo_incendiary",
- label = TranslateCap("component_ammo_incendiary"),
- hash = `COMPONENT_SNSPISTOL_MK2_CLIP_INCENDIARY`,
- },
- {
- name = "ammo_hollowpoint",
- label = TranslateCap("component_ammo_hollowpoint"),
- hash = `COMPONENT_SNSPISTOL_MK2_CLIP_HOLLOWPOINT`,
- },
- {
- name = "ammo_fmj",
- label = TranslateCap("component_ammo_fmj"),
- hash = `COMPONENT_SNSPISTOL_MK2_CLIP_FMJ`,
- },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_PI_RAIL_02` },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH_03` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP_02` },
- { name = "compensator", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_COMP_02` },
- {
- name = "camo_finish",
- label = TranslateCap("component_camo_finish"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO`,
- },
- {
- name = "camo_finish2",
- label = TranslateCap("component_camo_finish2"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_02`,
- },
- {
- name = "camo_finish3",
- label = TranslateCap("component_camo_finish3"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_03`,
- },
- {
- name = "camo_finish4",
- label = TranslateCap("component_camo_finish4"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_04`,
- },
- {
- name = "camo_finish5",
- label = TranslateCap("component_camo_finish5"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_05`,
- },
- {
- name = "camo_finish6",
- label = TranslateCap("component_camo_finish6"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_06`,
- },
- {
- name = "camo_finish7",
- label = TranslateCap("component_camo_finish7"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_07`,
- },
- {
- name = "camo_finish8",
- label = TranslateCap("component_camo_finish8"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_08`,
- },
- {
- name = "camo_finish9",
- label = TranslateCap("component_camo_finish9"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_09`,
- },
- {
- name = "camo_finish10",
- label = TranslateCap("component_camo_finish10"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_10`,
- },
- {
- name = "camo_finish11",
- label = TranslateCap("component_camo_finish11"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_IND_01`,
- },
- {
- name = "camo_slide_finish",
- label = TranslateCap("component_camo_slide_finish"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_SLIDE`,
- },
- {
- name = "camo_slide_finish2",
- label = TranslateCap("component_camo_slide_finish2"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_02_SLIDE`,
- },
- {
- name = "camo_slide_finish3",
- label = TranslateCap("component_camo_slide_finish3"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_03_SLIDE`,
- },
- {
- name = "camo_slide_finish4",
- label = TranslateCap("component_camo_slide_finish4"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_04_SLIDE`,
- },
- {
- name = "camo_slide_finish5",
- label = TranslateCap("component_camo_slide_finish5"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_05_SLIDE`,
- },
- {
- name = "camo_slide_finish6",
- label = TranslateCap("component_camo_slide_finish6"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_06_SLIDE`,
- },
- {
- name = "camo_slide_finish7",
- label = TranslateCap("component_camo_slide_finish7"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_07_SLIDE`,
- },
- {
- name = "camo_slide_finish8",
- label = TranslateCap("component_camo_slide_finish8"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_08_SLIDE`,
- },
- {
- name = "camo_slide_finish9",
- label = TranslateCap("component_camo_slide_finish9"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_09_SLIDE`,
- },
- {
- name = "camo_slide_finish10",
- label = TranslateCap("component_camo_slide_finish10"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_10_SLIDE`,
- },
- {
- name = "camo_slide_finish11",
- label = TranslateCap("component_camo_slide_finish11"),
- hash = `COMPONENT_SNSPISTOL_MK2_CAMO_IND_01_SLIDE`,
- },
- },
- },
- {
- name = "WEAPON_STUNGUN",
- label = TranslateCap("weapon_stungun"),
- tints = Config.DefaultWeaponTints,
- components = {},
- },
- {
- name = "WEAPON_RAYPISTOL",
- label = TranslateCap("weapon_raypistol"),
- tints = Config.DefaultWeaponTints,
- components = {},
- },
- {
- name = "WEAPON_VINTAGEPISTOL",
- label = TranslateCap("weapon_vintagepistol"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_VINTAGEPISTOL_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_VINTAGEPISTOL_CLIP_02`,
- },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP` },
- },
- },
- -- Shotguns
- {
- name = "WEAPON_ASSAULTSHOTGUN",
- label = TranslateCap("weapon_assaultshotgun"),
- ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_ASSAULTSHOTGUN_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_ASSAULTSHOTGUN_CLIP_02`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
- },
- },
- {
- name = "WEAPON_AUTOSHOTGUN",
- label = TranslateCap("weapon_autoshotgun"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
- },
- {
- name = "WEAPON_BULLPUPSHOTGUN",
- label = TranslateCap("weapon_bullpupshotgun"),
- ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
- tints = Config.DefaultWeaponTints,
- components = {
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
- },
- },
- {
- name = "WEAPON_COMBATSHOTGUN",
- label = TranslateCap("weapon_combatshotgun"),
- ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
- tints = Config.DefaultWeaponTints,
- components = {
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
- },
- },
- {
- name = "WEAPON_DBSHOTGUN",
- label = TranslateCap("weapon_dbshotgun"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
- },
- {
- name = "WEAPON_HEAVYSHOTGUN",
- label = TranslateCap("weapon_heavyshotgun"),
- ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_HEAVYSHOTGUN_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_HEAVYSHOTGUN_CLIP_02`,
- },
- {
- name = "clip_drum",
- label = TranslateCap("component_clip_drum"),
- hash = `COMPONENT_HEAVYSHOTGUN_CLIP_03`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
- },
- },
- {
- name = "WEAPON_MUSKET",
- label = TranslateCap("weapon_musket"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SHOTGUN` },
- },
- {
- name = "WEAPON_PUMPSHOTGUN",
- label = TranslateCap("weapon_pumpshotgun"),
- ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
- tints = Config.DefaultWeaponTints,
- components = {
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_SR_SUPP` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_PUMPSHOTGUN_VARMOD_LOWRIDER`,
- },
- },
- },
- {
- name = "WEAPON_PUMPSHOTGUN_MK2",
- label = TranslateCap("weapon_pumpshotgun_mk2"),
- ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "shells_default",
- label = TranslateCap("component_shells_default"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CLIP_01`,
- },
- {
- name = "shells_incendiary",
- label = TranslateCap("component_shells_incendiary"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CLIP_INCENDIARY`,
- },
- {
- name = "shells_armor",
- label = TranslateCap("component_shells_armor"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CLIP_ARMORPIERCING`,
- },
- {
- name = "shells_hollowpoint",
- label = TranslateCap("component_shells_hollowpoint"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CLIP_HOLLOWPOINT`,
- },
- {
- name = "shells_explosive",
- label = TranslateCap("component_shells_explosive"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CLIP_EXPLOSIVE`,
- },
- { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
- {
- name = "scope_small",
- label = TranslateCap("component_scope_small"),
- hash = `COMPONENT_AT_SCOPE_MACRO_MK2`,
- },
- {
- name = "scope_medium",
- label = TranslateCap("component_scope_medium"),
- hash = `COMPONENT_AT_SCOPE_SMALL_MK2`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_SR_SUPP_03` },
- {
- name = "muzzle_squared",
- label = TranslateCap("component_muzzle_squared"),
- hash = `COMPONENT_AT_MUZZLE_08`,
- },
- {
- name = "camo_finish",
- label = TranslateCap("component_camo_finish"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO`,
- },
- {
- name = "camo_finish2",
- label = TranslateCap("component_camo_finish2"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_02`,
- },
- {
- name = "camo_finish3",
- label = TranslateCap("component_camo_finish3"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_03`,
- },
- {
- name = "camo_finish4",
- label = TranslateCap("component_camo_finish4"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_04`,
- },
- {
- name = "camo_finish5",
- label = TranslateCap("component_camo_finish5"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_05`,
- },
- {
- name = "camo_finish6",
- label = TranslateCap("component_camo_finish6"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_06`,
- },
- {
- name = "camo_finish7",
- label = TranslateCap("component_camo_finish7"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_07`,
- },
- {
- name = "camo_finish8",
- label = TranslateCap("component_camo_finish8"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_08`,
- },
- {
- name = "camo_finish9",
- label = TranslateCap("component_camo_finish9"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_09`,
- },
- {
- name = "camo_finish10",
- label = TranslateCap("component_camo_finish10"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_10`,
- },
- {
- name = "camo_finish11",
- label = TranslateCap("component_camo_finish11"),
- hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_IND_01`,
- },
- },
- },
- {
- name = "WEAPON_SAWNOFFSHOTGUN",
- label = TranslateCap("weapon_sawnoffshotgun"),
- ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_SAWNOFFSHOTGUN_VARMOD_LUXE`,
- },
- },
- },
- -- SMG & LMG
- {
- name = "WEAPON_ASSAULTSMG",
- label = TranslateCap("weapon_assaultsmg"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SMG` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_ASSAULTSMG_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_ASSAULTSMG_CLIP_02`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MACRO` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_ASSAULTSMG_VARMOD_LOWRIDER`,
- },
- },
- },
- {
- name = "WEAPON_COMBATMG",
- label = TranslateCap("weapon_combatmg"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_MG` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_COMBATMG_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_COMBATMG_CLIP_02`,
- },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MEDIUM` },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_COMBATMG_VARMOD_LOWRIDER`,
- },
- },
- },
- {
- name = "WEAPON_COMBATMG_MK2",
- label = TranslateCap("weapon_combatmg_mk2"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_MG` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_COMBATMG_MK2_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_COMBATMG_MK2_CLIP_02`,
- },
- {
- name = "ammo_tracer",
- label = TranslateCap("component_ammo_tracer"),
- hash = `COMPONENT_COMBATMG_MK2_CLIP_TRACER`,
- },
- {
- name = "ammo_incendiary",
- label = TranslateCap("component_ammo_incendiary"),
- hash = `COMPONENT_COMBATMG_MK2_CLIP_INCENDIARY`,
- },
- {
- name = "ammo_hollowpoint",
- label = TranslateCap("component_ammo_hollowpoint"),
- hash = `COMPONENT_COMBATMG_MK2_CLIP_ARMORPIERCING`,
- },
- { name = "ammo_fmj", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_COMBATMG_MK2_CLIP_FMJ` },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP_02` },
- { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
- {
- name = "scope_medium",
- label = TranslateCap("component_scope_medium"),
- hash = `COMPONENT_AT_SCOPE_SMALL_MK2`,
- },
- {
- name = "scope_large",
- label = TranslateCap("component_scope_large"),
- hash = `COMPONENT_AT_SCOPE_MEDIUM_MK2`,
- },
- { name = "muzzle_flat", label = TranslateCap("component_muzzle_flat"), hash = `COMPONENT_AT_MUZZLE_01` },
- {
- name = "muzzle_tactical",
- label = TranslateCap("component_muzzle_tactical"),
- hash = `COMPONENT_AT_MUZZLE_02`,
- },
- { name = "muzzle_fat", label = TranslateCap("component_muzzle_fat"), hash = `COMPONENT_AT_MUZZLE_03` },
- {
- name = "muzzle_precision",
- label = TranslateCap("component_muzzle_precision"),
- hash = `COMPONENT_AT_MUZZLE_04`,
- },
- { name = "muzzle_heavy", label = TranslateCap("component_muzzle_heavy"), hash = `COMPONENT_AT_MUZZLE_05` },
- {
- name = "muzzle_slanted",
- label = TranslateCap("component_muzzle_slanted"),
- hash = `COMPONENT_AT_MUZZLE_06`,
- },
- { name = "muzzle_split", label = TranslateCap("component_muzzle_split"), hash = `COMPONENT_AT_MUZZLE_07` },
- {
- name = "barrel_default",
- label = TranslateCap("component_barrel_default"),
- hash = `COMPONENT_AT_MG_BARREL_01`,
- },
- {
- name = "barrel_heavy",
- label = TranslateCap("component_barrel_heavy"),
- hash = `COMPONENT_AT_MG_BARREL_02`,
- },
- {
- name = "camo_finish",
- label = TranslateCap("component_camo_finish"),
- hash = `COMPONENT_COMBATMG_MK2_CAMO`,
- },
- {
- name = "camo_finish2",
- label = TranslateCap("component_camo_finish2"),
- hash = `COMPONENT_COMBATMG_MK2_CAMO_02`,
- },
- {
- name = "camo_finish3",
- label = TranslateCap("component_camo_finish3"),
- hash = `COMPONENT_COMBATMG_MK2_CAMO_03`,
- },
- {
- name = "camo_finish4",
- label = TranslateCap("component_camo_finish4"),
- hash = `COMPONENT_COMBATMG_MK2_CAMO_04`,
- },
- {
- name = "camo_finish5",
- label = TranslateCap("component_camo_finish5"),
- hash = `COMPONENT_COMBATMG_MK2_CAMO_05`,
- },
- {
- name = "camo_finish6",
- label = TranslateCap("component_camo_finish6"),
- hash = `COMPONENT_COMBATMG_MK2_CAMO_06`,
- },
- {
- name = "camo_finish7",
- label = TranslateCap("component_camo_finish7"),
- hash = `COMPONENT_COMBATMG_MK2_CAMO_07`,
- },
- {
- name = "camo_finish8",
- label = TranslateCap("component_camo_finish8"),
- hash = `COMPONENT_COMBATMG_MK2_CAMO_08`,
- },
- {
- name = "camo_finish9",
- label = TranslateCap("component_camo_finish9"),
- hash = `COMPONENT_COMBATMG_MK2_CAMO_09`,
- },
- {
- name = "camo_finish10",
- label = TranslateCap("component_camo_finish10"),
- hash = `COMPONENT_COMBATMG_MK2_CAMO_10`,
- },
- {
- name = "camo_finish11",
- label = TranslateCap("component_camo_finish11"),
- hash = `COMPONENT_COMBATMG_MK2_CAMO_IND_01`,
- },
- },
- },
- {
- name = "WEAPON_COMBATPDW",
- label = TranslateCap("weapon_combatpdw"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SMG` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_COMBATPDW_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_COMBATPDW_CLIP_02`,
- },
- { name = "clip_drum", label = TranslateCap("component_clip_drum"), hash = `COMPONENT_COMBATPDW_CLIP_03` },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_SMALL` },
- },
- },
- {
- name = "WEAPON_GUSENBERG",
- label = TranslateCap("weapon_gusenberg"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_MG` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_GUSENBERG_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_GUSENBERG_CLIP_02`,
- },
- },
- },
- {
- name = "WEAPON_MACHINEPISTOL",
- label = TranslateCap("weapon_machinepistol"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_MACHINEPISTOL_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_MACHINEPISTOL_CLIP_02`,
- },
- {
- name = "clip_drum",
- label = TranslateCap("component_clip_drum"),
- hash = `COMPONENT_MACHINEPISTOL_CLIP_03`,
- },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP` },
- },
- },
- {
- name = "WEAPON_MG",
- label = TranslateCap("weapon_mg"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_MG` },
- tints = Config.DefaultWeaponTints,
- components = {
- { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_MG_CLIP_01` },
- { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_MG_CLIP_02` },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_SMALL_02` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_MG_VARMOD_LOWRIDER`,
- },
- },
- },
- {
- name = "WEAPON_MICROSMG",
- label = TranslateCap("weapon_microsmg"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SMG` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_MICROSMG_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_MICROSMG_CLIP_02`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH` },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MACRO` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_MICROSMG_VARMOD_LUXE`,
- },
- },
- },
- {
- name = "WEAPON_MINISMG",
- label = TranslateCap("weapon_minismg"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SMG` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_MINISMG_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_MINISMG_CLIP_02`,
- },
- },
- },
- {
- name = "WEAPON_SMG",
- label = TranslateCap("weapon_smg"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SMG` },
- tints = Config.DefaultWeaponTints,
- components = {
- { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_SMG_CLIP_01` },
- { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_SMG_CLIP_02` },
- { name = "clip_drum", label = TranslateCap("component_clip_drum"), hash = `COMPONENT_SMG_CLIP_03` },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MACRO_02` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_SMG_VARMOD_LUXE`,
- },
- },
- },
- {
- name = "WEAPON_SMG_MK2",
- label = TranslateCap("weapon_smg_mk2"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SMG` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_SMG_MK2_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_SMG_MK2_CLIP_02`,
- },
- {
- name = "ammo_tracer",
- label = TranslateCap("component_ammo_tracer"),
- hash = `COMPONENT_SMG_MK2_CLIP_TRACER`,
- },
- {
- name = "ammo_incendiary",
- label = TranslateCap("component_ammo_incendiary"),
- hash = `COMPONENT_SMG_MK2_CLIP_INCENDIARY`,
- },
- {
- name = "ammo_hollowpoint",
- label = TranslateCap("component_ammo_hollowpoint"),
- hash = `COMPONENT_SMG_MK2_CLIP_HOLLOWPOINT`,
- },
- { name = "ammo_fmj", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_SMG_MK2_CLIP_FMJ` },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS_SMG` },
- {
- name = "scope_small",
- label = TranslateCap("component_scope_small"),
- hash = `COMPONENT_AT_SCOPE_MACRO_02_SMG_MK2`,
- },
- {
- name = "scope_medium",
- label = TranslateCap("component_scope_medium"),
- hash = `COMPONENT_AT_SCOPE_SMALL_SMG_MK2`,
- },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP` },
- { name = "muzzle_flat", label = TranslateCap("component_muzzle_flat"), hash = `COMPONENT_AT_MUZZLE_01` },
- {
- name = "muzzle_tactical",
- label = TranslateCap("component_muzzle_tactical"),
- hash = `COMPONENT_AT_MUZZLE_02`,
- },
- { name = "muzzle_fat", label = TranslateCap("component_muzzle_fat"), hash = `COMPONENT_AT_MUZZLE_03` },
- {
- name = "muzzle_precision",
- label = TranslateCap("component_muzzle_precision"),
- hash = `COMPONENT_AT_MUZZLE_04`,
- },
- { name = "muzzle_heavy", label = TranslateCap("component_muzzle_heavy"), hash = `COMPONENT_AT_MUZZLE_05` },
- {
- name = "muzzle_slanted",
- label = TranslateCap("component_muzzle_slanted"),
- hash = `COMPONENT_AT_MUZZLE_06`,
- },
- { name = "muzzle_split", label = TranslateCap("component_muzzle_split"), hash = `COMPONENT_AT_MUZZLE_07` },
- {
- name = "barrel_default",
- label = TranslateCap("component_barrel_default"),
- hash = `COMPONENT_AT_SB_BARREL_01`,
- },
- {
- name = "barrel_heavy",
- label = TranslateCap("component_barrel_heavy"),
- hash = `COMPONENT_AT_SB_BARREL_02`,
- },
- { name = "camo_finish", label = TranslateCap("component_camo_finish"), hash = `COMPONENT_SMG_MK2_CAMO` },
- {
- name = "camo_finish2",
- label = TranslateCap("component_camo_finish2"),
- hash = `COMPONENT_SMG_MK2_CAMO_02`,
- },
- {
- name = "camo_finish3",
- label = TranslateCap("component_camo_finish3"),
- hash = `COMPONENT_SMG_MK2_CAMO_03`,
- },
- {
- name = "camo_finish4",
- label = TranslateCap("component_camo_finish4"),
- hash = `COMPONENT_SMG_MK2_CAMO_04`,
- },
- {
- name = "camo_finish5",
- label = TranslateCap("component_camo_finish5"),
- hash = `COMPONENT_SMG_MK2_CAMO_05`,
- },
- {
- name = "camo_finish6",
- label = TranslateCap("component_camo_finish6"),
- hash = `COMPONENT_SMG_MK2_CAMO_06`,
- },
- {
- name = "camo_finish7",
- label = TranslateCap("component_camo_finish7"),
- hash = `COMPONENT_SMG_MK2_CAMO_07`,
- },
- {
- name = "camo_finish8",
- label = TranslateCap("component_camo_finish8"),
- hash = `COMPONENT_SMG_MK2_CAMO_08`,
- },
- {
- name = "camo_finish9",
- label = TranslateCap("component_camo_finish9"),
- hash = `COMPONENT_SMG_MK2_CAMO_09`,
- },
- {
- name = "camo_finish10",
- label = TranslateCap("component_camo_finish10"),
- hash = `COMPONENT_SMG_MK2_CAMO_10`,
- },
- {
- name = "camo_finish11",
- label = TranslateCap("component_camo_finish11"),
- hash = `COMPONENT_SMG_MK2_CAMO_IND_01`,
- },
- },
- },
- {
- name = "WEAPON_RAYCARBINE",
- label = TranslateCap("weapon_raycarbine"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SMG` },
- tints = Config.DefaultWeaponTints,
- components = {},
- },
- -- Rifles
- {
- name = "WEAPON_ADVANCEDRIFLE",
- label = TranslateCap("weapon_advancedrifle"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_ADVANCEDRIFLE_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_ADVANCEDRIFLE_CLIP_02`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_SMALL` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_ADVANCEDRIFLE_VARMOD_LUXE`,
- },
- },
- },
- {
- name = "WEAPON_ASSAULTRIFLE",
- label = TranslateCap("weapon_assaultrifle"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_ASSAULTRIFLE_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_ASSAULTRIFLE_CLIP_02`,
- },
- {
- name = "clip_drum",
- label = TranslateCap("component_clip_drum"),
- hash = `COMPONENT_ASSAULTRIFLE_CLIP_03`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MACRO` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_ASSAULTRIFLE_VARMOD_LUXE`,
- },
- },
- },
- {
- name = "WEAPON_ASSAULTRIFLE_MK2",
- label = TranslateCap("weapon_assaultrifle_mk2"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CLIP_02`,
- },
- {
- name = "ammo_tracer",
- label = TranslateCap("component_ammo_tracer"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CLIP_TRACER`,
- },
- {
- name = "ammo_incendiary",
- label = TranslateCap("component_ammo_incendiary"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CLIP_INCENDIARY`,
- },
- {
- name = "ammo_armor",
- label = TranslateCap("component_ammo_armor"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CLIP_ARMORPIERCING`,
- },
- {
- name = "ammo_fmj",
- label = TranslateCap("component_ammo_fmj"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CLIP_FMJ`,
- },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP_02` },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
- {
- name = "scope_small",
- label = TranslateCap("component_scope_small"),
- hash = `COMPONENT_AT_SCOPE_MACRO_MK2`,
- },
- {
- name = "scope_large",
- label = TranslateCap("component_scope_large"),
- hash = `COMPONENT_AT_SCOPE_MEDIUM_MK2`,
- },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
- { name = "muzzle_flat", label = TranslateCap("component_muzzle_flat"), hash = `COMPONENT_AT_MUZZLE_01` },
- {
- name = "muzzle_tactical",
- label = TranslateCap("component_muzzle_tactical"),
- hash = `COMPONENT_AT_MUZZLE_02`,
- },
- { name = "muzzle_fat", label = TranslateCap("component_muzzle_fat"), hash = `COMPONENT_AT_MUZZLE_03` },
- {
- name = "muzzle_precision",
- label = TranslateCap("component_muzzle_precision"),
- hash = `COMPONENT_AT_MUZZLE_04`,
- },
- { name = "muzzle_heavy", label = TranslateCap("component_muzzle_heavy"), hash = `COMPONENT_AT_MUZZLE_05` },
- {
- name = "muzzle_slanted",
- label = TranslateCap("component_muzzle_slanted"),
- hash = `COMPONENT_AT_MUZZLE_06`,
- },
- { name = "muzzle_split", label = TranslateCap("component_muzzle_split"), hash = `COMPONENT_AT_MUZZLE_07` },
- {
- name = "barrel_default",
- label = TranslateCap("component_barrel_default"),
- hash = `COMPONENT_AT_AR_BARREL_01`,
- },
- {
- name = "barrel_heavy",
- label = TranslateCap("component_barrel_heavy"),
- hash = `COMPONENT_AT_AR_BARREL_02`,
- },
- {
- name = "camo_finish",
- label = TranslateCap("component_camo_finish"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO`,
- },
- {
- name = "camo_finish2",
- label = TranslateCap("component_camo_finish2"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_02`,
- },
- {
- name = "camo_finish3",
- label = TranslateCap("component_camo_finish3"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_03`,
- },
- {
- name = "camo_finish4",
- label = TranslateCap("component_camo_finish4"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_04`,
- },
- {
- name = "camo_finish5",
- label = TranslateCap("component_camo_finish5"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_05`,
- },
- {
- name = "camo_finish6",
- label = TranslateCap("component_camo_finish6"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_06`,
- },
- {
- name = "camo_finish7",
- label = TranslateCap("component_camo_finish7"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_07`,
- },
- {
- name = "camo_finish8",
- label = TranslateCap("component_camo_finish8"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_08`,
- },
- {
- name = "camo_finish9",
- label = TranslateCap("component_camo_finish9"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_09`,
- },
- {
- name = "camo_finish10",
- label = TranslateCap("component_camo_finish10"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_10`,
- },
- {
- name = "camo_finish11",
- label = TranslateCap("component_camo_finish11"),
- hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_IND_01`,
- },
- },
- },
- {
- name = "WEAPON_BULLPUPRIFLE",
- label = TranslateCap("weapon_bullpuprifle"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_BULLPUPRIFLE_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_BULLPUPRIFLE_CLIP_02`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_SMALL` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_BULLPUPRIFLE_VARMOD_LOW`,
- },
- },
- },
- {
- name = "WEAPON_BULLPUPRIFLE_MK2",
- label = TranslateCap("weapon_bullpuprifle_mk2"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CLIP_02`,
- },
- {
- name = "ammo_tracer",
- label = TranslateCap("component_ammo_tracer"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CLIP_TRACER`,
- },
- {
- name = "ammo_incendiary",
- label = TranslateCap("component_ammo_incendiary"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CLIP_INCENDIARY`,
- },
- {
- name = "ammo_armor",
- label = TranslateCap("component_ammo_armor"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CLIP_ARMORPIERCING`,
- },
- {
- name = "ammo_fmj",
- label = TranslateCap("component_ammo_fmj"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CLIP_FMJ`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
- {
- name = "scope_small",
- label = TranslateCap("component_scope_small"),
- hash = `COMPONENT_AT_SCOPE_MACRO_02_MK2`,
- },
- {
- name = "scope_medium",
- label = TranslateCap("component_scope_medium"),
- hash = `COMPONENT_AT_SCOPE_SMALL_MK2`,
- },
- {
- name = "barrel_default",
- label = TranslateCap("component_barrel_default"),
- hash = `COMPONENT_AT_BP_BARREL_01`,
- },
- {
- name = "barrel_heavy",
- label = TranslateCap("component_barrel_heavy"),
- hash = `COMPONENT_AT_BP_BARREL_02`,
- },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
- { name = "muzzle_flat", label = TranslateCap("component_muzzle_flat"), hash = `COMPONENT_AT_MUZZLE_01` },
- {
- name = "muzzle_tactical",
- label = TranslateCap("component_muzzle_tactical"),
- hash = `COMPONENT_AT_MUZZLE_02`,
- },
- { name = "muzzle_fat", label = TranslateCap("component_muzzle_fat"), hash = `COMPONENT_AT_MUZZLE_03` },
- {
- name = "muzzle_precision",
- label = TranslateCap("component_muzzle_precision"),
- hash = `COMPONENT_AT_MUZZLE_04`,
- },
- { name = "muzzle_heavy", label = TranslateCap("component_muzzle_heavy"), hash = `COMPONENT_AT_MUZZLE_05` },
- {
- name = "muzzle_slanted",
- label = TranslateCap("component_muzzle_slanted"),
- hash = `COMPONENT_AT_MUZZLE_06`,
- },
- { name = "muzzle_split", label = TranslateCap("component_muzzle_split"), hash = `COMPONENT_AT_MUZZLE_07` },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP_02` },
- {
- name = "camo_finish",
- label = TranslateCap("component_camo_finish"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO`,
- },
- {
- name = "camo_finish2",
- label = TranslateCap("component_camo_finish2"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_02`,
- },
- {
- name = "camo_finish3",
- label = TranslateCap("component_camo_finish3"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_03`,
- },
- {
- name = "camo_finish4",
- label = TranslateCap("component_camo_finish4"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_04`,
- },
- {
- name = "camo_finish5",
- label = TranslateCap("component_camo_finish5"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_05`,
- },
- {
- name = "camo_finish6",
- label = TranslateCap("component_camo_finish6"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_06`,
- },
- {
- name = "camo_finish7",
- label = TranslateCap("component_camo_finish7"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_07`,
- },
- {
- name = "camo_finish8",
- label = TranslateCap("component_camo_finish8"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_08`,
- },
- {
- name = "camo_finish9",
- label = TranslateCap("component_camo_finish9"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_09`,
- },
- {
- name = "camo_finish10",
- label = TranslateCap("component_camo_finish10"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_10`,
- },
- {
- name = "camo_finish11",
- label = TranslateCap("component_camo_finish11"),
- hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_IND_01`,
- },
- },
- },
- {
- name = "WEAPON_CARBINERIFLE",
- label = TranslateCap("weapon_carbinerifle"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_CARBINERIFLE_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_CARBINERIFLE_CLIP_02`,
- },
- { name = "clip_box", label = TranslateCap("component_clip_box"), hash = `COMPONENT_CARBINERIFLE_CLIP_03` },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MEDIUM` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_CARBINERIFLE_VARMOD_LUXE`,
- },
- },
- },
- {
- name = "WEAPON_CARBINERIFLE_MK2",
- label = TranslateCap("weapon_carbinerifle_mk2"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CLIP_02`,
- },
- {
- name = "ammo_tracer",
- label = TranslateCap("component_ammo_tracer"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CLIP_TRACER`,
- },
- {
- name = "ammo_incendiary",
- label = TranslateCap("component_ammo_incendiary"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CLIP_INCENDIARY`,
- },
- {
- name = "ammo_armor",
- label = TranslateCap("component_ammo_armor"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CLIP_ARMORPIERCING`,
- },
- {
- name = "ammo_fmj",
- label = TranslateCap("component_ammo_fmj"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CLIP_FMJ`,
- },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP_02` },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
- {
- name = "scope_medium",
- label = TranslateCap("component_scope_medium"),
- hash = `COMPONENT_AT_SCOPE_MACRO_MK2`,
- },
- {
- name = "scope_large",
- label = TranslateCap("component_scope_large"),
- hash = `COMPONENT_AT_SCOPE_MEDIUM_MK2`,
- },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
- { name = "muzzle_flat", label = TranslateCap("component_muzzle_flat"), hash = `COMPONENT_AT_MUZZLE_01` },
- {
- name = "muzzle_tactical",
- label = TranslateCap("component_muzzle_tactical"),
- hash = `COMPONENT_AT_MUZZLE_02`,
- },
- { name = "muzzle_fat", label = TranslateCap("component_muzzle_fat"), hash = `COMPONENT_AT_MUZZLE_03` },
- {
- name = "muzzle_precision",
- label = TranslateCap("component_muzzle_precision"),
- hash = `COMPONENT_AT_MUZZLE_04`,
- },
- { name = "muzzle_heavy", label = TranslateCap("component_muzzle_heavy"), hash = `COMPONENT_AT_MUZZLE_05` },
- {
- name = "muzzle_slanted",
- label = TranslateCap("component_muzzle_slanted"),
- hash = `COMPONENT_AT_MUZZLE_06`,
- },
- { name = "muzzle_split", label = TranslateCap("component_muzzle_split"), hash = `COMPONENT_AT_MUZZLE_07` },
- {
- name = "barrel_default",
- label = TranslateCap("component_barrel_default"),
- hash = `COMPONENT_AT_CR_BARREL_01`,
- },
- {
- name = "barrel_heavy",
- label = TranslateCap("component_barrel_heavy"),
- hash = `COMPONENT_AT_CR_BARREL_02`,
- },
- {
- name = "camo_finish",
- label = TranslateCap("component_camo_finish"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CAMO`,
- },
- {
- name = "camo_finish2",
- label = TranslateCap("component_camo_finish2"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_02`,
- },
- {
- name = "camo_finish3",
- label = TranslateCap("component_camo_finish3"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_03`,
- },
- {
- name = "camo_finish4",
- label = TranslateCap("component_camo_finish4"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_04`,
- },
- {
- name = "camo_finish5",
- label = TranslateCap("component_camo_finish5"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_05`,
- },
- {
- name = "camo_finish6",
- label = TranslateCap("component_camo_finish6"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_06`,
- },
- {
- name = "camo_finish7",
- label = TranslateCap("component_camo_finish7"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_07`,
- },
- {
- name = "camo_finish8",
- label = TranslateCap("component_camo_finish8"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_08`,
- },
- {
- name = "camo_finish9",
- label = TranslateCap("component_camo_finish9"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_09`,
- },
- {
- name = "camo_finish10",
- label = TranslateCap("component_camo_finish10"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_10`,
- },
- {
- name = "camo_finish11",
- label = TranslateCap("component_camo_finish11"),
- hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_IND_01`,
- },
- },
- },
- {
- name = "WEAPON_COMPACTRIFLE",
- label = TranslateCap("weapon_compactrifle"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_COMPACTRIFLE_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_COMPACTRIFLE_CLIP_02`,
- },
- {
- name = "clip_drum",
- label = TranslateCap("component_clip_drum"),
- hash = `COMPONENT_COMPACTRIFLE_CLIP_03`,
- },
- },
- },
- {
- name = "WEAPON_MILITARYRIFLE",
- label = TranslateCap("weapon_militaryrifle"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_MILITARYRIFLE_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_MILITARYRIFLE_CLIP_02`,
- },
- {
- name = "ironsights",
- label = TranslateCap("component_ironsights"),
- hash = `COMPONENT_MILITARYRIFLE_SIGHT_01`,
- },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_SMALL` },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
- },
- },
- {
- name = "WEAPON_SPECIALCARBINE",
- label = TranslateCap("weapon_specialcarbine"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_SPECIALCARBINE_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_SPECIALCARBINE_CLIP_02`,
- },
- {
- name = "clip_drum",
- label = TranslateCap("component_clip_drum"),
- hash = `COMPONENT_SPECIALCARBINE_CLIP_03`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MEDIUM` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_SPECIALCARBINE_VARMOD_LOWRIDER`,
- },
- },
- },
- {
- name = "WEAPON_SPECIALCARBINE_MK2",
- label = TranslateCap("weapon_specialcarbine_mk2"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CLIP_02`,
- },
- {
- name = "ammo_tracer",
- label = TranslateCap("component_ammo_tracer"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CLIP_TRACER`,
- },
- {
- name = "ammo_incendiary",
- label = TranslateCap("component_ammo_incendiary"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CLIP_INCENDIARY`,
- },
- {
- name = "ammo_armor",
- label = TranslateCap("component_ammo_armor"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CLIP_ARMORPIERCING`,
- },
- {
- name = "ammo_fmj",
- label = TranslateCap("component_ammo_fmj"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CLIP_FMJ`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
- {
- name = "scope_small",
- label = TranslateCap("component_scope_small"),
- hash = `COMPONENT_AT_SCOPE_MACRO_MK2`,
- },
- {
- name = "scope_large",
- label = TranslateCap("component_scope_large"),
- hash = `COMPONENT_AT_SCOPE_MEDIUM_MK2`,
- },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
- { name = "muzzle_flat", label = TranslateCap("component_muzzle_flat"), hash = `COMPONENT_AT_MUZZLE_01` },
- {
- name = "muzzle_tactical",
- label = TranslateCap("component_muzzle_tactical"),
- hash = `COMPONENT_AT_MUZZLE_02`,
- },
- { name = "muzzle_fat", label = TranslateCap("component_muzzle_fat"), hash = `COMPONENT_AT_MUZZLE_03` },
- {
- name = "muzzle_precision",
- label = TranslateCap("component_muzzle_precision"),
- hash = `COMPONENT_AT_MUZZLE_04`,
- },
- { name = "muzzle_heavy", label = TranslateCap("component_muzzle_heavy"), hash = `COMPONENT_AT_MUZZLE_05` },
- {
- name = "muzzle_slanted",
- label = TranslateCap("component_muzzle_slanted"),
- hash = `COMPONENT_AT_MUZZLE_06`,
- },
- { name = "muzzle_split", label = TranslateCap("component_muzzle_split"), hash = `COMPONENT_AT_MUZZLE_07` },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP_02` },
- {
- name = "barrel_default",
- label = TranslateCap("component_barrel_default"),
- hash = `COMPONENT_AT_SC_BARREL_01`,
- },
- {
- name = "barrel_heavy",
- label = TranslateCap("component_barrel_heavy"),
- hash = `COMPONENT_AT_SC_BARREL_02`,
- },
- {
- name = "camo_finish",
- label = TranslateCap("component_camo_finish"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO`,
- },
- {
- name = "camo_finish2",
- label = TranslateCap("component_camo_finish2"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_02`,
- },
- {
- name = "camo_finish3",
- label = TranslateCap("component_camo_finish3"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_03`,
- },
- {
- name = "camo_finish4",
- label = TranslateCap("component_camo_finish4"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_04`,
- },
- {
- name = "camo_finish5",
- label = TranslateCap("component_camo_finish5"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_05`,
- },
- {
- name = "camo_finish6",
- label = TranslateCap("component_camo_finish6"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_06`,
- },
- {
- name = "camo_finish7",
- label = TranslateCap("component_camo_finish7"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_07`,
- },
- {
- name = "camo_finish8",
- label = TranslateCap("component_camo_finish8"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_08`,
- },
- {
- name = "camo_finish9",
- label = TranslateCap("component_camo_finish9"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_09`,
- },
- {
- name = "camo_finish10",
- label = TranslateCap("component_camo_finish10"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_10`,
- },
- {
- name = "camo_finish11",
- label = TranslateCap("component_camo_finish11"),
- hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_IND_01`,
- },
- },
- },
- {
- name = "WEAPON_HEAVYRIFLE",
- label = TranslateCap("weapon_heavyrifle"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_HEAVYRIFLE_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_HEAVYRIFLE_CLIP_02`,
- },
- {
- name = "scope_holo",
- label = TranslateCap("component_scope_holo"),
- hash = `COMPONENT_HEAVYRIFLE_SIGHT_01`,
- },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MEDIUM` },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
- },
- },
- -- Sniper
- {
- name = "WEAPON_HEAVYSNIPER",
- label = TranslateCap("weapon_heavysniper"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SNIPER` },
- tints = Config.DefaultWeaponTints,
- components = {
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_LARGE` },
- {
- name = "scope_advanced",
- label = TranslateCap("component_scope_advanced"),
- hash = `COMPONENT_AT_SCOPE_MAX`,
- },
- },
- },
- {
- name = "WEAPON_HEAVYSNIPER_MK2",
- label = TranslateCap("weapon_heavysniper_mk2"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SNIPER` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CLIP_02`,
- },
- {
- name = "ammo_incendiary",
- label = TranslateCap("component_ammo_incendiary"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CLIP_INCENDIARY`,
- },
- {
- name = "ammo_armor",
- label = TranslateCap("component_ammo_armor"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CLIP_ARMORPIERCING`,
- },
- {
- name = "ammo_fmj",
- label = TranslateCap("component_ammo_fmj"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CLIP_FMJ`,
- },
- {
- name = "ammo_explosive",
- label = TranslateCap("component_ammo_explosive"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CLIP_EXPLOSIVE`,
- },
- {
- name = "scope_zoom",
- label = TranslateCap("component_scope_zoom"),
- hash = `COMPONENT_AT_SCOPE_LARGE_MK2`,
- },
- {
- name = "scope_advanced",
- label = TranslateCap("component_scope_advanced"),
- hash = `COMPONENT_AT_SCOPE_MAX`,
- },
- {
- name = "scope_nightvision",
- label = TranslateCap("component_scope_nightvision"),
- hash = `COMPONENT_AT_SCOPE_NV`,
- },
- {
- name = "scope_thermal",
- label = TranslateCap("component_scope_thermal"),
- hash = `COMPONENT_AT_SCOPE_THERMAL`,
- },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_SR_SUPP_03` },
- {
- name = "muzzle_squared",
- label = TranslateCap("component_muzzle_squared"),
- hash = `COMPONENT_AT_MUZZLE_08`,
- },
- { name = "muzzle_bell", label = TranslateCap("component_muzzle_bell"), hash = `COMPONENT_AT_MUZZLE_09` },
- {
- name = "barrel_default",
- label = TranslateCap("component_barrel_default"),
- hash = `COMPONENT_AT_SR_BARREL_01`,
- },
- {
- name = "barrel_heavy",
- label = TranslateCap("component_barrel_heavy"),
- hash = `COMPONENT_AT_SR_BARREL_02`,
- },
- {
- name = "camo_finish",
- label = TranslateCap("component_camo_finish"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO`,
- },
- {
- name = "camo_finish2",
- label = TranslateCap("component_camo_finish2"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_02`,
- },
- {
- name = "camo_finish3",
- label = TranslateCap("component_camo_finish3"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_03`,
- },
- {
- name = "camo_finish4",
- label = TranslateCap("component_camo_finish4"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_04`,
- },
- {
- name = "camo_finish5",
- label = TranslateCap("component_camo_finish5"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_05`,
- },
- {
- name = "camo_finish6",
- label = TranslateCap("component_camo_finish6"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_06`,
- },
- {
- name = "camo_finish7",
- label = TranslateCap("component_camo_finish7"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_07`,
- },
- {
- name = "camo_finish8",
- label = TranslateCap("component_camo_finish8"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_08`,
- },
- {
- name = "camo_finish9",
- label = TranslateCap("component_camo_finish9"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_09`,
- },
- {
- name = "camo_finish10",
- label = TranslateCap("component_camo_finish10"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_10`,
- },
- {
- name = "camo_finish11",
- label = TranslateCap("component_camo_finish11"),
- hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_IND_01`,
- },
- },
- },
- {
- name = "WEAPON_MARKSMANRIFLE",
- label = TranslateCap("weapon_marksmanrifle"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SNIPER` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_MARKSMANRIFLE_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_MARKSMANRIFLE_CLIP_02`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_LARGE_FIXED_ZOOM` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_MARKSMANRIFLE_VARMOD_LUXE`,
- },
- },
- },
- {
- name = "WEAPON_MARKSMANRIFLE_MK2",
- label = TranslateCap("weapon_marksmanrifle_mk2"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SNIPER` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CLIP_02`,
- },
- {
- name = "ammo_tracer",
- label = TranslateCap("component_ammo_tracer"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CLIP_TRACER`,
- },
- {
- name = "ammo_incendiary",
- label = TranslateCap("component_ammo_incendiary"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CLIP_INCENDIARY`,
- },
- {
- name = "ammo_armor",
- label = TranslateCap("component_ammo_armor"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CLIP_ARMORPIERCING`,
- },
- {
- name = "ammo_fmj",
- label = TranslateCap("component_ammo_fmj"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CLIP_FMJ`,
- },
- { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
- {
- name = "scope_large",
- label = TranslateCap("component_scope_large"),
- hash = `COMPONENT_AT_SCOPE_MEDIUM_MK2`,
- },
- {
- name = "scope_zoom",
- label = TranslateCap("component_scope_zoom"),
- hash = `COMPONENT_AT_SCOPE_LARGE_FIXED_ZOOM_MK2`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
- { name = "muzzle_flat", label = TranslateCap("component_muzzle_flat"), hash = `COMPONENT_AT_MUZZLE_01` },
- {
- name = "muzzle_tactical",
- label = TranslateCap("component_muzzle_tactical"),
- hash = `COMPONENT_AT_MUZZLE_02`,
- },
- { name = "muzzle_fat", label = TranslateCap("component_muzzle_fat"), hash = `COMPONENT_AT_MUZZLE_03` },
- {
- name = "muzzle_precision",
- label = TranslateCap("component_muzzle_precision"),
- hash = `COMPONENT_AT_MUZZLE_04`,
- },
- { name = "muzzle_heavy", label = TranslateCap("component_muzzle_heavy"), hash = `COMPONENT_AT_MUZZLE_05` },
- {
- name = "muzzle_slanted",
- label = TranslateCap("component_muzzle_slanted"),
- hash = `COMPONENT_AT_MUZZLE_06`,
- },
- { name = "muzzle_split", label = TranslateCap("component_muzzle_split"), hash = `COMPONENT_AT_MUZZLE_07` },
- {
- name = "barrel_default",
- label = TranslateCap("component_barrel_default"),
- hash = `COMPONENT_AT_MRFL_BARREL_01`,
- },
- {
- name = "barrel_heavy",
- label = TranslateCap("component_barrel_heavy"),
- hash = `COMPONENT_AT_MRFL_BARREL_02`,
- },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP_02` },
- {
- name = "camo_finish",
- label = TranslateCap("component_camo_finish"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO`,
- },
- {
- name = "camo_finish2",
- label = TranslateCap("component_camo_finish2"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_02`,
- },
- {
- name = "camo_finish3",
- label = TranslateCap("component_camo_finish3"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_03`,
- },
- {
- name = "camo_finish4",
- label = TranslateCap("component_camo_finish4"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_04`,
- },
- {
- name = "camo_finish5",
- label = TranslateCap("component_camo_finish5"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_05`,
- },
- {
- name = "camo_finish6",
- label = TranslateCap("component_camo_finish6"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_06`,
- },
- {
- name = "camo_finish7",
- label = TranslateCap("component_camo_finish7"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_07`,
- },
- {
- name = "camo_finish8",
- label = TranslateCap("component_camo_finish8"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_08`,
- },
- {
- name = "camo_finish9",
- label = TranslateCap("component_camo_finish9"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_09`,
- },
- {
- name = "camo_finish10",
- label = TranslateCap("component_camo_finish10"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_10`,
- },
- {
- name = "camo_finish11",
- label = TranslateCap("component_camo_finish11"),
- hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_IND_01`,
- },
- },
- },
- {
- name = "WEAPON_SNIPERRIFLE",
- label = TranslateCap("weapon_sniperrifle"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SNIPER` },
- tints = Config.DefaultWeaponTints,
- components = {
- { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_LARGE` },
- {
- name = "scope_advanced",
- label = TranslateCap("component_scope_advanced"),
- hash = `COMPONENT_AT_SCOPE_MAX`,
- },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
- {
- name = "luxary_finish",
- label = TranslateCap("component_luxary_finish"),
- hash = `COMPONENT_SNIPERRIFLE_VARMOD_LUXE`,
- },
- },
- },
- -- Heavy / Launchers
- {
- name = "WEAPON_COMPACTLAUNCHER",
- label = TranslateCap("weapon_compactlauncher"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_grenadelauncher"), hash = `AMMO_GRENADELAUNCHER` },
- },
- {
- name = "WEAPON_FIREWORK",
- label = TranslateCap("weapon_firework"),
- components = {},
- ammo = { label = TranslateCap("ammo_firework"), hash = `AMMO_FIREWORK` },
- },
- {
- name = "WEAPON_GRENADELAUNCHER",
- label = TranslateCap("weapon_grenadelauncher"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_grenadelauncher"), hash = `AMMO_GRENADELAUNCHER` },
- },
- {
- name = "WEAPON_HOMINGLAUNCHER",
- label = TranslateCap("weapon_hominglauncher"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_rockets"), hash = `AMMO_HOMINGLAUNCHER` },
- },
- {
- name = "WEAPON_MINIGUN",
- label = TranslateCap("weapon_minigun"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_MINIGUN` },
- },
- {
- name = "WEAPON_RAILGUN",
- label = TranslateCap("weapon_railgun"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RAILGUN` },
- },
- {
- name = "WEAPON_RPG",
- label = TranslateCap("weapon_rpg"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_rockets"), hash = `AMMO_RPG` },
- },
- {
- name = "WEAPON_RAYMINIGUN",
- label = TranslateCap("weapon_rayminigun"),
- tints = Config.DefaultWeaponTints,
- components = {},
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_MINIGUN` },
- },
- -- Thrown
- {
- name = "WEAPON_BALL",
- label = TranslateCap("weapon_ball"),
- components = {},
- ammo = { label = TranslateCap("ammo_ball"), hash = `AMMO_BALL` },
- },
- {
- name = "WEAPON_BZGAS",
- label = TranslateCap("weapon_bzgas"),
- components = {},
- ammo = { label = TranslateCap("ammo_bzgas"), hash = `AMMO_BZGAS` },
- },
- {
- name = "WEAPON_FLARE",
- label = TranslateCap("weapon_flare"),
- components = {},
- ammo = { label = TranslateCap("ammo_flare"), hash = `AMMO_FLARE` },
- },
- {
- name = "WEAPON_GRENADE",
- label = TranslateCap("weapon_grenade"),
- components = {},
- ammo = { label = TranslateCap("ammo_grenade"), hash = `AMMO_GRENADE` },
- },
- {
- name = "WEAPON_PETROLCAN",
- label = TranslateCap("weapon_petrolcan"),
- components = {},
- ammo = { label = TranslateCap("ammo_petrol"), hash = `AMMO_PETROLCAN` },
- },
- {
- name = "WEAPON_HAZARDCAN",
- label = TranslateCap("weapon_hazardcan"),
- components = {},
- ammo = { label = TranslateCap("ammo_petrol"), hash = `AMMO_PETROLCAN` },
- },
- {
- name = "WEAPON_MOLOTOV",
- label = TranslateCap("weapon_molotov"),
- components = {},
- ammo = { label = TranslateCap("ammo_molotov"), hash = `AMMO_MOLOTOV` },
- },
- {
- name = "WEAPON_PROXMINE",
- label = TranslateCap("weapon_proxmine"),
- components = {},
- ammo = { label = TranslateCap("ammo_proxmine"), hash = `AMMO_PROXMINE` },
- },
- {
- name = "WEAPON_PIPEBOMB",
- label = TranslateCap("weapon_pipebomb"),
- components = {},
- ammo = { label = TranslateCap("ammo_pipebomb"), hash = `AMMO_PIPEBOMB` },
- },
- {
- name = "WEAPON_SNOWBALL",
- label = TranslateCap("weapon_snowball"),
- components = {},
- ammo = { label = TranslateCap("ammo_snowball"), hash = `AMMO_SNOWBALL` },
- },
- {
- name = "WEAPON_STICKYBOMB",
- label = TranslateCap("weapon_stickybomb"),
- components = {},
- ammo = { label = TranslateCap("ammo_stickybomb"), hash = `AMMO_STICKYBOMB` },
- },
- {
- name = "WEAPON_SMOKEGRENADE",
- label = TranslateCap("weapon_smokegrenade"),
- components = {},
- ammo = { label = TranslateCap("ammo_smokebomb"), hash = `AMMO_SMOKEGRENADE` },
- },
- -- Tools
- {
- name = "WEAPON_FIREEXTINGUISHER",
- label = TranslateCap("weapon_fireextinguisher"),
- components = {},
- ammo = { label = TranslateCap("ammo_charge"), hash = `AMMO_FIREEXTINGUISHER` },
- },
- { name = "WEAPON_DIGISCANNER", label = TranslateCap("weapon_digiscanner"), components = {} },
- { name = "GADGET_PARACHUTE", label = TranslateCap("gadget_parachute"), components = {} },
- {
- name = "WEAPON_TACTICALRIFLE",
- label = TranslateCap("weapon_tactilerifle"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_TACTICALRIFLE_CLIP_01`,
- },
- {
- name = "clip_extended",
- label = TranslateCap("component_clip_extended"),
- hash = `COMPONENT_TACTICALRIFLE_CLIP_02`,
- },
- { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH_REH` },
- { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
- },
- },
- {
- name = "WEAPON_PRECISIONRIFLE",
- label = TranslateCap("weapon_precisionrifle"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SNIPER` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_PRECISIONRIFLE_CLIP_01`,
- },
- },
- },
- { name = "WEAPON_METALDETECTOR", label = TranslateCap("weapon_metaldetector"), components = {} },
- {
- name = "WEAPON_PISTOLXM3",
- label = TranslateCap("weapon_pistolxm3"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_PISTOLXM3_CLIP_01`,
- },
- { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_PISTOLXM3_SUPP` },
- },
- },
- { name = "WEAPON_ACIDPACKAGE", label = TranslateCap("weapon_acidpackage"), components = {} },
- { name = "WEAPON_CANDYCANE", label = TranslateCap("weapon_candycane"), components = {} },
- {
- name = "WEAPON_RAILGUNXM3",
- label = TranslateCap("weapon_railgunxm3"),
- ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RAILGUN` },
- tints = Config.DefaultWeaponTints,
- components = {
- {
- name = "clip_default",
- label = TranslateCap("component_clip_default"),
- hash = `COMPONENT_RAILGUNXM3_CLIP_01`,
- },
- },
- },
+ -- Melee
+ { name = "WEAPON_DAGGER", label = TranslateCap("weapon_dagger"), components = {} },
+ { name = "WEAPON_BAT", label = TranslateCap("weapon_bat"), components = {} },
+ { name = "WEAPON_BATTLEAXE", label = TranslateCap("weapon_battleaxe"), components = {} },
+ {
+ name = "WEAPON_KNUCKLE",
+ label = TranslateCap("weapon_knuckle"),
+ components = {
+ { name = "knuckle_base", label = TranslateCap("component_knuckle_base"), hash = `COMPONENT_KNUCKLE_VARMOD_BASE` },
+ { name = "knuckle_pimp", label = TranslateCap("component_knuckle_pimp"), hash = `COMPONENT_KNUCKLE_VARMOD_PIMP` },
+ { name = "knuckle_ballas", label = TranslateCap("component_knuckle_ballas"), hash = `COMPONENT_KNUCKLE_VARMOD_BALLAS` },
+ { name = "knuckle_dollar", label = TranslateCap("component_knuckle_dollar"), hash = `COMPONENT_KNUCKLE_VARMOD_DOLLAR` },
+ { name = "knuckle_diamond", label = TranslateCap("component_knuckle_diamond"), hash = `COMPONENT_KNUCKLE_VARMOD_DIAMOND` },
+ { name = "knuckle_hate", label = TranslateCap("component_knuckle_hate"), hash = `COMPONENT_KNUCKLE_VARMOD_HATE` },
+ { name = "knuckle_love", label = TranslateCap("component_knuckle_love"), hash = `COMPONENT_KNUCKLE_VARMOD_LOVE` },
+ { name = "knuckle_player", label = TranslateCap("component_knuckle_player"), hash = `COMPONENT_KNUCKLE_VARMOD_PLAYER` },
+ { name = "knuckle_king", label = TranslateCap("component_knuckle_king"), hash = `COMPONENT_KNUCKLE_VARMOD_KING` },
+ { name = "knuckle_vagos", label = TranslateCap("component_knuckle_vagos"), hash = `COMPONENT_KNUCKLE_VARMOD_VAGOS` },
+ },
+ },
+ { name = "WEAPON_BOTTLE", label = TranslateCap("weapon_bottle"), components = {} },
+ { name = "WEAPON_CROWBAR", label = TranslateCap("weapon_crowbar"), components = {} },
+ { name = "WEAPON_FLASHLIGHT", label = TranslateCap("weapon_flashlight"), components = {} },
+ { name = "WEAPON_GOLFCLUB", label = TranslateCap("weapon_golfclub"), components = {} },
+ { name = "WEAPON_HAMMER", label = TranslateCap("weapon_hammer"), components = {} },
+ { name = "WEAPON_HATCHET", label = TranslateCap("weapon_hatchet"), components = {} },
+ { name = "WEAPON_KNIFE", label = TranslateCap("weapon_knife"), components = {} },
+ { name = "WEAPON_MACHETE", label = TranslateCap("weapon_machete"), components = {} },
+ { name = "WEAPON_NIGHTSTICK", label = TranslateCap("weapon_nightstick"), components = {} },
+ { name = "WEAPON_WRENCH", label = TranslateCap("weapon_wrench"), components = {} },
+ { name = "WEAPON_POOLCUE", label = TranslateCap("weapon_poolcue"), components = {} },
+ { name = "WEAPON_STONE_HATCHET", label = TranslateCap("weapon_stone_hatchet"), components = {} },
+ {
+ name = "WEAPON_SWITCHBLADE",
+ label = TranslateCap("weapon_switchblade"),
+ components = {
+ { name = "handle_default", label = TranslateCap("component_handle_default"), hash = `COMPONENT_SWITCHBLADE_VARMOD_BASE` },
+ { name = "handle_vip", label = TranslateCap("component_handle_vip"), hash = `COMPONENT_SWITCHBLADE_VARMOD_VAR1` },
+ { name = "handle_bodyguard", label = TranslateCap("component_handle_bodyguard"), hash = `COMPONENT_SWITCHBLADE_VARMOD_VAR2` },
+ },
+ },
+ -- Handguns
+ {
+ name = "WEAPON_APPISTOL",
+ label = TranslateCap("weapon_appistol"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_APPISTOL_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_APPISTOL_CLIP_02` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_APPISTOL_VARMOD_LUXE` },
+ },
+ },
+ { name = "WEAPON_CERAMICPISTOL", label = TranslateCap("weapon_ceramicpistol"), tints = Config.DefaultWeaponTints, components = {}, ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` } },
+ {
+ name = "WEAPON_COMBATPISTOL",
+ label = TranslateCap("weapon_combatpistol"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_COMBATPISTOL_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_COMBATPISTOL_CLIP_02` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_COMBATPISTOL_VARMOD_LOWRIDER` },
+ },
+ },
+ { name = "WEAPON_DOUBLEACTION", label = TranslateCap("weapon_doubleaction"), tints = Config.DefaultWeaponTints, components = {}, ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` } },
+ { name = "WEAPON_NAVYREVOLVER", label = TranslateCap("weapon_navyrevolver"), tints = Config.DefaultWeaponTints, components = {}, ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` } },
+ { name = "WEAPON_FLAREGUN", label = TranslateCap("weapon_flaregun"), tints = Config.DefaultWeaponTints, components = {}, ammo = { label = TranslateCap("ammo_flaregun"), hash = `AMMO_FLAREGUN` } },
+ { name = "WEAPON_GADGETPISTOL", label = TranslateCap("weapon_gadgetpistol"), tints = Config.DefaultWeaponTints, components = {}, ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` } },
+ {
+ name = "WEAPON_HEAVYPISTOL",
+ label = TranslateCap("weapon_heavypistol"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_HEAVYPISTOL_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_HEAVYPISTOL_CLIP_02` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_HEAVYPISTOL_VARMOD_LUXE` },
+ },
+ },
+ {
+ name = "WEAPON_REVOLVER",
+ label = TranslateCap("weapon_revolver"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_REVOLVER_CLIP_01` },
+ { name = "vip_finish", label = TranslateCap("component_vip_finish"), hash = `COMPONENT_REVOLVER_VARMOD_BOSS` },
+ { name = "bodyguard_finish", label = TranslateCap("component_bodyguard_finish"), hash = `COMPONENT_REVOLVER_VARMOD_GOON` },
+ },
+ },
+ {
+ name = "WEAPON_REVOLVER_MK2",
+ label = TranslateCap("weapon_revolver_mk2"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_REVOLVER_MK2_CLIP_01` },
+ { name = "ammo_tracer", label = TranslateCap("component_ammo_tracer"), hash = `COMPONENT_REVOLVER_MK2_CLIP_TRACER` },
+ { name = "ammo_incendiary", label = TranslateCap("component_ammo_incendiary"), hash = `COMPONENT_REVOLVER_MK2_CLIP_INCENDIARY` },
+ { name = "ammo_hollowpoint", label = TranslateCap("component_ammo_hollowpoint"), hash = `COMPONENT_REVOLVER_MK2_CLIP_HOLLOWPOINT` },
+ { name = "ammo_fmj", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_REVOLVER_MK2_CLIP_FMJ` },
+ { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
+ { name = "scope_small", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_AT_SCOPE_MACRO_MK2` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH` },
+ { name = "compensator", label = TranslateCap("component_compensator"), hash = `COMPONENT_AT_PI_COMP_03` },
+ { name = "camo_finish", label = TranslateCap("component_camo_finish"), hash = `COMPONENT_REVOLVER_MK2_CAMO` },
+ { name = "camo_finish2", label = TranslateCap("component_camo_finish2"), hash = `COMPONENT_REVOLVER_MK2_CAMO_02` },
+ { name = "camo_finish3", label = TranslateCap("component_camo_finish3"), hash = `COMPONENT_REVOLVER_MK2_CAMO_03` },
+ { name = "camo_finish4", label = TranslateCap("component_camo_finish4"), hash = `COMPONENT_REVOLVER_MK2_CAMO_04` },
+ { name = "camo_finish5", label = TranslateCap("component_camo_finish5"), hash = `COMPONENT_REVOLVER_MK2_CAMO_05` },
+ { name = "camo_finish6", label = TranslateCap("component_camo_finish6"), hash = `COMPONENT_REVOLVER_MK2_CAMO_06` },
+ { name = "camo_finish7", label = TranslateCap("component_camo_finish7"), hash = `COMPONENT_REVOLVER_MK2_CAMO_07` },
+ { name = "camo_finish8", label = TranslateCap("component_camo_finish8"), hash = `COMPONENT_REVOLVER_MK2_CAMO_08` },
+ { name = "camo_finish9", label = TranslateCap("component_camo_finish9"), hash = `COMPONENT_REVOLVER_MK2_CAMO_09` },
+ { name = "camo_finish10", label = TranslateCap("component_camo_finish10"), hash = `COMPONENT_REVOLVER_MK2_CAMO_10` },
+ { name = "camo_finish11", label = TranslateCap("component_camo_finish11"), hash = `COMPONENT_REVOLVER_MK2_CAMO_IND_01` },
+ },
+ },
+ { name = "WEAPON_MARKSMANPISTOL", label = TranslateCap("weapon_marksmanpistol"), tints = Config.DefaultWeaponTints, components = {}, ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` } },
+ {
+ name = "WEAPON_PISTOL",
+ label = TranslateCap("weapon_pistol"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_PISTOL_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_PISTOL_CLIP_02` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP_02` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_PISTOL_VARMOD_LUXE` },
+ },
+ },
+ {
+ name = "WEAPON_PISTOL_MK2",
+ label = TranslateCap("weapon_pistol_mk2"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_PISTOL_MK2_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_PISTOL_MK2_CLIP_02` },
+ { name = "ammo_tracer", label = TranslateCap("component_ammo_tracer"), hash = `COMPONENT_PISTOL_MK2_CLIP_TRACER` },
+ { name = "ammo_incendiary", label = TranslateCap("component_ammo_incendiary"), hash = `COMPONENT_PISTOL_MK2_CLIP_INCENDIARY` },
+ { name = "ammo_hollowpoint", label = TranslateCap("component_ammo_hollowpoint"), hash = `COMPONENT_PISTOL_MK2_CLIP_HOLLOWPOINT` },
+ { name = "ammo_fmj", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_PISTOL_MK2_CLIP_FMJ` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_PI_RAIL` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH_02` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP_02` },
+ { name = "compensator", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_COMP` },
+ { name = "camo_finish", label = TranslateCap("component_camo_finish"), hash = `COMPONENT_PISTOL_MK2_CAMO` },
+ { name = "camo_finish2", label = TranslateCap("component_camo_finish2"), hash = `COMPONENT_PISTOL_MK2_CAMO_02` },
+ { name = "camo_finish3", label = TranslateCap("component_camo_finish3"), hash = `COMPONENT_PISTOL_MK2_CAMO_03` },
+ { name = "camo_finish4", label = TranslateCap("component_camo_finish4"), hash = `COMPONENT_PISTOL_MK2_CAMO_04` },
+ { name = "camo_finish5", label = TranslateCap("component_camo_finish5"), hash = `COMPONENT_PISTOL_MK2_CAMO_05` },
+ { name = "camo_finish6", label = TranslateCap("component_camo_finish6"), hash = `COMPONENT_PISTOL_MK2_CAMO_06` },
+ { name = "camo_finish7", label = TranslateCap("component_camo_finish7"), hash = `COMPONENT_PISTOL_MK2_CAMO_07` },
+ { name = "camo_finish8", label = TranslateCap("component_camo_finish8"), hash = `COMPONENT_PISTOL_MK2_CAMO_08` },
+ { name = "camo_finish9", label = TranslateCap("component_camo_finish9"), hash = `COMPONENT_PISTOL_MK2_CAMO_09` },
+ { name = "camo_finish10", label = TranslateCap("component_camo_finish10"), hash = `COMPONENT_PISTOL_MK2_CAMO_10` },
+ { name = "camo_finish11", label = TranslateCap("component_camo_finish11"), hash = `COMPONENT_PISTOL_MK2_CAMO_IND_01` },
+ { name = "camo_slide_finish", label = TranslateCap("component_camo_slide_finish"), hash = `COMPONENT_PISTOL_MK2_CAMO_SLIDE` },
+ { name = "camo_slide_finish2", label = TranslateCap("component_camo_slide_finish2"), hash = `COMPONENT_PISTOL_MK2_CAMO_02_SLIDE` },
+ { name = "camo_slide_finish3", label = TranslateCap("component_camo_slide_finish3"), hash = `COMPONENT_PISTOL_MK2_CAMO_03_SLIDE` },
+ { name = "camo_slide_finish4", label = TranslateCap("component_camo_slide_finish4"), hash = `COMPONENT_PISTOL_MK2_CAMO_04_SLIDE` },
+ { name = "camo_slide_finish5", label = TranslateCap("component_camo_slide_finish5"), hash = `COMPONENT_PISTOL_MK2_CAMO_05_SLIDE` },
+ { name = "camo_slide_finish6", label = TranslateCap("component_camo_slide_finish6"), hash = `COMPONENT_PISTOL_MK2_CAMO_06_SLIDE` },
+ { name = "camo_slide_finish7", label = TranslateCap("component_camo_slide_finish7"), hash = `COMPONENT_PISTOL_MK2_CAMO_07_SLIDE` },
+ { name = "camo_slide_finish8", label = TranslateCap("component_camo_slide_finish8"), hash = `COMPONENT_PISTOL_MK2_CAMO_08_SLIDE` },
+ { name = "camo_slide_finish9", label = TranslateCap("component_camo_slide_finish9"), hash = `COMPONENT_PISTOL_MK2_CAMO_09_SLIDE` },
+ { name = "camo_slide_finish10", label = TranslateCap("component_camo_slide_finish10"), hash = `COMPONENT_PISTOL_MK2_CAMO_10_SLIDE` },
+ { name = "camo_slide_finish11", label = TranslateCap("component_camo_slide_finish11"), hash = `COMPONENT_PISTOL_MK2_CAMO_IND_01_SLIDE` },
+ },
+ },
+ {
+ name = "WEAPON_PISTOL50",
+ label = TranslateCap("weapon_pistol50"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_PISTOL50_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_PISTOL50_CLIP_02` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_PISTOL50_VARMOD_LUXE` },
+ },
+ },
+ {
+ name = "WEAPON_SNSPISTOL",
+ label = TranslateCap("weapon_snspistol"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_SNSPISTOL_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_SNSPISTOL_CLIP_02` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_SNSPISTOL_VARMOD_LOWRIDER` },
+ },
+ },
+ {
+ name = "WEAPON_SNSPISTOL_MK2",
+ label = TranslateCap("weapon_snspistol_mk2"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_SNSPISTOL_MK2_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_SNSPISTOL_MK2_CLIP_02` },
+ { name = "ammo_tracer", label = TranslateCap("component_ammo_tracer"), hash = `COMPONENT_SNSPISTOL_MK2_CLIP_TRACER` },
+ { name = "ammo_incendiary", label = TranslateCap("component_ammo_incendiary"), hash = `COMPONENT_SNSPISTOL_MK2_CLIP_INCENDIARY` },
+ { name = "ammo_hollowpoint", label = TranslateCap("component_ammo_hollowpoint"), hash = `COMPONENT_SNSPISTOL_MK2_CLIP_HOLLOWPOINT` },
+ { name = "ammo_fmj", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_SNSPISTOL_MK2_CLIP_FMJ` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_PI_RAIL_02` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH_03` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP_02` },
+ { name = "compensator", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_COMP_02` },
+ { name = "camo_finish", label = TranslateCap("component_camo_finish"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO` },
+ { name = "camo_finish2", label = TranslateCap("component_camo_finish2"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_02` },
+ { name = "camo_finish3", label = TranslateCap("component_camo_finish3"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_03` },
+ { name = "camo_finish4", label = TranslateCap("component_camo_finish4"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_04` },
+ { name = "camo_finish5", label = TranslateCap("component_camo_finish5"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_05` },
+ { name = "camo_finish6", label = TranslateCap("component_camo_finish6"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_06` },
+ { name = "camo_finish7", label = TranslateCap("component_camo_finish7"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_07` },
+ { name = "camo_finish8", label = TranslateCap("component_camo_finish8"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_08` },
+ { name = "camo_finish9", label = TranslateCap("component_camo_finish9"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_09` },
+ { name = "camo_finish10", label = TranslateCap("component_camo_finish10"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_10` },
+ { name = "camo_finish11", label = TranslateCap("component_camo_finish11"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_IND_01` },
+ { name = "camo_slide_finish", label = TranslateCap("component_camo_slide_finish"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_SLIDE` },
+ { name = "camo_slide_finish2", label = TranslateCap("component_camo_slide_finish2"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_02_SLIDE` },
+ { name = "camo_slide_finish3", label = TranslateCap("component_camo_slide_finish3"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_03_SLIDE` },
+ { name = "camo_slide_finish4", label = TranslateCap("component_camo_slide_finish4"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_04_SLIDE` },
+ { name = "camo_slide_finish5", label = TranslateCap("component_camo_slide_finish5"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_05_SLIDE` },
+ { name = "camo_slide_finish6", label = TranslateCap("component_camo_slide_finish6"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_06_SLIDE` },
+ { name = "camo_slide_finish7", label = TranslateCap("component_camo_slide_finish7"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_07_SLIDE` },
+ { name = "camo_slide_finish8", label = TranslateCap("component_camo_slide_finish8"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_08_SLIDE` },
+ { name = "camo_slide_finish9", label = TranslateCap("component_camo_slide_finish9"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_09_SLIDE` },
+ { name = "camo_slide_finish10", label = TranslateCap("component_camo_slide_finish10"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_10_SLIDE` },
+ { name = "camo_slide_finish11", label = TranslateCap("component_camo_slide_finish11"), hash = `COMPONENT_SNSPISTOL_MK2_CAMO_IND_01_SLIDE` },
+ },
+ },
+ { name = "WEAPON_STUNGUN", label = TranslateCap("weapon_stungun"), tints = Config.DefaultWeaponTints, components = {} },
+ { name = "WEAPON_RAYPISTOL", label = TranslateCap("weapon_raypistol"), tints = Config.DefaultWeaponTints, components = {} },
+ {
+ name = "WEAPON_VINTAGEPISTOL",
+ label = TranslateCap("weapon_vintagepistol"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_VINTAGEPISTOL_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_VINTAGEPISTOL_CLIP_02` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP` },
+ },
+ },
+ -- Shotguns
+ {
+ name = "WEAPON_ASSAULTSHOTGUN",
+ label = TranslateCap("weapon_assaultshotgun"),
+ ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_ASSAULTSHOTGUN_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_ASSAULTSHOTGUN_CLIP_02` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
+ },
+ },
+ { name = "WEAPON_AUTOSHOTGUN", label = TranslateCap("weapon_autoshotgun"), tints = Config.DefaultWeaponTints, components = {}, ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` } },
+ {
+ name = "WEAPON_BULLPUPSHOTGUN",
+ label = TranslateCap("weapon_bullpupshotgun"),
+ ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
+ },
+ },
+ {
+ name = "WEAPON_COMBATSHOTGUN",
+ label = TranslateCap("weapon_combatshotgun"),
+ ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
+ },
+ },
+ { name = "WEAPON_DBSHOTGUN", label = TranslateCap("weapon_dbshotgun"), tints = Config.DefaultWeaponTints, components = {}, ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` } },
+ {
+ name = "WEAPON_HEAVYSHOTGUN",
+ label = TranslateCap("weapon_heavyshotgun"),
+ ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_HEAVYSHOTGUN_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_HEAVYSHOTGUN_CLIP_02` },
+ { name = "clip_drum", label = TranslateCap("component_clip_drum"), hash = `COMPONENT_HEAVYSHOTGUN_CLIP_03` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
+ },
+ },
+ { name = "WEAPON_MUSKET", label = TranslateCap("weapon_musket"), tints = Config.DefaultWeaponTints, components = {}, ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SHOTGUN` } },
+ {
+ name = "WEAPON_PUMPSHOTGUN",
+ label = TranslateCap("weapon_pumpshotgun"),
+ ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_SR_SUPP` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_PUMPSHOTGUN_VARMOD_LOWRIDER` },
+ },
+ },
+ {
+ name = "WEAPON_PUMPSHOTGUN_MK2",
+ label = TranslateCap("weapon_pumpshotgun_mk2"),
+ ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "shells_default", label = TranslateCap("component_shells_default"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CLIP_01` },
+ { name = "shells_incendiary", label = TranslateCap("component_shells_incendiary"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CLIP_INCENDIARY` },
+ { name = "shells_armor", label = TranslateCap("component_shells_armor"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CLIP_ARMORPIERCING` },
+ { name = "shells_hollowpoint", label = TranslateCap("component_shells_hollowpoint"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CLIP_HOLLOWPOINT` },
+ { name = "shells_explosive", label = TranslateCap("component_shells_explosive"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CLIP_EXPLOSIVE` },
+ { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
+ { name = "scope_small", label = TranslateCap("component_scope_small"), hash = `COMPONENT_AT_SCOPE_MACRO_MK2` },
+ { name = "scope_medium", label = TranslateCap("component_scope_medium"), hash = `COMPONENT_AT_SCOPE_SMALL_MK2` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_SR_SUPP_03` },
+ { name = "muzzle_squared", label = TranslateCap("component_muzzle_squared"), hash = `COMPONENT_AT_MUZZLE_08` },
+ { name = "camo_finish", label = TranslateCap("component_camo_finish"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO` },
+ { name = "camo_finish2", label = TranslateCap("component_camo_finish2"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_02` },
+ { name = "camo_finish3", label = TranslateCap("component_camo_finish3"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_03` },
+ { name = "camo_finish4", label = TranslateCap("component_camo_finish4"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_04` },
+ { name = "camo_finish5", label = TranslateCap("component_camo_finish5"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_05` },
+ { name = "camo_finish6", label = TranslateCap("component_camo_finish6"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_06` },
+ { name = "camo_finish7", label = TranslateCap("component_camo_finish7"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_07` },
+ { name = "camo_finish8", label = TranslateCap("component_camo_finish8"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_08` },
+ { name = "camo_finish9", label = TranslateCap("component_camo_finish9"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_09` },
+ { name = "camo_finish10", label = TranslateCap("component_camo_finish10"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_10` },
+ { name = "camo_finish11", label = TranslateCap("component_camo_finish11"), hash = `COMPONENT_PUMPSHOTGUN_MK2_CAMO_IND_01` },
+ },
+ },
+ {
+ name = "WEAPON_SAWNOFFSHOTGUN",
+ label = TranslateCap("weapon_sawnoffshotgun"),
+ ammo = { label = TranslateCap("ammo_shells"), hash = `AMMO_SHOTGUN` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_SAWNOFFSHOTGUN_VARMOD_LUXE` },
+ },
+ },
+ -- SMG & LMG
+ {
+ name = "WEAPON_ASSAULTSMG",
+ label = TranslateCap("weapon_assaultsmg"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SMG` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_ASSAULTSMG_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_ASSAULTSMG_CLIP_02` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MACRO` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_ASSAULTSMG_VARMOD_LOWRIDER` },
+ },
+ },
+ {
+ name = "WEAPON_COMBATMG",
+ label = TranslateCap("weapon_combatmg"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_MG` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_COMBATMG_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_COMBATMG_CLIP_02` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MEDIUM` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_COMBATMG_VARMOD_LOWRIDER` },
+ },
+ },
+ {
+ name = "WEAPON_COMBATMG_MK2",
+ label = TranslateCap("weapon_combatmg_mk2"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_MG` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_COMBATMG_MK2_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_COMBATMG_MK2_CLIP_02` },
+ { name = "ammo_tracer", label = TranslateCap("component_ammo_tracer"), hash = `COMPONENT_COMBATMG_MK2_CLIP_TRACER` },
+ { name = "ammo_incendiary", label = TranslateCap("component_ammo_incendiary"), hash = `COMPONENT_COMBATMG_MK2_CLIP_INCENDIARY` },
+ { name = "ammo_hollowpoint", label = TranslateCap("component_ammo_hollowpoint"), hash = `COMPONENT_COMBATMG_MK2_CLIP_ARMORPIERCING` },
+ { name = "ammo_fmj", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_COMBATMG_MK2_CLIP_FMJ` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP_02` },
+ { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
+ { name = "scope_medium", label = TranslateCap("component_scope_medium"), hash = `COMPONENT_AT_SCOPE_SMALL_MK2` },
+ { name = "scope_large", label = TranslateCap("component_scope_large"), hash = `COMPONENT_AT_SCOPE_MEDIUM_MK2` },
+ { name = "muzzle_flat", label = TranslateCap("component_muzzle_flat"), hash = `COMPONENT_AT_MUZZLE_01` },
+ { name = "muzzle_tactical", label = TranslateCap("component_muzzle_tactical"), hash = `COMPONENT_AT_MUZZLE_02` },
+ { name = "muzzle_fat", label = TranslateCap("component_muzzle_fat"), hash = `COMPONENT_AT_MUZZLE_03` },
+ { name = "muzzle_precision", label = TranslateCap("component_muzzle_precision"), hash = `COMPONENT_AT_MUZZLE_04` },
+ { name = "muzzle_heavy", label = TranslateCap("component_muzzle_heavy"), hash = `COMPONENT_AT_MUZZLE_05` },
+ { name = "muzzle_slanted", label = TranslateCap("component_muzzle_slanted"), hash = `COMPONENT_AT_MUZZLE_06` },
+ { name = "muzzle_split", label = TranslateCap("component_muzzle_split"), hash = `COMPONENT_AT_MUZZLE_07` },
+ { name = "barrel_default", label = TranslateCap("component_barrel_default"), hash = `COMPONENT_AT_MG_BARREL_01` },
+ { name = "barrel_heavy", label = TranslateCap("component_barrel_heavy"), hash = `COMPONENT_AT_MG_BARREL_02` },
+ { name = "camo_finish", label = TranslateCap("component_camo_finish"), hash = `COMPONENT_COMBATMG_MK2_CAMO` },
+ { name = "camo_finish2", label = TranslateCap("component_camo_finish2"), hash = `COMPONENT_COMBATMG_MK2_CAMO_02` },
+ { name = "camo_finish3", label = TranslateCap("component_camo_finish3"), hash = `COMPONENT_COMBATMG_MK2_CAMO_03` },
+ { name = "camo_finish4", label = TranslateCap("component_camo_finish4"), hash = `COMPONENT_COMBATMG_MK2_CAMO_04` },
+ { name = "camo_finish5", label = TranslateCap("component_camo_finish5"), hash = `COMPONENT_COMBATMG_MK2_CAMO_05` },
+ { name = "camo_finish6", label = TranslateCap("component_camo_finish6"), hash = `COMPONENT_COMBATMG_MK2_CAMO_06` },
+ { name = "camo_finish7", label = TranslateCap("component_camo_finish7"), hash = `COMPONENT_COMBATMG_MK2_CAMO_07` },
+ { name = "camo_finish8", label = TranslateCap("component_camo_finish8"), hash = `COMPONENT_COMBATMG_MK2_CAMO_08` },
+ { name = "camo_finish9", label = TranslateCap("component_camo_finish9"), hash = `COMPONENT_COMBATMG_MK2_CAMO_09` },
+ { name = "camo_finish10", label = TranslateCap("component_camo_finish10"), hash = `COMPONENT_COMBATMG_MK2_CAMO_10` },
+ { name = "camo_finish11", label = TranslateCap("component_camo_finish11"), hash = `COMPONENT_COMBATMG_MK2_CAMO_IND_01` },
+ },
+ },
+ {
+ name = "WEAPON_COMBATPDW",
+ label = TranslateCap("weapon_combatpdw"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SMG` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_COMBATPDW_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_COMBATPDW_CLIP_02` },
+ { name = "clip_drum", label = TranslateCap("component_clip_drum"), hash = `COMPONENT_COMBATPDW_CLIP_03` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_SMALL` },
+ },
+ },
+ {
+ name = "WEAPON_GUSENBERG",
+ label = TranslateCap("weapon_gusenberg"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_MG` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_GUSENBERG_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_GUSENBERG_CLIP_02` },
+ },
+ },
+ {
+ name = "WEAPON_MACHINEPISTOL",
+ label = TranslateCap("weapon_machinepistol"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_MACHINEPISTOL_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_MACHINEPISTOL_CLIP_02` },
+ { name = "clip_drum", label = TranslateCap("component_clip_drum"), hash = `COMPONENT_MACHINEPISTOL_CLIP_03` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP` },
+ },
+ },
+ {
+ name = "WEAPON_MG",
+ label = TranslateCap("weapon_mg"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_MG` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_MG_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_MG_CLIP_02` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_SMALL_02` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_MG_VARMOD_LOWRIDER` },
+ },
+ },
+ {
+ name = "WEAPON_MICROSMG",
+ label = TranslateCap("weapon_microsmg"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SMG` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_MICROSMG_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_MICROSMG_CLIP_02` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_PI_FLSH` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MACRO` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_MICROSMG_VARMOD_LUXE` },
+ },
+ },
+ {
+ name = "WEAPON_MINISMG",
+ label = TranslateCap("weapon_minismg"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SMG` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_MINISMG_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_MINISMG_CLIP_02` },
+ },
+ },
+ {
+ name = "WEAPON_SMG",
+ label = TranslateCap("weapon_smg"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SMG` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_SMG_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_SMG_CLIP_02` },
+ { name = "clip_drum", label = TranslateCap("component_clip_drum"), hash = `COMPONENT_SMG_CLIP_03` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MACRO_02` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_SMG_VARMOD_LUXE` },
+ },
+ },
+ {
+ name = "WEAPON_SMG_MK2",
+ label = TranslateCap("weapon_smg_mk2"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SMG` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_SMG_MK2_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_SMG_MK2_CLIP_02` },
+ { name = "ammo_tracer", label = TranslateCap("component_ammo_tracer"), hash = `COMPONENT_SMG_MK2_CLIP_TRACER` },
+ { name = "ammo_incendiary", label = TranslateCap("component_ammo_incendiary"), hash = `COMPONENT_SMG_MK2_CLIP_INCENDIARY` },
+ { name = "ammo_hollowpoint", label = TranslateCap("component_ammo_hollowpoint"), hash = `COMPONENT_SMG_MK2_CLIP_HOLLOWPOINT` },
+ { name = "ammo_fmj", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_SMG_MK2_CLIP_FMJ` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS_SMG` },
+ { name = "scope_small", label = TranslateCap("component_scope_small"), hash = `COMPONENT_AT_SCOPE_MACRO_02_SMG_MK2` },
+ { name = "scope_medium", label = TranslateCap("component_scope_medium"), hash = `COMPONENT_AT_SCOPE_SMALL_SMG_MK2` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_PI_SUPP` },
+ { name = "muzzle_flat", label = TranslateCap("component_muzzle_flat"), hash = `COMPONENT_AT_MUZZLE_01` },
+ { name = "muzzle_tactical", label = TranslateCap("component_muzzle_tactical"), hash = `COMPONENT_AT_MUZZLE_02` },
+ { name = "muzzle_fat", label = TranslateCap("component_muzzle_fat"), hash = `COMPONENT_AT_MUZZLE_03` },
+ { name = "muzzle_precision", label = TranslateCap("component_muzzle_precision"), hash = `COMPONENT_AT_MUZZLE_04` },
+ { name = "muzzle_heavy", label = TranslateCap("component_muzzle_heavy"), hash = `COMPONENT_AT_MUZZLE_05` },
+ { name = "muzzle_slanted", label = TranslateCap("component_muzzle_slanted"), hash = `COMPONENT_AT_MUZZLE_06` },
+ { name = "muzzle_split", label = TranslateCap("component_muzzle_split"), hash = `COMPONENT_AT_MUZZLE_07` },
+ { name = "barrel_default", label = TranslateCap("component_barrel_default"), hash = `COMPONENT_AT_SB_BARREL_01` },
+ { name = "barrel_heavy", label = TranslateCap("component_barrel_heavy"), hash = `COMPONENT_AT_SB_BARREL_02` },
+ { name = "camo_finish", label = TranslateCap("component_camo_finish"), hash = `COMPONENT_SMG_MK2_CAMO` },
+ { name = "camo_finish2", label = TranslateCap("component_camo_finish2"), hash = `COMPONENT_SMG_MK2_CAMO_02` },
+ { name = "camo_finish3", label = TranslateCap("component_camo_finish3"), hash = `COMPONENT_SMG_MK2_CAMO_03` },
+ { name = "camo_finish4", label = TranslateCap("component_camo_finish4"), hash = `COMPONENT_SMG_MK2_CAMO_04` },
+ { name = "camo_finish5", label = TranslateCap("component_camo_finish5"), hash = `COMPONENT_SMG_MK2_CAMO_05` },
+ { name = "camo_finish6", label = TranslateCap("component_camo_finish6"), hash = `COMPONENT_SMG_MK2_CAMO_06` },
+ { name = "camo_finish7", label = TranslateCap("component_camo_finish7"), hash = `COMPONENT_SMG_MK2_CAMO_07` },
+ { name = "camo_finish8", label = TranslateCap("component_camo_finish8"), hash = `COMPONENT_SMG_MK2_CAMO_08` },
+ { name = "camo_finish9", label = TranslateCap("component_camo_finish9"), hash = `COMPONENT_SMG_MK2_CAMO_09` },
+ { name = "camo_finish10", label = TranslateCap("component_camo_finish10"), hash = `COMPONENT_SMG_MK2_CAMO_10` },
+ { name = "camo_finish11", label = TranslateCap("component_camo_finish11"), hash = `COMPONENT_SMG_MK2_CAMO_IND_01` },
+ },
+ },
+ { name = "WEAPON_RAYCARBINE", label = TranslateCap("weapon_raycarbine"), ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SMG` }, tints = Config.DefaultWeaponTints, components = {} },
+ -- Rifles
+ {
+ name = "WEAPON_ADVANCEDRIFLE",
+ label = TranslateCap("weapon_advancedrifle"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_ADVANCEDRIFLE_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_ADVANCEDRIFLE_CLIP_02` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_SMALL` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_ADVANCEDRIFLE_VARMOD_LUXE` },
+ },
+ },
+ {
+ name = "WEAPON_ASSAULTRIFLE",
+ label = TranslateCap("weapon_assaultrifle"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_ASSAULTRIFLE_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_ASSAULTRIFLE_CLIP_02` },
+ { name = "clip_drum", label = TranslateCap("component_clip_drum"), hash = `COMPONENT_ASSAULTRIFLE_CLIP_03` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MACRO` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_ASSAULTRIFLE_VARMOD_LUXE` },
+ },
+ },
+ {
+ name = "WEAPON_ASSAULTRIFLE_MK2",
+ label = TranslateCap("weapon_assaultrifle_mk2"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CLIP_02` },
+ { name = "ammo_tracer", label = TranslateCap("component_ammo_tracer"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CLIP_TRACER` },
+ { name = "ammo_incendiary", label = TranslateCap("component_ammo_incendiary"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CLIP_INCENDIARY` },
+ { name = "ammo_armor", label = TranslateCap("component_ammo_armor"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CLIP_ARMORPIERCING` },
+ { name = "ammo_fmj", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CLIP_FMJ` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP_02` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
+ { name = "scope_small", label = TranslateCap("component_scope_small"), hash = `COMPONENT_AT_SCOPE_MACRO_MK2` },
+ { name = "scope_large", label = TranslateCap("component_scope_large"), hash = `COMPONENT_AT_SCOPE_MEDIUM_MK2` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
+ { name = "muzzle_flat", label = TranslateCap("component_muzzle_flat"), hash = `COMPONENT_AT_MUZZLE_01` },
+ { name = "muzzle_tactical", label = TranslateCap("component_muzzle_tactical"), hash = `COMPONENT_AT_MUZZLE_02` },
+ { name = "muzzle_fat", label = TranslateCap("component_muzzle_fat"), hash = `COMPONENT_AT_MUZZLE_03` },
+ { name = "muzzle_precision", label = TranslateCap("component_muzzle_precision"), hash = `COMPONENT_AT_MUZZLE_04` },
+ { name = "muzzle_heavy", label = TranslateCap("component_muzzle_heavy"), hash = `COMPONENT_AT_MUZZLE_05` },
+ { name = "muzzle_slanted", label = TranslateCap("component_muzzle_slanted"), hash = `COMPONENT_AT_MUZZLE_06` },
+ { name = "muzzle_split", label = TranslateCap("component_muzzle_split"), hash = `COMPONENT_AT_MUZZLE_07` },
+ { name = "barrel_default", label = TranslateCap("component_barrel_default"), hash = `COMPONENT_AT_AR_BARREL_01` },
+ { name = "barrel_heavy", label = TranslateCap("component_barrel_heavy"), hash = `COMPONENT_AT_AR_BARREL_02` },
+ { name = "camo_finish", label = TranslateCap("component_camo_finish"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO` },
+ { name = "camo_finish2", label = TranslateCap("component_camo_finish2"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_02` },
+ { name = "camo_finish3", label = TranslateCap("component_camo_finish3"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_03` },
+ { name = "camo_finish4", label = TranslateCap("component_camo_finish4"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_04` },
+ { name = "camo_finish5", label = TranslateCap("component_camo_finish5"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_05` },
+ { name = "camo_finish6", label = TranslateCap("component_camo_finish6"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_06` },
+ { name = "camo_finish7", label = TranslateCap("component_camo_finish7"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_07` },
+ { name = "camo_finish8", label = TranslateCap("component_camo_finish8"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_08` },
+ { name = "camo_finish9", label = TranslateCap("component_camo_finish9"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_09` },
+ { name = "camo_finish10", label = TranslateCap("component_camo_finish10"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_10` },
+ { name = "camo_finish11", label = TranslateCap("component_camo_finish11"), hash = `COMPONENT_ASSAULTRIFLE_MK2_CAMO_IND_01` },
+ },
+ },
+ {
+ name = "WEAPON_BULLPUPRIFLE",
+ label = TranslateCap("weapon_bullpuprifle"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_BULLPUPRIFLE_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_BULLPUPRIFLE_CLIP_02` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_SMALL` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_BULLPUPRIFLE_VARMOD_LOW` },
+ },
+ },
+ {
+ name = "WEAPON_BULLPUPRIFLE_MK2",
+ label = TranslateCap("weapon_bullpuprifle_mk2"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CLIP_02` },
+ { name = "ammo_tracer", label = TranslateCap("component_ammo_tracer"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CLIP_TRACER` },
+ { name = "ammo_incendiary", label = TranslateCap("component_ammo_incendiary"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CLIP_INCENDIARY` },
+ { name = "ammo_armor", label = TranslateCap("component_ammo_armor"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CLIP_ARMORPIERCING` },
+ { name = "ammo_fmj", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CLIP_FMJ` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
+ { name = "scope_small", label = TranslateCap("component_scope_small"), hash = `COMPONENT_AT_SCOPE_MACRO_02_MK2` },
+ { name = "scope_medium", label = TranslateCap("component_scope_medium"), hash = `COMPONENT_AT_SCOPE_SMALL_MK2` },
+ { name = "barrel_default", label = TranslateCap("component_barrel_default"), hash = `COMPONENT_AT_BP_BARREL_01` },
+ { name = "barrel_heavy", label = TranslateCap("component_barrel_heavy"), hash = `COMPONENT_AT_BP_BARREL_02` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
+ { name = "muzzle_flat", label = TranslateCap("component_muzzle_flat"), hash = `COMPONENT_AT_MUZZLE_01` },
+ { name = "muzzle_tactical", label = TranslateCap("component_muzzle_tactical"), hash = `COMPONENT_AT_MUZZLE_02` },
+ { name = "muzzle_fat", label = TranslateCap("component_muzzle_fat"), hash = `COMPONENT_AT_MUZZLE_03` },
+ { name = "muzzle_precision", label = TranslateCap("component_muzzle_precision"), hash = `COMPONENT_AT_MUZZLE_04` },
+ { name = "muzzle_heavy", label = TranslateCap("component_muzzle_heavy"), hash = `COMPONENT_AT_MUZZLE_05` },
+ { name = "muzzle_slanted", label = TranslateCap("component_muzzle_slanted"), hash = `COMPONENT_AT_MUZZLE_06` },
+ { name = "muzzle_split", label = TranslateCap("component_muzzle_split"), hash = `COMPONENT_AT_MUZZLE_07` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP_02` },
+ { name = "camo_finish", label = TranslateCap("component_camo_finish"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO` },
+ { name = "camo_finish2", label = TranslateCap("component_camo_finish2"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_02` },
+ { name = "camo_finish3", label = TranslateCap("component_camo_finish3"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_03` },
+ { name = "camo_finish4", label = TranslateCap("component_camo_finish4"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_04` },
+ { name = "camo_finish5", label = TranslateCap("component_camo_finish5"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_05` },
+ { name = "camo_finish6", label = TranslateCap("component_camo_finish6"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_06` },
+ { name = "camo_finish7", label = TranslateCap("component_camo_finish7"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_07` },
+ { name = "camo_finish8", label = TranslateCap("component_camo_finish8"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_08` },
+ { name = "camo_finish9", label = TranslateCap("component_camo_finish9"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_09` },
+ { name = "camo_finish10", label = TranslateCap("component_camo_finish10"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_10` },
+ { name = "camo_finish11", label = TranslateCap("component_camo_finish11"), hash = `COMPONENT_BULLPUPRIFLE_MK2_CAMO_IND_01` },
+ },
+ },
+ {
+ name = "WEAPON_CARBINERIFLE",
+ label = TranslateCap("weapon_carbinerifle"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_CARBINERIFLE_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_CARBINERIFLE_CLIP_02` },
+ { name = "clip_box", label = TranslateCap("component_clip_box"), hash = `COMPONENT_CARBINERIFLE_CLIP_03` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MEDIUM` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_CARBINERIFLE_VARMOD_LUXE` },
+ },
+ },
+ {
+ name = "WEAPON_CARBINERIFLE_MK2",
+ label = TranslateCap("weapon_carbinerifle_mk2"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_CARBINERIFLE_MK2_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_CARBINERIFLE_MK2_CLIP_02` },
+ { name = "ammo_tracer", label = TranslateCap("component_ammo_tracer"), hash = `COMPONENT_CARBINERIFLE_MK2_CLIP_TRACER` },
+ { name = "ammo_incendiary", label = TranslateCap("component_ammo_incendiary"), hash = `COMPONENT_CARBINERIFLE_MK2_CLIP_INCENDIARY` },
+ { name = "ammo_armor", label = TranslateCap("component_ammo_armor"), hash = `COMPONENT_CARBINERIFLE_MK2_CLIP_ARMORPIERCING` },
+ { name = "ammo_fmj", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_CARBINERIFLE_MK2_CLIP_FMJ` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP_02` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
+ { name = "scope_medium", label = TranslateCap("component_scope_medium"), hash = `COMPONENT_AT_SCOPE_MACRO_MK2` },
+ { name = "scope_large", label = TranslateCap("component_scope_large"), hash = `COMPONENT_AT_SCOPE_MEDIUM_MK2` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
+ { name = "muzzle_flat", label = TranslateCap("component_muzzle_flat"), hash = `COMPONENT_AT_MUZZLE_01` },
+ { name = "muzzle_tactical", label = TranslateCap("component_muzzle_tactical"), hash = `COMPONENT_AT_MUZZLE_02` },
+ { name = "muzzle_fat", label = TranslateCap("component_muzzle_fat"), hash = `COMPONENT_AT_MUZZLE_03` },
+ { name = "muzzle_precision", label = TranslateCap("component_muzzle_precision"), hash = `COMPONENT_AT_MUZZLE_04` },
+ { name = "muzzle_heavy", label = TranslateCap("component_muzzle_heavy"), hash = `COMPONENT_AT_MUZZLE_05` },
+ { name = "muzzle_slanted", label = TranslateCap("component_muzzle_slanted"), hash = `COMPONENT_AT_MUZZLE_06` },
+ { name = "muzzle_split", label = TranslateCap("component_muzzle_split"), hash = `COMPONENT_AT_MUZZLE_07` },
+ { name = "barrel_default", label = TranslateCap("component_barrel_default"), hash = `COMPONENT_AT_CR_BARREL_01` },
+ { name = "barrel_heavy", label = TranslateCap("component_barrel_heavy"), hash = `COMPONENT_AT_CR_BARREL_02` },
+ { name = "camo_finish", label = TranslateCap("component_camo_finish"), hash = `COMPONENT_CARBINERIFLE_MK2_CAMO` },
+ { name = "camo_finish2", label = TranslateCap("component_camo_finish2"), hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_02` },
+ { name = "camo_finish3", label = TranslateCap("component_camo_finish3"), hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_03` },
+ { name = "camo_finish4", label = TranslateCap("component_camo_finish4"), hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_04` },
+ { name = "camo_finish5", label = TranslateCap("component_camo_finish5"), hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_05` },
+ { name = "camo_finish6", label = TranslateCap("component_camo_finish6"), hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_06` },
+ { name = "camo_finish7", label = TranslateCap("component_camo_finish7"), hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_07` },
+ { name = "camo_finish8", label = TranslateCap("component_camo_finish8"), hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_08` },
+ { name = "camo_finish9", label = TranslateCap("component_camo_finish9"), hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_09` },
+ { name = "camo_finish10", label = TranslateCap("component_camo_finish10"), hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_10` },
+ { name = "camo_finish11", label = TranslateCap("component_camo_finish11"), hash = `COMPONENT_CARBINERIFLE_MK2_CAMO_IND_01` },
+ },
+ },
+ {
+ name = "WEAPON_COMPACTRIFLE",
+ label = TranslateCap("weapon_compactrifle"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_COMPACTRIFLE_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_COMPACTRIFLE_CLIP_02` },
+ { name = "clip_drum", label = TranslateCap("component_clip_drum"), hash = `COMPONENT_COMPACTRIFLE_CLIP_03` },
+ },
+ },
+ {
+ name = "WEAPON_MILITARYRIFLE",
+ label = TranslateCap("weapon_militaryrifle"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_MILITARYRIFLE_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_MILITARYRIFLE_CLIP_02` },
+ { name = "ironsights", label = TranslateCap("component_ironsights"), hash = `COMPONENT_MILITARYRIFLE_SIGHT_01` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_SMALL` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
+ },
+ },
+ {
+ name = "WEAPON_SPECIALCARBINE",
+ label = TranslateCap("weapon_specialcarbine"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_SPECIALCARBINE_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_SPECIALCARBINE_CLIP_02` },
+ { name = "clip_drum", label = TranslateCap("component_clip_drum"), hash = `COMPONENT_SPECIALCARBINE_CLIP_03` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MEDIUM` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_SPECIALCARBINE_VARMOD_LOWRIDER` },
+ },
+ },
+ {
+ name = "WEAPON_SPECIALCARBINE_MK2",
+ label = TranslateCap("weapon_specialcarbine_mk2"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_SPECIALCARBINE_MK2_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_SPECIALCARBINE_MK2_CLIP_02` },
+ { name = "ammo_tracer", label = TranslateCap("component_ammo_tracer"), hash = `COMPONENT_SPECIALCARBINE_MK2_CLIP_TRACER` },
+ { name = "ammo_incendiary", label = TranslateCap("component_ammo_incendiary"), hash = `COMPONENT_SPECIALCARBINE_MK2_CLIP_INCENDIARY` },
+ { name = "ammo_armor", label = TranslateCap("component_ammo_armor"), hash = `COMPONENT_SPECIALCARBINE_MK2_CLIP_ARMORPIERCING` },
+ { name = "ammo_fmj", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_SPECIALCARBINE_MK2_CLIP_FMJ` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
+ { name = "scope_small", label = TranslateCap("component_scope_small"), hash = `COMPONENT_AT_SCOPE_MACRO_MK2` },
+ { name = "scope_large", label = TranslateCap("component_scope_large"), hash = `COMPONENT_AT_SCOPE_MEDIUM_MK2` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
+ { name = "muzzle_flat", label = TranslateCap("component_muzzle_flat"), hash = `COMPONENT_AT_MUZZLE_01` },
+ { name = "muzzle_tactical", label = TranslateCap("component_muzzle_tactical"), hash = `COMPONENT_AT_MUZZLE_02` },
+ { name = "muzzle_fat", label = TranslateCap("component_muzzle_fat"), hash = `COMPONENT_AT_MUZZLE_03` },
+ { name = "muzzle_precision", label = TranslateCap("component_muzzle_precision"), hash = `COMPONENT_AT_MUZZLE_04` },
+ { name = "muzzle_heavy", label = TranslateCap("component_muzzle_heavy"), hash = `COMPONENT_AT_MUZZLE_05` },
+ { name = "muzzle_slanted", label = TranslateCap("component_muzzle_slanted"), hash = `COMPONENT_AT_MUZZLE_06` },
+ { name = "muzzle_split", label = TranslateCap("component_muzzle_split"), hash = `COMPONENT_AT_MUZZLE_07` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP_02` },
+ { name = "barrel_default", label = TranslateCap("component_barrel_default"), hash = `COMPONENT_AT_SC_BARREL_01` },
+ { name = "barrel_heavy", label = TranslateCap("component_barrel_heavy"), hash = `COMPONENT_AT_SC_BARREL_02` },
+ { name = "camo_finish", label = TranslateCap("component_camo_finish"), hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO` },
+ { name = "camo_finish2", label = TranslateCap("component_camo_finish2"), hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_02` },
+ { name = "camo_finish3", label = TranslateCap("component_camo_finish3"), hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_03` },
+ { name = "camo_finish4", label = TranslateCap("component_camo_finish4"), hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_04` },
+ { name = "camo_finish5", label = TranslateCap("component_camo_finish5"), hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_05` },
+ { name = "camo_finish6", label = TranslateCap("component_camo_finish6"), hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_06` },
+ { name = "camo_finish7", label = TranslateCap("component_camo_finish7"), hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_07` },
+ { name = "camo_finish8", label = TranslateCap("component_camo_finish8"), hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_08` },
+ { name = "camo_finish9", label = TranslateCap("component_camo_finish9"), hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_09` },
+ { name = "camo_finish10", label = TranslateCap("component_camo_finish10"), hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_10` },
+ { name = "camo_finish11", label = TranslateCap("component_camo_finish11"), hash = `COMPONENT_SPECIALCARBINE_MK2_CAMO_IND_01` },
+ },
+ },
+ {
+ name = "WEAPON_HEAVYRIFLE",
+ label = TranslateCap("weapon_heavyrifle"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_HEAVYRIFLE_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_HEAVYRIFLE_CLIP_02` },
+ { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_HEAVYRIFLE_SIGHT_01` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_MEDIUM` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
+ },
+ },
+ -- Sniper
+ {
+ name = "WEAPON_HEAVYSNIPER",
+ label = TranslateCap("weapon_heavysniper"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SNIPER` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_LARGE` },
+ { name = "scope_advanced", label = TranslateCap("component_scope_advanced"), hash = `COMPONENT_AT_SCOPE_MAX` },
+ },
+ },
+ {
+ name = "WEAPON_HEAVYSNIPER_MK2",
+ label = TranslateCap("weapon_heavysniper_mk2"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SNIPER` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_HEAVYSNIPER_MK2_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_HEAVYSNIPER_MK2_CLIP_02` },
+ { name = "ammo_incendiary", label = TranslateCap("component_ammo_incendiary"), hash = `COMPONENT_HEAVYSNIPER_MK2_CLIP_INCENDIARY` },
+ { name = "ammo_armor", label = TranslateCap("component_ammo_armor"), hash = `COMPONENT_HEAVYSNIPER_MK2_CLIP_ARMORPIERCING` },
+ { name = "ammo_fmj", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_HEAVYSNIPER_MK2_CLIP_FMJ` },
+ { name = "ammo_explosive", label = TranslateCap("component_ammo_explosive"), hash = `COMPONENT_HEAVYSNIPER_MK2_CLIP_EXPLOSIVE` },
+ { name = "scope_zoom", label = TranslateCap("component_scope_zoom"), hash = `COMPONENT_AT_SCOPE_LARGE_MK2` },
+ { name = "scope_advanced", label = TranslateCap("component_scope_advanced"), hash = `COMPONENT_AT_SCOPE_MAX` },
+ { name = "scope_nightvision", label = TranslateCap("component_scope_nightvision"), hash = `COMPONENT_AT_SCOPE_NV` },
+ { name = "scope_thermal", label = TranslateCap("component_scope_thermal"), hash = `COMPONENT_AT_SCOPE_THERMAL` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_SR_SUPP_03` },
+ { name = "muzzle_squared", label = TranslateCap("component_muzzle_squared"), hash = `COMPONENT_AT_MUZZLE_08` },
+ { name = "muzzle_bell", label = TranslateCap("component_muzzle_bell"), hash = `COMPONENT_AT_MUZZLE_09` },
+ { name = "barrel_default", label = TranslateCap("component_barrel_default"), hash = `COMPONENT_AT_SR_BARREL_01` },
+ { name = "barrel_heavy", label = TranslateCap("component_barrel_heavy"), hash = `COMPONENT_AT_SR_BARREL_02` },
+ { name = "camo_finish", label = TranslateCap("component_camo_finish"), hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO` },
+ { name = "camo_finish2", label = TranslateCap("component_camo_finish2"), hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_02` },
+ { name = "camo_finish3", label = TranslateCap("component_camo_finish3"), hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_03` },
+ { name = "camo_finish4", label = TranslateCap("component_camo_finish4"), hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_04` },
+ { name = "camo_finish5", label = TranslateCap("component_camo_finish5"), hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_05` },
+ { name = "camo_finish6", label = TranslateCap("component_camo_finish6"), hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_06` },
+ { name = "camo_finish7", label = TranslateCap("component_camo_finish7"), hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_07` },
+ { name = "camo_finish8", label = TranslateCap("component_camo_finish8"), hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_08` },
+ { name = "camo_finish9", label = TranslateCap("component_camo_finish9"), hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_09` },
+ { name = "camo_finish10", label = TranslateCap("component_camo_finish10"), hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_10` },
+ { name = "camo_finish11", label = TranslateCap("component_camo_finish11"), hash = `COMPONENT_HEAVYSNIPER_MK2_CAMO_IND_01` },
+ },
+ },
+ {
+ name = "WEAPON_MARKSMANRIFLE",
+ label = TranslateCap("weapon_marksmanrifle"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SNIPER` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_MARKSMANRIFLE_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_MARKSMANRIFLE_CLIP_02` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_LARGE_FIXED_ZOOM` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_MARKSMANRIFLE_VARMOD_LUXE` },
+ },
+ },
+ {
+ name = "WEAPON_MARKSMANRIFLE_MK2",
+ label = TranslateCap("weapon_marksmanrifle_mk2"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SNIPER` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CLIP_02` },
+ { name = "ammo_tracer", label = TranslateCap("component_ammo_tracer"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CLIP_TRACER` },
+ { name = "ammo_incendiary", label = TranslateCap("component_ammo_incendiary"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CLIP_INCENDIARY` },
+ { name = "ammo_armor", label = TranslateCap("component_ammo_armor"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CLIP_ARMORPIERCING` },
+ { name = "ammo_fmj", label = TranslateCap("component_ammo_fmj"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CLIP_FMJ` },
+ { name = "scope_holo", label = TranslateCap("component_scope_holo"), hash = `COMPONENT_AT_SIGHTS` },
+ { name = "scope_large", label = TranslateCap("component_scope_large"), hash = `COMPONENT_AT_SCOPE_MEDIUM_MK2` },
+ { name = "scope_zoom", label = TranslateCap("component_scope_zoom"), hash = `COMPONENT_AT_SCOPE_LARGE_FIXED_ZOOM_MK2` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP` },
+ { name = "muzzle_flat", label = TranslateCap("component_muzzle_flat"), hash = `COMPONENT_AT_MUZZLE_01` },
+ { name = "muzzle_tactical", label = TranslateCap("component_muzzle_tactical"), hash = `COMPONENT_AT_MUZZLE_02` },
+ { name = "muzzle_fat", label = TranslateCap("component_muzzle_fat"), hash = `COMPONENT_AT_MUZZLE_03` },
+ { name = "muzzle_precision", label = TranslateCap("component_muzzle_precision"), hash = `COMPONENT_AT_MUZZLE_04` },
+ { name = "muzzle_heavy", label = TranslateCap("component_muzzle_heavy"), hash = `COMPONENT_AT_MUZZLE_05` },
+ { name = "muzzle_slanted", label = TranslateCap("component_muzzle_slanted"), hash = `COMPONENT_AT_MUZZLE_06` },
+ { name = "muzzle_split", label = TranslateCap("component_muzzle_split"), hash = `COMPONENT_AT_MUZZLE_07` },
+ { name = "barrel_default", label = TranslateCap("component_barrel_default"), hash = `COMPONENT_AT_MRFL_BARREL_01` },
+ { name = "barrel_heavy", label = TranslateCap("component_barrel_heavy"), hash = `COMPONENT_AT_MRFL_BARREL_02` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP_02` },
+ { name = "camo_finish", label = TranslateCap("component_camo_finish"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO` },
+ { name = "camo_finish2", label = TranslateCap("component_camo_finish2"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_02` },
+ { name = "camo_finish3", label = TranslateCap("component_camo_finish3"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_03` },
+ { name = "camo_finish4", label = TranslateCap("component_camo_finish4"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_04` },
+ { name = "camo_finish5", label = TranslateCap("component_camo_finish5"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_05` },
+ { name = "camo_finish6", label = TranslateCap("component_camo_finish6"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_06` },
+ { name = "camo_finish7", label = TranslateCap("component_camo_finish7"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_07` },
+ { name = "camo_finish8", label = TranslateCap("component_camo_finish8"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_08` },
+ { name = "camo_finish9", label = TranslateCap("component_camo_finish9"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_09` },
+ { name = "camo_finish10", label = TranslateCap("component_camo_finish10"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_10` },
+ { name = "camo_finish11", label = TranslateCap("component_camo_finish11"), hash = `COMPONENT_MARKSMANRIFLE_MK2_CAMO_IND_01` },
+ },
+ },
+ {
+ name = "WEAPON_SNIPERRIFLE",
+ label = TranslateCap("weapon_sniperrifle"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SNIPER` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "scope", label = TranslateCap("component_scope"), hash = `COMPONENT_AT_SCOPE_LARGE` },
+ { name = "scope_advanced", label = TranslateCap("component_scope_advanced"), hash = `COMPONENT_AT_SCOPE_MAX` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
+ { name = "luxary_finish", label = TranslateCap("component_luxary_finish"), hash = `COMPONENT_SNIPERRIFLE_VARMOD_LUXE` },
+ },
+ },
+ -- Heavy / Launchers
+ {
+ name = "WEAPON_COMPACTLAUNCHER",
+ label = TranslateCap("weapon_compactlauncher"),
+ tints = Config.DefaultWeaponTints,
+ components = {},
+ ammo = { label = TranslateCap("ammo_grenadelauncher"), hash = `AMMO_GRENADELAUNCHER` },
+ },
+ { name = "WEAPON_FIREWORK", label = TranslateCap("weapon_firework"), components = {}, ammo = { label = TranslateCap("ammo_firework"), hash = `AMMO_FIREWORK` } },
+ {
+ name = "WEAPON_GRENADELAUNCHER",
+ label = TranslateCap("weapon_grenadelauncher"),
+ tints = Config.DefaultWeaponTints,
+ components = {},
+ ammo = { label = TranslateCap("ammo_grenadelauncher"), hash = `AMMO_GRENADELAUNCHER` },
+ },
+ { name = "WEAPON_HOMINGLAUNCHER", label = TranslateCap("weapon_hominglauncher"), tints = Config.DefaultWeaponTints, components = {}, ammo = { label = TranslateCap("ammo_rockets"), hash = `AMMO_HOMINGLAUNCHER` } },
+ { name = "WEAPON_MINIGUN", label = TranslateCap("weapon_minigun"), tints = Config.DefaultWeaponTints, components = {}, ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_MINIGUN` } },
+ { name = "WEAPON_RAILGUN", label = TranslateCap("weapon_railgun"), tints = Config.DefaultWeaponTints, components = {}, ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RAILGUN` } },
+ { name = "WEAPON_RPG", label = TranslateCap("weapon_rpg"), tints = Config.DefaultWeaponTints, components = {}, ammo = { label = TranslateCap("ammo_rockets"), hash = `AMMO_RPG` } },
+ { name = "WEAPON_RAYMINIGUN", label = TranslateCap("weapon_rayminigun"), tints = Config.DefaultWeaponTints, components = {}, ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_MINIGUN` } },
+ -- Thrown
+ { name = "WEAPON_BALL", label = TranslateCap("weapon_ball"), components = {}, ammo = { label = TranslateCap("ammo_ball"), hash = `AMMO_BALL` } },
+ { name = "WEAPON_BZGAS", label = TranslateCap("weapon_bzgas"), components = {}, ammo = { label = TranslateCap("ammo_bzgas"), hash = `AMMO_BZGAS` } },
+ { name = "WEAPON_FLARE", label = TranslateCap("weapon_flare"), components = {}, ammo = { label = TranslateCap("ammo_flare"), hash = `AMMO_FLARE` } },
+ { name = "WEAPON_GRENADE", label = TranslateCap("weapon_grenade"), components = {}, ammo = { label = TranslateCap("ammo_grenade"), hash = `AMMO_GRENADE` } },
+ { name = "WEAPON_PETROLCAN", label = TranslateCap("weapon_petrolcan"), components = {}, ammo = { label = TranslateCap("ammo_petrol"), hash = `AMMO_PETROLCAN` } },
+ { name = "WEAPON_HAZARDCAN", label = TranslateCap("weapon_hazardcan"), components = {}, ammo = { label = TranslateCap("ammo_petrol"), hash = `AMMO_PETROLCAN` } },
+ { name = "WEAPON_MOLOTOV", label = TranslateCap("weapon_molotov"), components = {}, ammo = { label = TranslateCap("ammo_molotov"), hash = `AMMO_MOLOTOV` } },
+ { name = "WEAPON_PROXMINE", label = TranslateCap("weapon_proxmine"), components = {}, ammo = { label = TranslateCap("ammo_proxmine"), hash = `AMMO_PROXMINE` } },
+ { name = "WEAPON_PIPEBOMB", label = TranslateCap("weapon_pipebomb"), components = {}, ammo = { label = TranslateCap("ammo_pipebomb"), hash = `AMMO_PIPEBOMB` } },
+ { name = "WEAPON_SNOWBALL", label = TranslateCap("weapon_snowball"), components = {}, ammo = { label = TranslateCap("ammo_snowball"), hash = `AMMO_SNOWBALL` } },
+ { name = "WEAPON_STICKYBOMB", label = TranslateCap("weapon_stickybomb"), components = {}, ammo = { label = TranslateCap("ammo_stickybomb"), hash = `AMMO_STICKYBOMB` } },
+ { name = "WEAPON_SMOKEGRENADE", label = TranslateCap("weapon_smokegrenade"), components = {}, ammo = { label = TranslateCap("ammo_smokebomb"), hash = `AMMO_SMOKEGRENADE` } },
+ -- Tools
+ { name = "WEAPON_FIREEXTINGUISHER", label = TranslateCap("weapon_fireextinguisher"), components = {}, ammo = { label = TranslateCap("ammo_charge"), hash = `AMMO_FIREEXTINGUISHER` } },
+ { name = "WEAPON_DIGISCANNER", label = TranslateCap("weapon_digiscanner"), components = {} },
+ { name = "GADGET_PARACHUTE", label = TranslateCap("gadget_parachute"), components = {} },
+ {
+ name = "WEAPON_TACTICALRIFLE",
+ label = TranslateCap("weapon_tactilerifle"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RIFLE` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_TACTICALRIFLE_CLIP_01` },
+ { name = "clip_extended", label = TranslateCap("component_clip_extended"), hash = `COMPONENT_TACTICALRIFLE_CLIP_02` },
+ { name = "flashlight", label = TranslateCap("component_flashlight"), hash = `COMPONENT_AT_AR_FLSH_REH` },
+ { name = "grip", label = TranslateCap("component_grip"), hash = `COMPONENT_AT_AR_AFGRIP` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_AT_AR_SUPP_02` },
+ },
+ },
+ {
+ name = "WEAPON_PRECISIONRIFLE",
+ label = TranslateCap("weapon_precisionrifle"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_SNIPER` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_PRECISIONRIFLE_CLIP_01` },
+ },
+ },
+ { name = "WEAPON_METALDETECTOR", label = TranslateCap("weapon_metaldetector"), components = {} },
+ {
+ name = "WEAPON_PISTOLXM3",
+ label = TranslateCap("weapon_pistolxm3"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_PISTOL` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_PISTOLXM3_CLIP_01` },
+ { name = "suppressor", label = TranslateCap("component_suppressor"), hash = `COMPONENT_PISTOLXM3_SUPP` },
+ },
+ },
+ { name = "WEAPON_ACIDPACKAGE", label = TranslateCap("weapon_acidpackage"), components = {} },
+ { name = "WEAPON_CANDYCANE", label = TranslateCap("weapon_candycane"), components = {} },
+ {
+ name = "WEAPON_RAILGUNXM3",
+ label = TranslateCap("weapon_railgunxm3"),
+ ammo = { label = TranslateCap("ammo_rounds"), hash = `AMMO_RAILGUN` },
+ tints = Config.DefaultWeaponTints,
+ components = {
+ { name = "clip_default", label = TranslateCap("component_clip_default"), hash = `COMPONENT_RAILGUNXM3_CLIP_01` },
+ },
+ },
}
diff --git a/server-data/resources/[esx]/es_extended/fxmanifest.lua b/server-data/resources/[esx]/es_extended/fxmanifest.lua
index c41e3d9fa..de5445070 100644
--- a/server-data/resources/[esx]/es_extended/fxmanifest.lua
+++ b/server-data/resources/[esx]/es_extended/fxmanifest.lua
@@ -1,70 +1,70 @@
-fx_version("cerulean")
+fx_version 'cerulean'
-game("gta5")
-description("ES Extended")
-lua54("yes")
-version("1.0.1")
+game 'gta5'
+description 'The Core resource that provides the functionalities for all other resources.'
+lua54 'yes'
+version '1.0.1'
-shared_scripts({
- "locale.lua",
- "locales/*.lua",
- "config.lua",
- "config.weapons.lua",
-})
+shared_scripts {
+ 'locale.lua',
+ 'locales/*.lua',
+ 'config.lua',
+ 'config.weapons.lua',
+}
-server_scripts({
- "@oxmysql/lib/MySQL.lua",
- "config.logs.lua",
- "server/common.lua",
- "server/modules/callback.lua",
- "server/classes/player.lua",
- "server/classes/overrides/*.lua",
- "server/functions.lua",
- "server/onesync.lua",
- "server/paycheck.lua",
- "server/main.lua",
- "server/commands.lua",
- "common/modules/*.lua",
- "common/functions.lua",
- "server/modules/actions.lua",
- "server/modules/npwd.lua",
-})
+server_scripts {
+ '@oxmysql/lib/MySQL.lua',
+ 'config.logs.lua',
+ 'server/common.lua',
+ 'server/modules/callback.lua',
+ 'server/classes/player.lua',
+ 'server/classes/overrides/*.lua',
+ 'server/functions.lua',
+ 'server/onesync.lua',
+ 'server/paycheck.lua',
+ 'server/main.lua',
+ 'server/commands.lua',
+ 'common/modules/*.lua',
+ 'common/functions.lua',
+ 'server/modules/actions.lua',
+ 'server/modules/npwd.lua'
+}
-client_scripts({
- "client/common.lua",
- "client/functions.lua",
- "client/wrapper.lua",
- "client/modules/callback.lua",
- "client/main.lua",
- "common/modules/*.lua",
- "common/functions.lua",
- "common/functions.lua",
- "client/modules/actions.lua",
- "client/modules/death.lua",
- "client/modules/npwd.lua",
- "client/modules/scaleform.lua",
- "client/modules/streaming.lua",
-})
+client_scripts {
+ 'client/common.lua',
+ 'client/functions.lua',
+ 'client/wrapper.lua',
+ 'client/modules/callback.lua',
+ 'client/main.lua',
+ 'common/modules/*.lua',
+ 'common/functions.lua',
+ 'common/functions.lua',
+ 'client/modules/actions.lua',
+ 'client/modules/death.lua',
+ 'client/modules/npwd.lua',
+ 'client/modules/scaleform.lua',
+ 'client/modules/streaming.lua',
+}
-ui_page({
- "html/ui.html",
-})
+ui_page {
+ 'html/ui.html'
+}
-files({
- "imports.lua",
- "locale.js",
- "html/ui.html",
- "html/css/app.css",
- "html/js/mustache.min.js",
- "html/js/wrapper.js",
- "html/js/app.js",
- "html/fonts/pdown.ttf",
- "html/fonts/bankgothic.ttf",
-})
+files {
+ 'imports.lua',
+ 'locale.js',
+ 'html/ui.html',
+ 'html/css/app.css',
+ 'html/js/mustache.min.js',
+ 'html/js/wrapper.js',
+ 'html/js/app.js',
+ 'html/fonts/pdown.ttf',
+ 'html/fonts/bankgothic.ttf',
+}
-dependencies({
- "/native:0x6AE51D4B",
- "/native:0xA61C8FC6",
- "oxmysql",
- "spawnmanager",
-})
+dependencies {
+ '/native:0x6AE51D4B',
+ '/native:0xA61C8FC6',
+ 'oxmysql',
+ 'spawnmanager',
+}
diff --git a/server-data/resources/[esx]/es_extended/html/css/app.css b/server-data/resources/[esx]/es_extended/html/css/app.css
index 2478a1a99..6d4b095c9 100644
--- a/server-data/resources/[esx]/es_extended/html/css/app.css
+++ b/server-data/resources/[esx]/es_extended/html/css/app.css
@@ -72,4 +72,4 @@ html {
.menu .menu-items .menu-item.selected {
background-color: #ccc;
-}
\ No newline at end of file
+}
diff --git a/server-data/resources/[esx]/es_extended/html/ui.html b/server-data/resources/[esx]/es_extended/html/ui.html
index 1a45afd98..bbc9c005c 100644
--- a/server-data/resources/[esx]/es_extended/html/ui.html
+++ b/server-data/resources/[esx]/es_extended/html/ui.html
@@ -1,15 +1,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+