Merge branch 'dev' into fix/multichar

This commit is contained in:
Demetrio
2023-06-07 17:38:18 +02:00
committed by GitHub
32 changed files with 883 additions and 664 deletions
-9
View File
@@ -1,9 +0,0 @@
root = true
[*]
indent_size = 4
indent_style = tab
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
+23 -19
View File
@@ -401,8 +401,8 @@ function ESX.Game.DeleteObject(object)
DeleteObject(object)
end
function ESX.Game.SpawnVehicle(vehicle, coords, heading, cb, networked)
local model = type(vehicle) == 'number' and vehicle or joaat(vehicle)
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
@@ -626,6 +626,11 @@ function ESX.Game.GetVehicleProperties(vehicle)
end
end
local driftTyresEnabled = false
if type(GetDriftTyresEnabled(vehicle) == "boolean") and GetDriftTyresEnabled(vehicle) then
driftTyresEnabled = true
end
local doorsBroken, windowsBroken, tyreBurst = {}, {}, {}
local numWheels = tostring(GetVehicleNumberOfWheels(vehicle))
@@ -688,6 +693,7 @@ function ESX.Game.GetVehicleProperties(vehicle)
neonColor = table.pack(GetVehicleNeonLightsColour(vehicle)),
extras = extras,
dirftTyresEnabled = driftTyresEnabled,
tyreSmokeColor = table.pack(GetVehicleTyreSmokeColor(vehicle)),
modSpoilers = GetVehicleMod(vehicle, 0),
@@ -821,6 +827,10 @@ function ESX.Game.SetVehicleProperties(vehicle, props)
end
end
if props.driftTyresEnabled then
SetDriftTyresEnabled(vehicle, true)
end
if props.neonColor ~= nil then
SetVehicleNeonLightsColour(vehicle, props.neonColor[1], props.neonColor[2], props.neonColor[3])
end
@@ -1087,17 +1097,11 @@ function ESX.ShowInventory()
local weaponHash = joaat(v.name)
if HasPedGotWeapon(playerPed, weaponHash, false) then
local ammo, label = GetAmmoInPedWeapon(playerPed, weaponHash)
if v.ammo then
label = ('%s - %s %s'):format(v.label, ammo, v.ammo.label)
else
label = v.label
end
local ammo = GetAmmoInPedWeapon(playerPed, weaponHash)
elements[#elements+1] = {
icon = 'fas fa-gun',
title = label,
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,
@@ -1118,10 +1122,10 @@ function ESX.ShowInventory()
ESX.CloseContext()
ESX.OpenContext("right", elements, function(menu,element)
ESX.OpenContext("right", elements, function(_, element)
local player, distance = ESX.Game.GetClosestPlayer()
elements2 = {}
local elements2 = {}
if element.usable then
elements2[#elements2+1] = {
@@ -1169,7 +1173,7 @@ function ESX.ShowInventory()
action = 'return'
}
ESX.OpenContext("right", elements2, function(menu2,element2)
ESX.OpenContext("right", elements2, function(_, element2)
local item, type = element2.value, element2.type
if element2.action == "give" then
@@ -1177,7 +1181,7 @@ function ESX.ShowInventory()
if #playersNearby > 0 then
local players = {}
elements3 = {
local elements3 = {
{unselectable = true, icon = "fas fa-users", title = "Nearby Players"}
}
@@ -1194,7 +1198,7 @@ function ESX.ShowInventory()
}
end
ESX.OpenContext("right", elements3, function(menu3,element3)
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)
@@ -1213,7 +1217,7 @@ function ESX.ShowInventory()
{icon = "fas fa-check-double", title = "Confirm", val = "confirm"}
}
ESX.OpenContext("right", elementsG, function(menuG,elementG)
ESX.OpenContext("right", elementsG, function(menuG, _)
local quantity = tonumber(menuG.eles[2].inputValue)
if quantity and quantity > 0 and element.count >= quantity then
@@ -1252,7 +1256,7 @@ function ESX.ShowInventory()
{icon = "fas fa-check-double", title = "Confirm", val = "confirm"}
}
ESX.OpenContext("right", elementsR, function(menuR,elementR)
ESX.OpenContext("right", elementsR, function(menuR, _)
local quantity = tonumber(menuR.eles[2].inputValue)
if quantity and quantity > 0 and element.count >= quantity then
@@ -1287,7 +1291,7 @@ function ESX.ShowInventory()
{icon = "fas fa-check-double", title = "Confirm", val = "confirm"}
}
ESX.OpenContext("right", elementsGA, function(menuGA,elementGA)
ESX.OpenContext("right", elementsGA, function(menuGA, _)
local quantity = tonumber(menuGA.eles[2].inputValue)
if quantity and quantity > 0 then
@@ -1352,4 +1356,4 @@ function ESX.GetVehicleType(model)
}
return types[vehicleType] or "automobile"
end
end
+84 -83
View File
@@ -76,7 +76,7 @@ AddEventHandler('esx:playerLoaded', function(xPlayer, isNew, skin)
end
if Config.DisableVehicleSeatShuff then
AddEventHandler('esx:enteredVehicle', function(vehicle, plate, seat)
AddEventHandler('esx:enteredVehicle', function(vehicle, _, seat)
if seat == 0 then
SetPedIntoVehicle(ESX.PlayerData.ped, vehicle, 0)
SetPedConfigFlag(ESX.PlayerData.ped, 184, true)
@@ -241,7 +241,7 @@ AddEventHandler('esx:restoreLoadout', function()
end)
-- Credit: https://github.com/LukeWasTakenn, https://github.com/LukeWasTakenn/luke_garages/blob/master/client/client.lua#L331-L352
AddStateBagChangeHandler('VehicleProperties', nil, function(bagName, key, value)
AddStateBagChangeHandler('VehicleProperties', nil, function(bagName, _, value)
if not value then
return
end
@@ -254,12 +254,12 @@ AddStateBagChangeHandler('VehicleProperties', nil, function(bagName, key, value)
return
end
end
local vehicle = NetToVeh(tonumber(netId))
local timer = GetGameTimer()
local timer2 = GetGameTimer()
while NetworkGetEntityOwner(vehicle) ~= PlayerId() do
Wait(0)
if GetGameTimer() - timer > 10000 then
if GetGameTimer() - timer2 > 10000 then
return
end
end
@@ -522,82 +522,82 @@ AddEventHandler("esx:tpm", function()
local GetBlipInfoIdCoord = GetBlipInfoIdCoord
local GetVehiclePedIsIn = GetVehiclePedIsIn
local admin = ESX.TriggerServerCallback.Await("esx:isUserAdmin")
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
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
NewLoadSceneStart(x, y, z, x, y, z, 50.0, 0)
local curTime = GetGameTimer()
while IsNetworkLoadingScene() do
if GetGameTimer() - curTime > 1000 then
break
end
-- Fade screen to hide how clients get teleported.
DoScreenFadeOut(650)
while not IsScreenFadedOut() do
Wait(0)
end
NewLoadSceneStop()
SetPedCoordsKeepVehicle(ped, x, y, z)
while not HasCollisionLoadedAroundEntity(ped) do
RequestCollisionAtCoord(x, y, z)
if GetGameTimer() - curTime > 1000 then
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
-- 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
-- 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
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)
-- If Z coord was found, set coords in found coords.
SetPedCoordsKeepVehicle(ped, x, y, groundZ)
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
@@ -646,23 +646,24 @@ local function noclipThread()
end
RegisterNetEvent("esx:noclip")
AddEventHandler("esx:noclip", function()
local admin = ESX.TriggerServerCallback.Await("esx:isUserAdmin")
if not admin then
return
end
AddEventHandler("esx:noclip", function(input)
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
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
noclip = not noclip
if noclip then
CreateThread(noclipThread)
end
ESX.ShowNotification(TranslateCap('noclip_message', noclip and "enabled" or "disabled"), true, false, 140)
ESX.ShowNotification(TranslateCap('noclip_message', noclip and "enabled" or "disabled"), true, false, 140)
end)
end)
RegisterNetEvent("esx:killPlayer")
@@ -707,4 +708,4 @@ end
RegisterNetEvent('esx:updatePlayerData', function(key, val)
ESX.SetPlayerData(key, val)
end)
end)
+9 -34
View File
@@ -3,47 +3,22 @@ local serverRequests = {}
local clientCallbacks = {}
ESX.TriggerServerCallback = setmetatable({
---@param eventName string
---@param ... any
Await = function(eventName, ...)
assert(type(eventName) == 'string', 'Argument 1 `eventName` is not a string!')
local p = promise.new()
---@param eventName string
---@param callback function
---@param ... any
ESX.TriggerServerCallback = function(eventName, callback, ...)
serverRequests[RequestId] = callback
TriggerServerEvent('esx:triggerServerCallback', eventName, RequestId, GetInvokingResource() or "unknown", ...)
serverRequests[RequestId] = p
TriggerServerEvent('esx:triggerServerCallback', eventName, RequestId, GetInvokingResource() or "unknown", ...)
RequestId = RequestId + 1
return Citizen.Await(p)
end
}, {
---@param eventName string
---@param callback function
---@param ... any
__call = function(_, eventName, callback, ...)
assert(type(eventName) == 'string', 'Argument 1 `eventName` is not a string!')
assert(type(callback) == 'function', 'Argument 2 `callback` is not a function!')
serverRequests[RequestId] = callback
TriggerServerEvent('esx:triggerServerCallback', eventName, RequestId, GetInvokingResource() or "unknown", ...)
RequestId = RequestId + 1
end
})
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
if type(serverRequests[requestId]) == 'table' then
serverRequests[requestId]:resolve(...)
return
end
serverRequests[requestId](...)
serverRequests[requestId] = nil
end)
+1 -2
View File
@@ -119,12 +119,11 @@ function ESX.Table.Concat(t1, t2)
end
function ESX.Table.Join(t, sep)
local sep = sep or ','
local str = ''
for i = 1, #t, 1 do
if i > 1 then
str = str .. sep
str = str .. (sep or ',')
end
str = str .. t[i]
+2 -1
View File
@@ -4,7 +4,8 @@ Config.DiscordLogs = {
test = '',
Chat = '',
UserActions = '',
Resources = ''
Resources = '',
Paycheck = ''
},
Colors = { -- https://www.spycolor.com/
+17 -1
View File
@@ -18,9 +18,23 @@ Config.Accounts = {
Config.StartingAccountMoney = {bank = 50000}
Config.DefaultSpawn = {x = -269.4, y = -955.3, z = 31.2, heading = 205.8}
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
}
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
@@ -33,6 +47,8 @@ Config.Multichar = GetResourceState("esx_multicharacter") ~= "mis
Config.Identity = true -- Select a characters 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.DisableNPCDrops = false -- stops NPCs from dropping weapons on death
+14 -1
View File
@@ -976,5 +976,18 @@ Config.Weapons = {
{name = 'clip_default', label = TranslateCap('component_clip_default'), hash = `COMPONENT_PRECISIONRIFLE_CLIP_01`},
}
},
{name = 'WEAPON_METALDETECTOR', label = TranslateCap('weapon_metaldetector'), components = {}}
{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`},
},
},
}
+6
View File
@@ -216,6 +216,12 @@ Locales["cs"] = {
["weapon_precisionrifle"] = "Precision Rifle",
["weapon_tactilerifle"] = "Service Carbine",
-- Drug Wars DLC
['weapon_candycane'] = 'Candy Cane', -- not translated
['weapon_acidpackage'] = 'Acid Package', -- not translated
['weapon_pistolxm3'] = 'WM 29 Pistol', -- not translated
['weapon_railgunxm3'] = 'Railgun', -- not translated
-- Thrown
["weapon_ball"] = "Míček",
["weapon_bzgas"] = "Smrtící slzný plyn",
+6
View File
@@ -222,6 +222,12 @@ Locales["da"] = {
["weapon_precisionrifle"] = "Precision Rifle",
["weapon_tactilerifle"] = "Service Carbine",
-- Drug Wars DLC
['weapon_candycane'] = 'Candy Cane', -- not translated
['weapon_acidpackage'] = 'Acid Package', -- not translated
['weapon_pistolxm3'] = 'WM 29 Pistol', -- not translated
['weapon_railgunxm3'] = 'Railgun', -- not translated
-- Thrown
["weapon_ball"] = "Baseball",
["weapon_bzgas"] = "BZ Gas",
+6
View File
@@ -222,6 +222,12 @@ Locales["de"] = {
["weapon_precisionrifle"] = "Präzisionsgewehr",
["weapon_tactilerifle"] = "Service Karabiner",
-- Drug Wars DLC
['weapon_candycane'] = 'Candy Cane', -- not translated
['weapon_acidpackage'] = 'Acid Package', -- not translated
['weapon_pistolxm3'] = 'WM 29 Pistol', -- not translated
['weapon_railgunxm3'] = 'Railgun', -- not translated
-- Thrown
["weapon_ball"] = "Baseball",
["weapon_bzgas"] = "BZ Gas",
+335 -331
View File
@@ -1,365 +1,369 @@
Locales["en"] = {
-- Inventory
["inventory"] = "Inventory ( Weight %s / %s )",
["use"] = "Use",
["give"] = "Give",
["remove"] = "Throw",
["return"] = "Return",
["give_to"] = "Give to",
["amount"] = "Amount",
["giveammo"] = "Give ammo",
["amountammo"] = "Ammo Amount",
["noammo"] = "Not Enough!",
["gave_item"] = "Giving %sx %s to %s",
["received_item"] = "Received %sx %s from %s",
["gave_weapon"] = "Giving %s to %s",
["gave_weapon_ammo"] = "Giving ~o~%sx %s for %s to %s",
["gave_weapon_withammo"] = "Giving %s with ~o~%sx %s to %s",
["gave_weapon_hasalready"] = "%s already has a %s",
["gave_weapon_noweapon"] = "%s does not have that weapon",
["received_weapon"] = "Received %s from %s",
["received_weapon_ammo"] = "Received ~o~%sx %s for your %s from %s",
["received_weapon_withammo"] = "Received %s with ~o~%sx %s from %s",
["received_weapon_hasalready"] = "%s has attempted to give you a %s, but you already this weapon",
["received_weapon_noweapon"] = "%s has attempted to give you ammo for a %s, but you do not have this weapon",
["gave_account_money"] = "Giving $%s (%s) to %s",
["received_account_money"] = "Received $%s (%s) from %s",
["amount_invalid"] = "Invalid quantity",
["players_nearby"] = "No nearby Players",
["ex_inv_lim"] = "Cannot perfom action,exceeding max weight of %s",
["imp_invalid_quantity"] = "Cannot perfom action, the quantity is invalid",
["imp_invalid_amount"] = "Cannot perfom action, the amount is invalid",
["threw_standard"] = "Throwing %sx %s",
["threw_account"] = "Throwing $%s %s",
["threw_weapon"] = "Throwing %s",
["threw_weapon_ammo"] = "Throwing %s with ~o~%sx %s",
["threw_weapon_already"] = "You already have this weapon",
["threw_cannot_pickup"] = "Inventory is full, Cannot Pickup!",
["threw_pickup_prompt"] = "Press E to Pickup",
-- Inventory
["inventory"] = "Inventory ( Weight %s / %s )",
["use"] = "Use",
["give"] = "Give",
["remove"] = "Throw",
["return"] = "Return",
["give_to"] = "Give to",
["amount"] = "Amount",
["giveammo"] = "Give ammo",
["amountammo"] = "Ammo Amount",
["noammo"] = "Not Enough!",
["gave_item"] = "Giving %sx %s to %s",
["received_item"] = "Received %sx %s from %s",
["gave_weapon"] = "Giving %s to %s",
["gave_weapon_ammo"] = "Giving ~o~%sx %s for %s to %s",
["gave_weapon_withammo"] = "Giving %s with ~o~%sx %s to %s",
["gave_weapon_hasalready"] = "%s already has a %s",
["gave_weapon_noweapon"] = "%s does not have that weapon",
["received_weapon"] = "Received %s from %s",
["received_weapon_ammo"] = "Received ~o~%sx %s for your %s from %s",
["received_weapon_withammo"] = "Received %s with ~o~%sx %s from %s",
["received_weapon_hasalready"] = "%s has attempted to give you a %s, but you already this weapon",
["received_weapon_noweapon"] = "%s has attempted to give you ammo for a %s, but you do not have this weapon",
["gave_account_money"] = "Giving $%s (%s) to %s",
["received_account_money"] = "Received $%s (%s) from %s",
["amount_invalid"] = "Invalid quantity",
["players_nearby"] = "No nearby Players",
["ex_inv_lim"] = "Cannot perfom action,exceeding max weight of %s",
["imp_invalid_quantity"] = "Cannot perfom action, the quantity is invalid",
["imp_invalid_amount"] = "Cannot perfom action, the amount is invalid",
["threw_standard"] = "Throwing %sx %s",
["threw_account"] = "Throwing $%s %s",
["threw_weapon"] = "Throwing %s",
["threw_weapon_ammo"] = "Throwing %s with ~o~%sx %s",
["threw_weapon_already"] = "You already have this weapon",
["threw_cannot_pickup"] = "Inventory is full, Cannot Pickup!",
["threw_pickup_prompt"] = "Press E to Pickup",
-- Key mapping
["keymap_showinventory"] = "Show Inventory",
-- Key mapping
["keymap_showinventory"] = "Show Inventory",
-- Salary related
["received_salary"] = "You have been paid: $%s",
["received_help"] = "You have been paid your welfare check: $%s",
["company_nomoney"] = "the company you're employeed at is too poor to pay out your salary",
["received_paycheck"] = "received paycheck",
["bank"] = "Maze Bank",
["account_bank"] = "Bank",
["account_black_money"] = "Dirty Money",
["account_money"] = "Cash",
-- Salary related
["received_salary"] = "You have been paid: $%s",
["received_help"] = "You have been paid your welfare check: $%s",
["company_nomoney"] = "the company you're employeed at is too poor to pay out your salary",
["received_paycheck"] = "received paycheck",
["bank"] = "Maze Bank",
["account_bank"] = "Bank",
["account_black_money"] = "Dirty Money",
["account_money"] = "Cash",
["act_imp"] = "Cannot Perform Action",
["in_vehicle"] = "Cannot Perform Action, Player is in a vehicle",
["act_imp"] = "Cannot Perform Action",
["in_vehicle"] = "Cannot Perform Action, Player is in a vehicle",
-- Commands
["command_bring"] = "Bring player to you",
["command_car"] = "Spawn a vehicle",
["command_car_car"] = "Vehicle model or hash",
["command_cardel"] = "Remove vehicles in proximity",
["command_cardel_radius"] = "Removes all vehicles within the specified radius",
["command_clear"] = "Clear chat Text",
["command_clearall"] = "Clear chat Text for all players",
["command_clearinventory"] = "Remove All items from the Players Inventory",
["command_clearloadout"] = "Remove All weapons from the Players Loadout",
["command_freeze"] = "Freeze a player",
["command_unfreeze"] = "Unfreeze a player",
["command_giveaccountmoney"] = "Give Money to a specified Account",
["command_giveaccountmoney_account"] = "Account to add to",
["command_giveaccountmoney_amount"] = "Amount to add",
["command_giveaccountmoney_invalid"] = "Account Name Invalid",
["command_giveitem"] = "Give Player an item",
["command_giveitem_item"] = "Item name",
["command_giveitem_count"] = "Quantity",
["command_giveweapon"] = "Give player a weapon",
["command_giveweapon_weapon"] = "Weapon name",
["command_giveweapon_ammo"] = "Ammo Quantity",
["command_giveweapon_hasalready"] = "Player already has this weapon",
["command_giveweaponcomponent"] = "Give weapon component to player",
["command_giveweaponcomponent_component"] = "Component name",
["command_giveweaponcomponent_invalid"] = "Invalid weapon component",
["command_giveweaponcomponent_hasalready"] = "Player already has this weapon component",
["command_giveweaponcomponent_missingweapon"] = "Player does not have this weapon",
["command_goto"] = "Teleport yourself to a player",
["command_kill"] = "Kill a player",
["command_save"] = "Force Save a player`s Data",
["command_saveall"] = "Force Save all player data",
["command_setaccountmoney"] = "Set the money within a specified account",
["command_setaccountmoney_amount"] = "Amount",
["command_setcoords"] = "Teleport to specified Coordinates",
["command_setcoords_x"] = "X value",
["command_setcoords_y"] = "Y value",
["command_setcoords_z"] = "Z value",
["command_setjob"] = "Set a player`s job",
["command_setjob_job"] = "Name",
["command_setjob_grade"] = "Job grade",
["command_setjob_invalid"] = "the job, grade or both are invalid",
["command_setgroup"] = "Set a players permission group",
["command_setgroup_group"] = "Name of Group",
["commanderror_argumentmismatch"] = "Invalid Argument Count (passed %s, wanted %s)",
["commanderror_argumentmismatch_number"] = "Invalid Argument #%s data type (passed string, wanted number)",
["commanderror_invaliditem"] = "Invalid item",
["commanderror_invalidweapon"] = "Invalid weapon",
["commanderror_console"] = "Command Cannot be executed from console",
["commanderror_invalidcommand"] = "Invalid Command - /%s",
["commanderror_invalidplayerid"] = "Specified Player is not online",
["commandgeneric_playerid"] = "Player`s Server Id",
["command_giveammo_noweapon_found"] = "%s does not have that weapon",
["command_giveammo_weapon"] = "Weapon name",
["command_giveammo_ammo"] = "Ammo Quantity",
["tpm_nowaypoint"] = "No Waypoint Set.",
["tpm_success"] = "Successfully Teleported",
-- Commands
["command_bring"] = "Bring player to you",
["command_car"] = "Spawn a vehicle",
["command_car_car"] = "Vehicle model or hash",
["command_cardel"] = "Remove vehicles in proximity",
["command_cardel_radius"] = "Removes all vehicles within the specified radius",
["command_clear"] = "Clear chat Text",
["command_clearall"] = "Clear chat Text for all players",
["command_clearinventory"] = "Remove All items from the Players Inventory",
["command_clearloadout"] = "Remove All weapons from the Players Loadout",
["command_freeze"] = "Freeze a player",
["command_unfreeze"] = "Unfreeze a player",
["command_giveaccountmoney"] = "Give Money to a specified Account",
["command_giveaccountmoney_account"] = "Account to add to",
["command_giveaccountmoney_amount"] = "Amount to add",
["command_giveaccountmoney_invalid"] = "Account Name Invalid",
["command_removeaccountmoney"] = "Remove Money from a specified Account",
["command_removeaccountmoney_account"] = "Account to remove from",
["command_removeaccountmoney_amount"] = "Amount to remove",
["command_removeaccountmoney_invalid"] = "Account Name Invalid",
["command_giveitem"] = "Give Player an item",
["command_giveitem_item"] = "Item name",
["command_giveitem_count"] = "Quantity",
["command_giveweapon"] = "Give player a weapon",
["command_giveweapon_weapon"] = "Weapon name",
["command_giveweapon_ammo"] = "Ammo Quantity",
["command_giveweapon_hasalready"] = "Player already has this weapon",
["command_giveweaponcomponent"] = "Give weapon component to player",
["command_giveweaponcomponent_component"] = "Component name",
["command_giveweaponcomponent_invalid"] = "Invalid weapon component",
["command_giveweaponcomponent_hasalready"] = "Player already has this weapon component",
["command_giveweaponcomponent_missingweapon"] = "Player does not have this weapon",
["command_goto"] = "Teleport yourself to a player",
["command_kill"] = "Kill a player",
["command_save"] = "Force Save a player`s Data",
["command_saveall"] = "Force Save all player data",
["command_setaccountmoney"] = "Set the money within a specified account",
["command_setaccountmoney_amount"] = "Amount",
["command_setcoords"] = "Teleport to specified Coordinates",
["command_setcoords_x"] = "X value",
["command_setcoords_y"] = "Y value",
["command_setcoords_z"] = "Z value",
["command_setjob"] = "Set a player`s job",
["command_setjob_job"] = "Name",
["command_setjob_grade"] = "Job grade",
["command_setjob_invalid"] = "the job, grade or both are invalid",
["command_setgroup"] = "Set a players permission group",
["command_setgroup_group"] = "Name of Group",
["commanderror_argumentmismatch"] = "Invalid Argument Count (passed %s, wanted %s)",
["commanderror_argumentmismatch_number"] = "Invalid Argument #%s data type (passed string, wanted number)",
["commanderror_invaliditem"] = "Invalid item",
["commanderror_invalidweapon"] = "Invalid weapon",
["commanderror_console"] = "Command Cannot be executed from console",
["commanderror_invalidcommand"] = "Invalid Command - /%s",
["commanderror_invalidplayerid"] = "Specified Player is not online",
["commandgeneric_playerid"] = "Player`s Server Id",
["command_giveammo_noweapon_found"] = "%s does not have that weapon",
["command_giveammo_weapon"] = "Weapon name",
["command_giveammo_ammo"] = "Ammo Quantity",
["tpm_nowaypoint"] = "No Waypoint Set.",
["tpm_success"] = "Successfully Teleported",
["noclip_message"] = "Noclip has been %s",
["enabled"] = "~g~enabled~s~",
["disabled"] = "~r~disabled~s~",
["noclip_message"] = "Noclip has been %s",
["enabled"] = "~g~enabled~s~",
["disabled"] = "~r~disabled~s~",
-- Locale settings
["locale_digit_grouping_symbol"] = ",",
["locale_currency"] = "£%s",
-- Locale settings
["locale_digit_grouping_symbol"] = ",",
["locale_currency"] = "£%s",
-- Weapons
-- Weapons
-- Melee
["weapon_dagger"] = "Dagger",
["weapon_bat"] = "Bat",
["weapon_battleaxe"] = "Battle Axe",
["weapon_bottle"] = "Bottle",
["weapon_crowbar"] = "Crowbar",
["weapon_flashlight"] = "Flashlight",
["weapon_golfclub"] = "Golf Club",
["weapon_hammer"] = "Hammer",
["weapon_hatchet"] = "Hatchet",
["weapon_knife"] = "Knife",
["weapon_knuckle"] = "Knuckledusters",
["weapon_machete"] = "Machete",
["weapon_nightstick"] = "Nightstick",
["weapon_wrench"] = "Pipe Wrench",
["weapon_poolcue"] = "Pool Cue",
["weapon_stone_hatchet"] = "Stone Hatchet",
["weapon_switchblade"] = "Switchblade",
-- Melee
["weapon_dagger"] = "Dagger",
["weapon_bat"] = "Bat",
["weapon_battleaxe"] = "Battle Axe",
["weapon_bottle"] = "Bottle",
["weapon_crowbar"] = "Crowbar",
["weapon_flashlight"] = "Flashlight",
["weapon_golfclub"] = "Golf Club",
["weapon_hammer"] = "Hammer",
["weapon_hatchet"] = "Hatchet",
["weapon_knife"] = "Knife",
["weapon_knuckle"] = "Knuckledusters",
["weapon_machete"] = "Machete",
["weapon_nightstick"] = "Nightstick",
["weapon_wrench"] = "Pipe Wrench",
["weapon_poolcue"] = "Pool Cue",
["weapon_stone_hatchet"] = "Stone Hatchet",
["weapon_switchblade"] = "Switchblade",
-- Handguns
["weapon_appistol"] = "AP Pistol",
["weapon_ceramicpistol"] = "Ceramic Pistol",
["weapon_combatpistol"] = "Combat Pistol",
["weapon_doubleaction"] = "Double-Action Revolver",
["weapon_navyrevolver"] = "Navy Revolver",
["weapon_flaregun"] = "Flaregun",
["weapon_gadgetpistol"] = "Gadget Pistol",
["weapon_heavypistol"] = "Heavy Pistol",
["weapon_revolver"] = "Heavy Revolver",
["weapon_revolver_mk2"] = "Heavy Revolver MK2",
["weapon_marksmanpistol"] = "Marksman Pistol",
["weapon_pistol"] = "Pistol",
["weapon_pistol_mk2"] = "Pistol MK2",
["weapon_pistol50"] = "Pistol .50",
["weapon_snspistol"] = "SNS Pistol",
["weapon_snspistol_mk2"] = "SNS Pistol MK2",
["weapon_stungun"] = "Taser",
["weapon_raypistol"] = "Up-N-Atomizer",
["weapon_vintagepistol"] = "Vintage Pistol",
-- Handguns
["weapon_appistol"] = "AP Pistol",
["weapon_ceramicpistol"] = "Ceramic Pistol",
["weapon_combatpistol"] = "Combat Pistol",
["weapon_doubleaction"] = "Double-Action Revolver",
["weapon_navyrevolver"] = "Navy Revolver",
["weapon_flaregun"] = "Flaregun",
["weapon_gadgetpistol"] = "Gadget Pistol",
["weapon_heavypistol"] = "Heavy Pistol",
["weapon_revolver"] = "Heavy Revolver",
["weapon_revolver_mk2"] = "Heavy Revolver MK2",
["weapon_marksmanpistol"] = "Marksman Pistol",
["weapon_pistol"] = "Pistol",
["weapon_pistol_mk2"] = "Pistol MK2",
["weapon_pistol50"] = "Pistol .50",
["weapon_snspistol"] = "SNS Pistol",
["weapon_snspistol_mk2"] = "SNS Pistol MK2",
["weapon_stungun"] = "Taser",
["weapon_raypistol"] = "Up-N-Atomizer",
["weapon_vintagepistol"] = "Vintage Pistol",
-- Shotguns
["weapon_assaultshotgun"] = "Assault Shotgun",
["weapon_autoshotgun"] = "Auto Shotgun",
["weapon_bullpupshotgun"] = "Bullpup Shotgun",
["weapon_combatshotgun"] = "Combat Shotgun",
["weapon_dbshotgun"] = "Double Barrel Shotgun",
["weapon_heavyshotgun"] = "Heavy Shotgun",
["weapon_musket"] = "Musket",
["weapon_pumpshotgun"] = "Pump Shotgun",
["weapon_pumpshotgun_mk2"] = "Pump Shotgun MK2",
["weapon_sawnoffshotgun"] = "Sawed Off Shotgun",
-- Shotguns
["weapon_assaultshotgun"] = "Assault Shotgun",
["weapon_autoshotgun"] = "Auto Shotgun",
["weapon_bullpupshotgun"] = "Bullpup Shotgun",
["weapon_combatshotgun"] = "Combat Shotgun",
["weapon_dbshotgun"] = "Double Barrel Shotgun",
["weapon_heavyshotgun"] = "Heavy Shotgun",
["weapon_musket"] = "Musket",
["weapon_pumpshotgun"] = "Pump Shotgun",
["weapon_pumpshotgun_mk2"] = "Pump Shotgun MK2",
["weapon_sawnoffshotgun"] = "Sawed Off Shotgun",
-- SMG & LMG
["weapon_assaultsmg"] = "Assault SMG",
["weapon_combatmg"] = "Combat MG",
["weapon_combatmg_mk2"] = "Combat MG MK2",
["weapon_combatpdw"] = "Combat PDW",
["weapon_gusenberg"] = "Gusenberg Sweeper",
["weapon_machinepistol"] = "Machine Pistol",
["weapon_mg"] = "MG",
["weapon_microsmg"] = "Micro SMG",
["weapon_minismg"] = "Mini SMG",
["weapon_smg"] = "SMG",
["weapon_smg_mk2"] = "SMG MK2",
["weapon_raycarbine"] = "Unholy Hellbringer",
-- SMG & LMG
["weapon_assaultsmg"] = "Assault SMG",
["weapon_combatmg"] = "Combat MG",
["weapon_combatmg_mk2"] = "Combat MG MK2",
["weapon_combatpdw"] = "Combat PDW",
["weapon_gusenberg"] = "Gusenberg Sweeper",
["weapon_machinepistol"] = "Machine Pistol",
["weapon_mg"] = "MG",
["weapon_microsmg"] = "Micro SMG",
["weapon_minismg"] = "Mini SMG",
["weapon_smg"] = "SMG",
["weapon_smg_mk2"] = "SMG MK2",
["weapon_raycarbine"] = "Unholy Hellbringer",
-- Rifles
["weapon_advancedrifle"] = "Advanced Rifle",
["weapon_assaultrifle"] = "Assault Rifle",
["weapon_assaultrifle_mk2"] = "Assault Rifle MK2",
["weapon_bullpuprifle"] = "Bullpup Rifle",
["weapon_bullpuprifle_mk2"] = "Bullpup Rifle MK2",
["weapon_carbinerifle"] = "Carbine Rifle",
["weapon_carbinerifle_mk2"] = "Carbine Rifle MK2",
["weapon_compactrifle"] = "Compact Rifle",
["weapon_militaryrifle"] = "Military Rifle",
["weapon_specialcarbine"] = "Special Carbine",
["weapon_specialcarbine_mk2"] = "Special Carbine MK2",
-- Rifles
["weapon_advancedrifle"] = "Advanced Rifle",
["weapon_assaultrifle"] = "Assault Rifle",
["weapon_assaultrifle_mk2"] = "Assault Rifle MK2",
["weapon_bullpuprifle"] = "Bullpup Rifle",
["weapon_bullpuprifle_mk2"] = "Bullpup Rifle MK2",
["weapon_carbinerifle"] = "Carbine Rifle",
["weapon_carbinerifle_mk2"] = "Carbine Rifle MK2",
["weapon_compactrifle"] = "Compact Rifle",
["weapon_militaryrifle"] = "Military Rifle",
["weapon_specialcarbine"] = "Special Carbine",
["weapon_specialcarbine_mk2"] = "Special Carbine MK2",
-- Sniper
["weapon_heavysniper"] = "Heavy Sniper",
["weapon_heavysniper_mk2"] = "Heavy Sniper MK2",
["weapon_marksmanrifle"] = "Marksman Rifle",
["weapon_marksmanrifle_mk2"] = "Marksman Rifle MK2",
["weapon_sniperrifle"] = "Sniper Rifle",
-- Sniper
["weapon_heavysniper"] = "Heavy Sniper",
["weapon_heavysniper_mk2"] = "Heavy Sniper MK2",
["weapon_marksmanrifle"] = "Marksman Rifle",
["weapon_marksmanrifle_mk2"] = "Marksman Rifle MK2",
["weapon_sniperrifle"] = "Sniper Rifle",
-- Heavy / Launchers
["weapon_compactlauncher"] = "Compact Launcher",
["weapon_firework"] = "Firework Launcher",
["weapon_grenadelauncher"] = "Grenade Launcher",
["weapon_hominglauncher"] = "Homing Launcher",
["weapon_minigun"] = "Minigun",
["weapon_railgun"] = "Railgun",
["weapon_rpg"] = "Rocket Launcher",
["weapon_rayminigun"] = "Widowmaker",
-- Heavy / Launchers
["weapon_compactlauncher"] = "Compact Launcher",
["weapon_firework"] = "Firework Launcher",
["weapon_grenadelauncher"] = "Grenade Launcher",
["weapon_hominglauncher"] = "Homing Launcher",
["weapon_minigun"] = "Minigun",
["weapon_railgun"] = "Railgun",
["weapon_rpg"] = "Rocket Launcher",
["weapon_rayminigun"] = "Widowmaker",
-- Criminal Enterprises DLC
["weapon_metaldetector"] = "Metal Detector",
["weapon_precisionrifle"] = "Precision Rifle",
["weapon_tactilerifle"] = "Service Carbine",
-- Criminal Enterprises DLC
["weapon_metaldetector"] = "Metal Detector",
["weapon_precisionrifle"] = "Precision Rifle",
["weapon_tactilerifle"] = "Service Carbine",
-- Thrown
["weapon_ball"] = "Baseball",
["weapon_bzgas"] = "BZ Gas",
["weapon_flare"] = "Flare",
["weapon_grenade"] = "Grenade",
["weapon_petrolcan"] = "Jerrycan",
["weapon_hazardcan"] = "Hazardous Jerrycan",
["weapon_molotov"] = "Molotov Cocktail",
["weapon_proxmine"] = "Proximity Mine",
["weapon_pipebomb"] = "Pipe Bomb",
["weapon_snowball"] = "Snowball",
["weapon_stickybomb"] = "Sticky Bomb",
["weapon_smokegrenade"] = "Tear Gas",
-- Thrown
["weapon_ball"] = "Baseball",
["weapon_bzgas"] = "BZ Gas",
["weapon_flare"] = "Flare",
["weapon_grenade"] = "Grenade",
["weapon_petrolcan"] = "Jerrycan",
["weapon_hazardcan"] = "Hazardous Jerrycan",
["weapon_molotov"] = "Molotov Cocktail",
["weapon_proxmine"] = "Proximity Mine",
["weapon_pipebomb"] = "Pipe Bomb",
["weapon_snowball"] = "Snowball",
["weapon_stickybomb"] = "Sticky Bomb",
["weapon_smokegrenade"] = "Tear Gas",
-- Special
["weapon_fireextinguisher"] = "Fire Extinguisher",
["weapon_digiscanner"] = "Digital Scanner",
["weapon_garbagebag"] = "Garbage Bag",
["weapon_handcuffs"] = "Handcuffs",
["gadget_nightvision"] = "Night Vision",
["gadget_parachute"] = "parachute",
-- Special
["weapon_fireextinguisher"] = "Fire Extinguisher",
["weapon_digiscanner"] = "Digital Scanner",
["weapon_garbagebag"] = "Garbage Bag",
["weapon_handcuffs"] = "Handcuffs",
["gadget_nightvision"] = "Night Vision",
["gadget_parachute"] = "parachute",
-- Weapon Components
["component_knuckle_base"] = "base Model",
["component_knuckle_pimp"] = "the Pimp",
["component_knuckle_ballas"] = "the Ballas",
["component_knuckle_dollar"] = "the Hustler",
["component_knuckle_diamond"] = "the Rock",
["component_knuckle_hate"] = "the Hater",
["component_knuckle_love"] = "the Lover",
["component_knuckle_player"] = "the Player",
["component_knuckle_king"] = "the King",
["component_knuckle_vagos"] = "the Vagos",
-- Weapon Components
["component_knuckle_base"] = "base Model",
["component_knuckle_pimp"] = "the Pimp",
["component_knuckle_ballas"] = "the Ballas",
["component_knuckle_dollar"] = "the Hustler",
["component_knuckle_diamond"] = "the Rock",
["component_knuckle_hate"] = "the Hater",
["component_knuckle_love"] = "the Lover",
["component_knuckle_player"] = "the Player",
["component_knuckle_king"] = "the King",
["component_knuckle_vagos"] = "the Vagos",
["component_luxary_finish"] = "luxary Weapon Finish",
["component_luxary_finish"] = "luxary Weapon Finish",
["component_handle_default"] = "default Handle",
["component_handle_vip"] = "vIP Handle",
["component_handle_bodyguard"] = "bodyguard Handle",
["component_handle_default"] = "default Handle",
["component_handle_vip"] = "vIP Handle",
["component_handle_bodyguard"] = "bodyguard Handle",
["component_vip_finish"] = "vIP Finish",
["component_bodyguard_finish"] = "bodyguard Finish",
["component_vip_finish"] = "vIP Finish",
["component_bodyguard_finish"] = "bodyguard Finish",
["component_camo_finish"] = "digital Camo",
["component_camo_finish2"] = "brushstroke Camo",
["component_camo_finish3"] = "woodland Camo",
["component_camo_finish4"] = "skull Camo",
["component_camo_finish5"] = "sessanta Nove Camo",
["component_camo_finish6"] = "perseus Camo",
["component_camo_finish7"] = "leopard Camo",
["component_camo_finish8"] = "zebra Camo",
["component_camo_finish9"] = "geometric Camo",
["component_camo_finish10"] = "boom Camo",
["component_camo_finish11"] = "patriotic Camo",
["component_camo_finish"] = "digital Camo",
["component_camo_finish2"] = "brushstroke Camo",
["component_camo_finish3"] = "woodland Camo",
["component_camo_finish4"] = "skull Camo",
["component_camo_finish5"] = "sessanta Nove Camo",
["component_camo_finish6"] = "perseus Camo",
["component_camo_finish7"] = "leopard Camo",
["component_camo_finish8"] = "zebra Camo",
["component_camo_finish9"] = "geometric Camo",
["component_camo_finish10"] = "boom Camo",
["component_camo_finish11"] = "patriotic Camo",
["component_camo_slide_finish"] = "digital Slide Camo",
["component_camo_slide_finish2"] = "brushstroke Slide Camo",
["component_camo_slide_finish3"] = "woodland Slide Camo",
["component_camo_slide_finish4"] = "skull Slide Camo",
["component_camo_slide_finish5"] = "sessanta Nove Slide Camo",
["component_camo_slide_finish6"] = "perseus Slide Camo",
["component_camo_slide_finish7"] = "leopard Slide Camo",
["component_camo_slide_finish8"] = "zebra Slide Camo",
["component_camo_slide_finish9"] = "geometric Slide Camo",
["component_camo_slide_finish10"] = "boom Slide Camo",
["component_camo_slide_finish11"] = "patriotic Slide Camo",
["component_camo_slide_finish"] = "digital Slide Camo",
["component_camo_slide_finish2"] = "brushstroke Slide Camo",
["component_camo_slide_finish3"] = "woodland Slide Camo",
["component_camo_slide_finish4"] = "skull Slide Camo",
["component_camo_slide_finish5"] = "sessanta Nove Slide Camo",
["component_camo_slide_finish6"] = "perseus Slide Camo",
["component_camo_slide_finish7"] = "leopard Slide Camo",
["component_camo_slide_finish8"] = "zebra Slide Camo",
["component_camo_slide_finish9"] = "geometric Slide Camo",
["component_camo_slide_finish10"] = "boom Slide Camo",
["component_camo_slide_finish11"] = "patriotic Slide Camo",
["component_clip_default"] = "default Magazine",
["component_clip_extended"] = "extended Magazine",
["component_clip_drum"] = "drum Magazine",
["component_clip_box"] = "box Magazine",
["component_clip_default"] = "default Magazine",
["component_clip_extended"] = "extended Magazine",
["component_clip_drum"] = "drum Magazine",
["component_clip_box"] = "box Magazine",
["component_scope_holo"] = "holographic Scope",
["component_scope_small"] = "small Scope",
["component_scope_medium"] = "medium Scope",
["component_scope_large"] = "large Scope",
["component_scope"] = "mounted Scope",
["component_scope_advanced"] = "advanced Scope",
["component_ironsights"] = "ironsights",
["component_scope_holo"] = "holographic Scope",
["component_scope_small"] = "small Scope",
["component_scope_medium"] = "medium Scope",
["component_scope_large"] = "large Scope",
["component_scope"] = "mounted Scope",
["component_scope_advanced"] = "advanced Scope",
["component_ironsights"] = "ironsights",
["component_suppressor"] = "suppressor",
["component_compensator"] = "compensator",
["component_suppressor"] = "suppressor",
["component_compensator"] = "compensator",
["component_muzzle_flat"] = "flat Muzzle Brake",
["component_muzzle_tactical"] = "tactical Muzzle Brake",
["component_muzzle_fat"] = "fat-End Muzzle Brake",
["component_muzzle_precision"] = "precision Muzzle Brake",
["component_muzzle_heavy"] = "heavy Duty Muzzle Brake",
["component_muzzle_slanted"] = "slanted Muzzle Brake",
["component_muzzle_split"] = "split-End Muzzle Brake",
["component_muzzle_squared"] = "squared Muzzle Brake",
["component_muzzle_flat"] = "flat Muzzle Brake",
["component_muzzle_tactical"] = "tactical Muzzle Brake",
["component_muzzle_fat"] = "fat-End Muzzle Brake",
["component_muzzle_precision"] = "precision Muzzle Brake",
["component_muzzle_heavy"] = "heavy Duty Muzzle Brake",
["component_muzzle_slanted"] = "slanted Muzzle Brake",
["component_muzzle_split"] = "split-End Muzzle Brake",
["component_muzzle_squared"] = "squared Muzzle Brake",
["component_flashlight"] = "flashlight",
["component_grip"] = "grip",
["component_flashlight"] = "flashlight",
["component_grip"] = "grip",
["component_barrel_default"] = "default Barrel",
["component_barrel_heavy"] = "heavy Barrel",
["component_barrel_default"] = "default Barrel",
["component_barrel_heavy"] = "heavy Barrel",
["component_ammo_tracer"] = "tracer Ammo",
["component_ammo_incendiary"] = "incendiary Ammo",
["component_ammo_hollowpoint"] = "hollowpoint Ammo",
["component_ammo_fmj"] = "fMJ Ammo",
["component_ammo_armor"] = "armor Piercing Ammo",
["component_ammo_explosive"] = "armor Piercing Incendiary Ammo",
["component_ammo_tracer"] = "tracer Ammo",
["component_ammo_incendiary"] = "incendiary Ammo",
["component_ammo_hollowpoint"] = "hollowpoint Ammo",
["component_ammo_fmj"] = "fMJ Ammo",
["component_ammo_armor"] = "armor Piercing Ammo",
["component_ammo_explosive"] = "armor Piercing Incendiary Ammo",
["component_shells_default"] = "default Shells",
["component_shells_incendiary"] = "dragons Breath Shells",
["component_shells_armor"] = "steel Buckshot Shells",
["component_shells_hollowpoint"] = "flechette Shells",
["component_shells_explosive"] = "explosive Slug Shells",
["component_shells_default"] = "default Shells",
["component_shells_incendiary"] = "dragons Breath Shells",
["component_shells_armor"] = "steel Buckshot Shells",
["component_shells_hollowpoint"] = "flechette Shells",
["component_shells_explosive"] = "explosive Slug Shells",
-- Weapon Ammo
["ammo_rounds"] = "round(s)",
["ammo_shells"] = "shell(s)",
["ammo_charge"] = "charge",
["ammo_petrol"] = "gallons of fuel",
["ammo_firework"] = "firework(s)",
["ammo_rockets"] = "rocket(s)",
["ammo_grenadelauncher"] = "grenade(s)",
["ammo_grenade"] = "grenade(s)",
["ammo_stickybomb"] = "bomb(s)",
["ammo_pipebomb"] = "bomb(s)",
["ammo_smokebomb"] = "bomb(s)",
["ammo_molotov"] = "cocktail(s)",
["ammo_proxmine"] = "mine(s)",
["ammo_bzgas"] = "can(s)",
["ammo_ball"] = "ball(s)",
["ammo_snowball"] = "snowball(s)",
["ammo_flare"] = "flare(s)",
["ammo_flaregun"] = "flare(s)",
-- Weapon Ammo
["ammo_rounds"] = "round(s)",
["ammo_shells"] = "shell(s)",
["ammo_charge"] = "charge",
["ammo_petrol"] = "gallons of fuel",
["ammo_firework"] = "firework(s)",
["ammo_rockets"] = "rocket(s)",
["ammo_grenadelauncher"] = "grenade(s)",
["ammo_grenade"] = "grenade(s)",
["ammo_stickybomb"] = "bomb(s)",
["ammo_pipebomb"] = "bomb(s)",
["ammo_smokebomb"] = "bomb(s)",
["ammo_molotov"] = "cocktail(s)",
["ammo_proxmine"] = "mine(s)",
["ammo_bzgas"] = "can(s)",
["ammo_ball"] = "ball(s)",
["ammo_snowball"] = "snowball(s)",
["ammo_flare"] = "flare(s)",
["ammo_flaregun"] = "flare(s)",
-- Weapon Tints
["tint_default"] = "default skin",
["tint_green"] = "green skin",
["tint_gold"] = "gold skin",
["tint_pink"] = "pink skin",
["tint_army"] = "army skin",
["tint_lspd"] = "blue skin",
["tint_orange"] = "orange skin",
["tint_platinum"] = "platinum skin",
}
-- Weapon Tints
["tint_default"] = "default skin",
["tint_green"] = "green skin",
["tint_gold"] = "gold skin",
["tint_pink"] = "pink skin",
["tint_army"] = "army skin",
["tint_lspd"] = "blue skin",
["tint_orange"] = "orange skin",
["tint_platinum"] = "platinum skin",
}
+6
View File
@@ -115,6 +115,12 @@ Locales["es"] = {
-- Weapons
-- Drug Wars DLC
['weapon_candycane'] = 'Candy Cane', -- not translated
['weapon_acidpackage'] = 'Acid Package', -- not translated
['weapon_pistolxm3'] = 'WM 29 Pistol', -- not translated
['weapon_railgunxm3'] = 'Railgun', -- not translated
-- Melee
["weapon_dagger"] = "Daga",
["weapon_bat"] = "Bate",
+6
View File
@@ -108,6 +108,12 @@ Locales["fi"] = {
["locale_digit_grouping_symbol"] = "",
["locale_currency"] = "$%s",
-- Drug Wars DLC
['weapon_candycane'] = 'Candy Cane', -- not translated
['weapon_acidpackage'] = 'Acid Package', -- not translated
['weapon_pistolxm3'] = 'WM 29 Pistol', -- not translated
['weapon_railgunxm3'] = 'Railgun', -- not translated
-- Weapons
["weapon_knife"] = "Veitsi",
["weapon_nightstick"] = "Pamppu",
+6
View File
@@ -196,6 +196,12 @@ Locales["fr"] = {
["component_grip"] = "poignée",
["component_luxary_finish"] = "finition de luxe",
-- Drug Wars DLC
['weapon_candycane'] = 'Candy Cane', -- not translated
['weapon_acidpackage'] = 'Acid Package', -- not translated
['weapon_pistolxm3'] = 'WM 29 Pistol', -- not translated
['weapon_railgunxm3'] = 'Railgun', -- not translated
-- Weapon Ammo
["ammo_rounds"] = "cartouche(s)",
["ammo_shells"] = "obus",
+6
View File
@@ -222,6 +222,12 @@ Locales["hu"] = {
["weapon_precisionrifle"] = "Precision Rifle",
["weapon_tactilerifle"] = "Service Carbine",
-- Drug Wars DLC
['weapon_candycane'] = 'Candy Cane', -- not translated
['weapon_acidpackage'] = 'Acid Package', -- not translated
['weapon_pistolxm3'] = 'WM 29 Pistol', -- not translated
['weapon_railgunxm3'] = 'Railgun', -- not translated
-- Thrown
["weapon_ball"] = "Baseball",
["weapon_bzgas"] = "BZ Gas",
+6
View File
@@ -222,6 +222,12 @@ Locales["it"] = {
["weapon_precisionrifle"] = "Fucile di precisione",
["weapon_tactilerifle"] = "Carabina di servizio",
-- Drug Wars DLC
['weapon_candycane'] = 'Candy Cane', -- not translated
['weapon_acidpackage'] = 'Acid Package', -- not translated
['weapon_pistolxm3'] = 'WM 29 Pistol', -- not translated
['weapon_railgunxm3'] = 'Railgun', -- not translated
-- Thrown
["weapon_ball"] = "Palla",
["weapon_bzgas"] = "BZ Gas",
+6
View File
@@ -221,6 +221,12 @@ Locales["nl"] = {
["weapon_metaldetector"] = "Metaal Detector",
["weapon_precisionrifle"] = "Precisiegeweer",
["weapon_tactilerifle"] = "Service Carbine",
-- Drug Wars DLC
["weapon_candycane"] = "Candy Cane", -- not translated
["weapon_acidpackage"] = "Acid Package", -- not translated
["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated
["weapon_railgunxm3"] = "Railgun", -- not translated
-- Thrown
["weapon_ball"] = "Honkbal",
+6
View File
@@ -195,6 +195,12 @@ Locales["pl"] = {
["component_grip"] = "uchwyt",
["component_luxary_finish"] = "luksusowe wykończenie broni",
-- Drug Wars DLC
['weapon_candycane'] = 'Candy Cane', -- not translated
['weapon_acidpackage'] = 'Acid Package', -- not translated
['weapon_pistolxm3'] = 'WM 29 Pistol', -- not translated
['weapon_railgunxm3'] = 'Railgun', -- not translated
-- Weapon Ammo
["ammo_rounds"] = "nabój/oi",
["ammo_shells"] = "pocisk(ów)",
+6
View File
@@ -221,6 +221,12 @@ Locales["sl"] = {
["weapon_metaldetector"] = "Metal Detector",
["weapon_precisionrifle"] = "Precision Rifle",
["weapon_tactilerifle"] = "Service Carbine",
-- Drug Wars DLC
["weapon_candycane"] = "Candy Cane", -- not translated
["weapon_acidpackage"] = "Acid Package", -- not translated
["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated
["weapon_railgunxm3"] = "Railgun", -- not translated
-- Thrown
["weapon_ball"] = "Baseball",
+6
View File
@@ -222,6 +222,12 @@ Locales["sr"] = {
["weapon_precisionrifle"] = "Precision Rifle",
["weapon_tactilerifle"] = "Service Carbine",
-- Drug Wars DLC
['weapon_candycane'] = 'Candy Cane', -- not translated
['weapon_acidpackage'] = 'Acid Package', -- not translated
['weapon_pistolxm3'] = 'WM 29 Pistol', -- not translated
['weapon_railgunxm3'] = 'Railgun', -- not translated
-- Thrown
["weapon_ball"] = "Baseball",
["weapon_bzgas"] = "BZ Gas",
+6
View File
@@ -222,6 +222,12 @@ Locales["zh-cn"] = {
["weapon_precisionrifle"] = "精确步枪",
["weapon_tactilerifle"] = "制式卡宾步枪",
-- Drug Wars DLC
['weapon_candycane'] = 'Candy Cane', -- not translated
['weapon_acidpackage'] = 'Acid Package', -- not translated
['weapon_pistolxm3'] = 'WM 29 Pistol', -- not translated
['weapon_railgunxm3'] = 'Railgun', -- not translated
-- Thrown
["weapon_ball"] = "棒球",
["weapon_bzgas"] = "毒气弹",
@@ -36,7 +36,7 @@ Core.PlayerFunctionOverrides.OxInventory = {
end
end,
getLoadout = function(self)
getLoadout = function(_)
return function()
return {}
end
@@ -144,49 +144,49 @@ Core.PlayerFunctionOverrides.OxInventory = {
end
end,
addWeapon = function(self)
addWeapon = function(_)
return function() end
end,
addWeaponComponent = function(self)
addWeaponComponent = function(_)
return function() end
end,
addWeaponAmmo = function(self)
addWeaponAmmo = function(_)
return function() end
end,
updateWeaponAmmo = function(self)
updateWeaponAmmo = function(_)
return function() end
end,
setWeaponTint = function(self)
setWeaponTint = function(_)
return function() end
end,
getWeaponTint = function(self)
getWeaponTint = function(_)
return function() end
end,
removeWeapon = function(self)
removeWeapon = function(_)
return function() end
end,
removeWeaponComponent = function(self)
removeWeaponComponent = function(_)
return function() end
end,
removeWeaponAmmo = function(self)
removeWeaponAmmo = function(_)
return function() end
end,
hasWeaponComponent = function(self)
hasWeaponComponent = function(_)
return function()
return false
end
end,
hasWeapon = function(self)
hasWeapon = function(_)
return function()
return false
end
@@ -198,7 +198,7 @@ Core.PlayerFunctionOverrides.OxInventory = {
end
end,
getWeapon = function(self)
getWeapon = function(_)
return function() end
end,
+223 -57
View File
@@ -1,5 +1,14 @@
ESX.RegisterCommand('setcoords', 'admin', function(xPlayer, args, showError)
ESX.RegisterCommand('setcoords', 'admin', function(xPlayer, args, _)
xPlayer.setCoords({x = args.x, y = args.y, z = args.z})
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Set Coordinates /setcoords Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "X Coord", value = args.x, inline = true},
{name = "Y Coord", value = args.y, inline = true},
{name = "Z Coord", value = args.z, inline = true},
})
end
end, false, {help = TranslateCap('command_setcoords'), validate = true, arguments = {
{name = 'x', help = TranslateCap('command_setcoords_x'), type = 'number'},
{name = 'y', help = TranslateCap('command_setcoords_y'), type = 'number'},
@@ -7,18 +16,20 @@ end, false, {help = TranslateCap('command_setcoords'), validate = true, argument
}})
ESX.RegisterCommand('setjob', 'admin', function(xPlayer, args, showError)
if ESX.DoesJobExist(args.job, args.grade) then
args.playerId.setJob(args.job, args.grade)
else
showError(TranslateCap('command_setjob_invalid'))
if not ESX.DoesJobExist(args.job, args.grade) then
return showError(TranslateCap('command_setjob_invalid'))
end
args.playerId.setJob(args.job, args.grade)
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Set Job /setjob Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
{name = "Job", value = args.playerId, inline = true},
{name = "Grade", value = args.playerId, inline = true},
})
end
ESX.DiscordLogFields("UserActions", "/setjob Triggered", "pink", {
{name = "Executor", value = xPlayer and xPlayer.name or 'Console', inline = true},
{name = "Target", value = args.playerId.name, inline = true},
{name = "Job", value = args.job, inline = true},
{name = "Grade", value = args.grade, inline = true}
})
end, true, {help = TranslateCap('command_setjob'), validate = true, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'},
{name = 'job', help = TranslateCap('command_setjob_job'), type = 'string'},
@@ -38,7 +49,7 @@ local upgrades = Config.SpawnVehMaxUpgrades and
ESX.RegisterCommand('car', 'admin', function(xPlayer, args, showError)
if not xPlayer then
return print('[^1ERROR^7] The xPlayer value is nil')
return showError('[^1ERROR^7] The xPlayer value is nil')
end
local playerPed = GetPlayerPed(xPlayer.source)
@@ -54,11 +65,13 @@ ESX.RegisterCommand('car', 'admin', function(xPlayer, args, showError)
DeleteEntity(playerVehicle)
end
ESX.DiscordLogFields("UserActions", "/car Triggered", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Vehicle", value = args.car, inline = true}
})
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Spawn Car /car Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Vehicle", value = args.car, inline = true}
})
end
ESX.OneSync.SpawnVehicle(args.car, playerCoords, playerHeading, upgrades, function(networkId)
if networkId then
@@ -72,7 +85,7 @@ ESX.RegisterCommand('car', 'admin', function(xPlayer, args, showError)
end
end
if GetVehiclePedIsIn(playerPed, false) ~= vehicle then
print('[^1ERROR^7] The player could not be seated in the vehicle')
showError('[^1ERROR^7] The player could not be seated in the vehicle')
end
end
end)
@@ -80,27 +93,41 @@ end, false, {help = TranslateCap('command_car'), validate = false, arguments = {
{name = 'car',validate = false, help = TranslateCap('command_car_car'), type = 'string'}
}})
ESX.RegisterCommand({'cardel', 'dv'}, 'admin', function(xPlayer, args, showError)
ESX.RegisterCommand({'cardel', 'dv'}, 'admin', function(xPlayer, args, _)
local PedVehicle = GetVehiclePedIsIn(GetPlayerPed(xPlayer.source), false)
if DoesEntityExist(PedVehicle) then
DeleteEntity(PedVehicle)
end
local Vehicles = ESX.OneSync.GetVehiclesInArea(GetEntityCoords(GetPlayerPed(xPlayer.source)), tonumber(args.radius) or 5.0)
for i = 1, #Vehicles do
for i = 1, #Vehicles do
local Vehicle = NetworkGetEntityFromNetworkId(Vehicles[i])
if DoesEntityExist(Vehicle) then
DeleteEntity(Vehicle)
end
end
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Delete Vehicle /dv Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
})
end
end, false, {help = TranslateCap('command_cardel'), validate = false, arguments = {
{name = 'radius',validate = false, help = TranslateCap('command_cardel_radius'), type = 'number'}
}})
ESX.RegisterCommand('setaccountmoney', 'admin', function(xPlayer, args, showError)
if args.playerId.getAccount(args.account) then
args.playerId.setAccountMoney(args.account, args.amount, "Government Grant")
else
showError(TranslateCap('command_giveaccountmoney_invalid'))
if not args.playerId.getAccount(args.account) then
return showError(TranslateCap('command_giveaccountmoney_invalid'))
end
args.playerId.setAccountMoney(args.account, args.amount, "Government Grant")
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Set Account Money /setaccountmoney Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
{name = "Account", value = args.account, inline = true},
{name = "Amount", value = args.amount, inline = true},
})
end
end, true, {help = TranslateCap('command_setaccountmoney'), validate = true, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'},
@@ -109,10 +136,18 @@ end, true, {help = TranslateCap('command_setaccountmoney'), validate = true, arg
}})
ESX.RegisterCommand('giveaccountmoney', 'admin', function(xPlayer, args, showError)
if args.playerId.getAccount(args.account) then
args.playerId.addAccountMoney(args.account, args.amount, "Government Grant")
else
showError(TranslateCap('command_giveaccountmoney_invalid'))
if not args.playerId.getAccount(args.account) then
return showError(TranslateCap('command_giveaccountmoney_invalid'))
end
args.playerId.addAccountMoney(args.account, args.amount, "Government Grant")
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Give Account Money /giveaccountmoney Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
{name = "Account", value = args.account, inline = true},
{name = "Amount", value = args.amount, inline = true},
})
end
end, true, {help = TranslateCap('command_giveaccountmoney'), validate = true, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'},
@@ -120,9 +155,38 @@ end, true, {help = TranslateCap('command_giveaccountmoney'), validate = true, ar
{name = 'amount', help = TranslateCap('command_giveaccountmoney_amount'), type = 'number'}
}})
ESX.RegisterCommand('removeaccountmoney', 'admin', function(xPlayer, args, showError)
if not args.playerId.getAccount(args.account) then
return showError(TranslateCap('command_removeaccountmoney_invalid'))
end
args.playerId.removeAccountMoney(args.account, args.amount, "Government Tax")
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Remove Account Money /removeaccountmoney Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
{name = "Account", value = args.account, inline = true},
{name = "Amount", value = args.amount, inline = true},
})
end
end, true, {help = TranslateCap('command_removeaccountmoney'), validate = true, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'},
{name = 'account', help = TranslateCap('command_removeaccountmoney_account'), type = 'string'},
{name = 'amount', help = TranslateCap('command_removeaccountmoney_amount'), type = 'number'}
}})
if not Config.OxInventory then
ESX.RegisterCommand('giveitem', 'admin', function(xPlayer, args, showError)
ESX.RegisterCommand('giveitem', 'admin', function(xPlayer, args, _)
args.playerId.addInventoryItem(args.item, args.count)
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Give Item /giveitem Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
{name = "Item", value = args.item, inline = true},
{name = "Quantity", value = args.count, inline = true},
})
end
end, true, {help = TranslateCap('command_giveitem'), validate = true, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'},
{name = 'item', help = TranslateCap('command_giveitem_item'), type = 'item'},
@@ -131,9 +195,17 @@ if not Config.OxInventory then
ESX.RegisterCommand('giveweapon', 'admin', function(xPlayer, args, showError)
if args.playerId.hasWeapon(args.weapon) then
showError(TranslateCap('command_giveweapon_hasalready'))
else
args.playerId.addWeapon(args.weapon, args.ammo)
return showError(TranslateCap('command_giveweapon_hasalready'))
end
args.playerId.addWeapon(args.weapon, args.ammo)
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Give Weapon /giveweapon Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
{name = "Weapon", value = args.weapon, inline = true},
{name = "Ammo", value = args.ammo, inline = true},
})
end
end, true, {help = TranslateCap('command_giveweapon'), validate = true, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'},
@@ -142,10 +214,18 @@ if not Config.OxInventory then
}})
ESX.RegisterCommand('giveammo', 'admin', function(xPlayer, args, showError)
if args.playerId.hasWeapon(args.weapon) then
args.playerId.addWeaponAmmo(args.weapon, args.ammo)
else
showError(TranslateCap("command_giveammo_noweapon_found"))
if not args.playerId.hasWeapon(args.weapon) then
return showError(TranslateCap("command_giveammo_noweapon_found"))
end
args.playerId.addWeaponAmmo(args.weapon, args.ammo)
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Give Ammunition /giveammo Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
{name = "Weapon", value = args.weapon, inline = true},
{name = "Ammo", value = args.ammo, inline = true},
})
end
end, true, {help = TranslateCap('command_giveweapon'), validate = false, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'},
@@ -162,6 +242,15 @@ if not Config.OxInventory then
showError(TranslateCap('command_giveweaponcomponent_hasalready'))
else
args.playerId.addWeaponComponent(args.weaponName, args.componentName)
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Give Weapon Component /giveweaponcomponent Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
{name = "Weapon", value = args.weaponName, inline = true},
{name = "Component", value = args.componentName, inline = true},
})
end
end
else
showError(TranslateCap('command_giveweaponcomponent_invalid'))
@@ -176,75 +265,103 @@ if not Config.OxInventory then
}})
end
ESX.RegisterCommand({'clear', 'cls'}, 'user', function(xPlayer, args, showError)
ESX.RegisterCommand({'clear', 'cls'}, 'user', function(xPlayer, _, _)
xPlayer.triggerEvent('chat:clear')
end, false, {help = TranslateCap('command_clear')})
ESX.RegisterCommand({'clearall', 'clsall'}, 'admin', function(xPlayer, args, showError)
ESX.RegisterCommand({'clearall', 'clsall'}, 'admin', function(xPlayer, _, _)
TriggerClientEvent('chat:clear', -1)
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Clear Chat /clearall Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
})
end
end, true, {help = TranslateCap('command_clearall')})
ESX.RegisterCommand("refreshjobs", 'admin', function(xPlayer, args, showError)
ESX.RegisterCommand("refreshjobs", 'admin', function(xPlayer, _, _)
ESX.RefreshJobs()
end, true, {help = TranslateCap('command_clearall')})
if not Config.OxInventory then
ESX.RegisterCommand('clearinventory', 'admin', function(xPlayer, args, showError)
ESX.RegisterCommand('clearinventory', 'admin', function(xPlayer, args, _)
for k, v in ipairs(args.playerId.inventory) do
if v.count > 0 then
args.playerId.setInventoryItem(v.name, 0)
end
end
TriggerEvent('esx:playerInventoryCleared',args.playerId)
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Clear Inventory /clearinventory Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
})
end
end, true, {help = TranslateCap('command_clearinventory'), validate = true, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'}
}})
ESX.RegisterCommand('clearloadout', 'admin', function(xPlayer, args, showError)
ESX.RegisterCommand('clearloadout', 'admin', function(xPlayer, args, _)
for i=#args.playerId.loadout, 1, -1 do
args.playerId.removeWeapon(args.playerId.loadout[i].name)
end
TriggerEvent('esx:playerLoadoutCleared',args.playerId)
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "/clearloadout Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
})
end
end, true, {help = TranslateCap('command_clearloadout'), validate = true, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'}
}})
end
ESX.RegisterCommand('setgroup', 'admin', function(xPlayer, args, showError)
ESX.RegisterCommand('setgroup', 'admin', function(xPlayer, args, _)
if not args.playerId then args.playerId = xPlayer.source end
if args.group == "superadmin" then args.group = "admin" print("[^3WARNING^7] ^5Superadmin^7 detected, setting group to ^5admin^7") end
args.playerId.setGroup(args.group)
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "/setgroup Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
{name = "Group", value = args.group, inline = true},
})
end
end, true, {help = TranslateCap('command_setgroup'), validate = true, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'},
{name = 'group', help = TranslateCap('command_setgroup_group'), type = 'string'},
}})
ESX.RegisterCommand('save', 'admin', function(xPlayer, args, showError)
ESX.RegisterCommand('save', 'admin', function(xPlayer, args, _)
Core.SavePlayer(args.playerId)
print("[^2Info^0] Saved Player - ^5".. args.playerId.source .. "^0")
end, true, {help = TranslateCap('command_save'), validate = true, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'}
}})
ESX.RegisterCommand('saveall', 'admin', function(xPlayer, args, showError)
ESX.RegisterCommand('saveall', 'admin', function(xPlayer, args, _)
Core.SavePlayers()
end, true, {help = TranslateCap('command_saveall')})
ESX.RegisterCommand('group', {"user", "admin"}, function(xPlayer, args, showError)
ESX.RegisterCommand('group', {"user", "admin"}, function(xPlayer, _, _)
print(xPlayer.getName()..", You are currently: ^5".. xPlayer.getGroup() .. "^0")
end, true)
ESX.RegisterCommand('job', {"user", "admin"}, function(xPlayer, args, showError)
ESX.RegisterCommand('job', {"user", "admin"}, function(xPlayer, _, _)
print(xPlayer.getName()..", You are currently: ^5".. xPlayer.getJob().name.. "^0 - ^5".. xPlayer.getJob().grade_label .. "^0")
end, true)
ESX.RegisterCommand('info', {"user", "admin"}, function(xPlayer, args, showError)
ESX.RegisterCommand('info', {"user", "admin"}, function(xPlayer, _, _)
local job = xPlayer.getJob().name
local jobgrade = xPlayer.getJob().grade_name
print("^2ID : ^5"..xPlayer.source.." ^0| ^2Name:^5"..xPlayer.getName().." ^0 | ^2Group:^5"..xPlayer.getGroup().."^0 | ^2Job:^5".. job.."^0")
end, true)
ESX.RegisterCommand('coords', "admin", function(xPlayer, args, showError)
ESX.RegisterCommand('coords', "admin", function(xPlayer, _, _)
local ped = GetPlayerPed(xPlayer.source)
local coords = GetEntityCoords(ped, false)
local heading = GetEntityHeading(ped)
@@ -252,47 +369,96 @@ ESX.RegisterCommand('coords', "admin", function(xPlayer, args, showError)
print("Coords - Vector4: ^5".. vector4(coords.x, coords.y, coords.z, heading) .. "^0")
end, true)
ESX.RegisterCommand('tpm', "admin", function(xPlayer, args, showError)
ESX.RegisterCommand('tpm', "admin", function(xPlayer, _, _)
xPlayer.triggerEvent("esx:tpm")
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Admin Teleport /tpm Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
})
end
end, true)
ESX.RegisterCommand('goto', "admin", function(xPlayer, args, showError)
ESX.RegisterCommand('goto', "admin", function(xPlayer, args, _)
local targetCoords = args.playerId.getCoords()
xPlayer.setCoords(targetCoords)
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Admin Teleport /goto Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
{name = "Target Coords", value = targetCoords, inline = true},
})
end
end, true, {help = TranslateCap('command_goto'), validate = true, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'}
}})
ESX.RegisterCommand('bring', "admin", function(xPlayer, args, showError)
ESX.RegisterCommand('bring', "admin", function(xPlayer, args, _)
local playerCoords = xPlayer.getCoords()
args.playerId.setCoords(playerCoords)
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Admin Teleport /bring Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
{name = "Target Coords", value = targetCoords, inline = true},
})
end
end, true, {help = TranslateCap('command_bring'), validate = true, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'}
}})
ESX.RegisterCommand('kill', "admin", function(xPlayer, args, showError)
ESX.RegisterCommand('kill', "admin", function(xPlayer, args, _)
args.playerId.triggerEvent("esx:killPlayer")
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Kill Command /kill Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
})
end
end, true, {help = TranslateCap('command_kill'), validate = true, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'}
}})
ESX.RegisterCommand('freeze', "admin", function(xPlayer, args, showError)
ESX.RegisterCommand('freeze', "admin", function(xPlayer, args, _)
args.playerId.triggerEvent('esx:freezePlayer', "freeze")
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Admin Freeze /freeze Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
})
end
end, true, {help = TranslateCap('command_freeze'), validate = true, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'}
}})
ESX.RegisterCommand('unfreeze', "admin", function(xPlayer, args, showError)
ESX.RegisterCommand('unfreeze', "admin", function(xPlayer, args, _)
args.playerId.triggerEvent('esx:freezePlayer', "unfreeze")
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Admin UnFreeze /unfreeze Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Target", value = args.playerId.name, inline = true},
})
end
end, true, {help = TranslateCap('command_unfreeze'), validate = true, arguments = {
{name = 'playerId', help = TranslateCap('commandgeneric_playerid'), type = 'player'}
}})
ESX.RegisterCommand("noclip", 'admin', function(xPlayer, args, showError)
ESX.RegisterCommand("noclip", 'admin', function(xPlayer, _, _)
xPlayer.triggerEvent('esx:noclip')
if Config.AdminLogging then
ESX.DiscordLogFields("UserActions", "Admin NoClip /noclip Triggered!", "pink", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
})
end
end, false)
ESX.RegisterCommand('players', "admin", function(xPlayer, args, showError)
ESX.RegisterCommand('players', "admin", function(xPlayer, _, _)
local xPlayers = ESX.GetExtendedPlayers() -- Returns all xPlayers
print("^5"..#xPlayers.." ^2online player(s)^0")
for i = 1, #(xPlayers) do
+1 -1
View File
@@ -454,7 +454,7 @@ function Core.IsPlayerAdmin(playerId)
local xPlayer = ESX.Players[playerId]
if xPlayer then
if xPlayer.group == 'admin' then
if Config.AdminGroups[xPlayer.group] then
return true
end
end
+1 -1
View File
@@ -251,7 +251,7 @@ function loadESXPlayer(identifier, playerId, isNew)
end
-- Position
userData.coords = json.decode(result.position) or Config.DefaultSpawn
userData.coords = json.decode(result.position) or Config.DefaultSpawns[math.random(#Config.DefaultSpawns)]
-- Skin
if result.skin and result.skin ~= '' then
+10 -43
View File
@@ -21,54 +21,21 @@ RegisterNetEvent('esx:triggerServerCallback', function(eventName, requestId, inv
end, ...)
end)
ESX.TriggerClientCallback = setmetatable({
---@param player number?
---@param eventName string
---@param ... any
Await = function(player, eventName, ...)
player = tonumber(player)
---@param player number playerId
---@param eventName string
---@param callback function
---@param ... any
ESX.TriggerClientCallback = function(player, eventName, callback, ...)
clientRequests[RequestId] = callback
assert(player, 'Argument 1 `player` is not a number!')
assert(type(eventName) == 'string', 'Argument 2 `eventName` is not a string!')
TriggerClientEvent('esx:triggerClientCallback', player, eventName, RequestId, GetInvokingResource() or "unknown", ...)
local p = promise.new()
clientRequests[RequestId] = p
TriggerClientEvent('esx:triggerClientCallback', player, eventName, RequestId, GetInvokingResource() or "unknown", ...)
RequestId = RequestId + 1
return Citizen.Await(p)
end
}, {
---@param player number? playerId
---@param eventName string
---@param callback function
---@param ... any
__call = function(_, player, eventName, callback, ...)
player = tonumber(player)
assert(player, 'Argument 1 `player` is not a number!')
assert(type(eventName) == 'string', 'Argument 2 `eventName` is not a string!')
assert(type(callback) == 'function', 'Argument 3 `callback` is not a function!')
clientRequests[RequestId] = callback
TriggerClientEvent('esx:triggerClientCallback', player, eventName, RequestId, GetInvokingResource() or "unknown", ...)
RequestId = RequestId + 1
end
})
RequestId = RequestId + 1
end
RegisterNetEvent('esx:clientCallback', function(requestId, invoker, ...)
if not clientRequests[requestId] then
return print(('[^1ERROR^7] Client Callback with requestId ^5%s^7 Was Called by ^5%s^7 but does not exist.'):format(requestId, invoker))
end
if type(clientRequests[requestId]) == 'table' then
clientRequests[requestId]:resolve(...)
return
return print(('[^1ERROR^7] Client Callback with requestId ^5%s^7 Was Called by ^5%s^7 but does not exist.'):format(requestId, invoker))
end
clientRequests[requestId](...)
+65 -37
View File
@@ -2,43 +2,71 @@ function StartPayCheck()
CreateThread(function()
while true do
Wait(Config.PaycheckInterval)
for player, xPlayer in pairs(ESX.Players) do
local jobLabel = xPlayer.job.label
local job = xPlayer.job.grade_name
local salary = xPlayer.job.grade_salary
for player, xPlayer in pairs(ESX.Players) do
local job = xPlayer.job.grade_name
local salary = xPlayer.job.grade_salary
if salary > 0 then
if job == 'unemployed' then -- unemployed
xPlayer.addAccountMoney('bank', salary, "Welfare Check")
TriggerClientEvent('esx:showAdvancedNotification', player, TranslateCap('bank'), TranslateCap('received_paycheck'), TranslateCap('received_help', salary),
'CHAR_BANK_MAZE', 9)
if Config.LogPaycheck then
ESX.DiscordLogFields("Paycheck", "Paycheck - Unemployment Benefits", "green", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Amount", value = salary, inline = true}
})
end
elseif Config.EnableSocietyPayouts then -- possibly a society
TriggerEvent('esx_society:getSociety', xPlayer.job.name, function(society)
if society ~= nil then -- verified society
TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account)
if account.money >= salary then -- does the society money to pay its employees?
xPlayer.addAccountMoney('bank', salary, "Paycheck")
account.removeMoney(salary)
if Config.LogPaycheck then
ESX.DiscordLogFields("Paycheck", "Paycheck - "..jobLabel, "green", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Amount", value = salary, inline = true}
})
end
if salary > 0 then
if job == 'unemployed' then -- unemployed
xPlayer.addAccountMoney('bank', salary, "Welfare Check")
TriggerClientEvent('esx:showAdvancedNotification', player, TranslateCap('bank'), TranslateCap('received_paycheck'), TranslateCap('received_help', salary),
'CHAR_BANK_MAZE', 9)
elseif Config.EnableSocietyPayouts then -- possibly a society
TriggerEvent('esx_society:getSociety', xPlayer.job.name, function(society)
if society ~= nil then -- verified society
TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account)
if account.money >= salary then -- does the society money to pay its employees?
xPlayer.addAccountMoney('bank', salary, "Paycheck")
account.removeMoney(salary)
TriggerClientEvent('esx:showAdvancedNotification', player, TranslateCap('bank'), TranslateCap('received_paycheck'),
TranslateCap('received_salary', salary), 'CHAR_BANK_MAZE', 9)
else
TriggerClientEvent('esx:showAdvancedNotification', player, TranslateCap('bank'), '', TranslateCap('company_nomoney'), 'CHAR_BANK_MAZE', 1)
end
end)
else -- not a society
xPlayer.addAccountMoney('bank', salary, "Paycheck")
TriggerClientEvent('esx:showAdvancedNotification', player, TranslateCap('bank'), TranslateCap('received_paycheck'), TranslateCap('received_salary', salary),
'CHAR_BANK_MAZE', 9)
end
end)
else -- generic job
xPlayer.addAccountMoney('bank', salary, "Paycheck")
TriggerClientEvent('esx:showAdvancedNotification', player, TranslateCap('bank'), TranslateCap('received_paycheck'), TranslateCap('received_salary', salary),
'CHAR_BANK_MAZE', 9)
end
end
end
end
end)
TriggerClientEvent('esx:showAdvancedNotification', player, TranslateCap('bank'), TranslateCap('received_paycheck'),
TranslateCap('received_salary', salary), 'CHAR_BANK_MAZE', 9)
else
TriggerClientEvent('esx:showAdvancedNotification', player, TranslateCap('bank'), '', TranslateCap('company_nomoney'), 'CHAR_BANK_MAZE', 1)
end
end)
else -- not a society
xPlayer.addAccountMoney('bank', salary, "Paycheck")
if Config.LogPaycheck then
ESX.DiscordLogFields("Paycheck", "Paycheck - "..jobLabel, "green", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Amount", value = salary, inline = true}
})
end
TriggerClientEvent('esx:showAdvancedNotification', player, TranslateCap('bank'), TranslateCap('received_paycheck'), TranslateCap('received_salary', salary),
'CHAR_BANK_MAZE', 9)
end
end)
else -- generic job
xPlayer.addAccountMoney('bank', salary, "Paycheck")
if Config.LogPaycheck then
ESX.DiscordLogFields("Paycheck", "Paycheck - Generic", "green", {
{name = "Player", value = xPlayer.name, inline = true},
{name = "ID", value = xPlayer.source, inline = true},
{name = "Amount", value = salary, inline = true}
})
end
TriggerClientEvent('esx:showAdvancedNotification', player, TranslateCap('bank'), TranslateCap('received_paycheck'), TranslateCap('received_salary', salary),
'CHAR_BANK_MAZE', 9)
end
end
end
end
end)
end
-9
View File
@@ -1,9 +0,0 @@
root = true
[*]
indent_size = 4
indent_style = tab
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
-9
View File
@@ -1,9 +0,0 @@
root = true
[*]
indent_size = 4
indent_style = tab
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
+7 -4
View File
@@ -1,4 +1,5 @@
local CurrentProgress = nil
local function Progressbar(message,length,Options)
if CurrentProgress then
return false
@@ -34,9 +35,8 @@ local function Progressbar(message,length,Options)
end
end
ESX.RegisterInput("cancelprog", "[ProgressBar] Cancel Progressbar", "keyboard", "BACK", function()
local function CancelProgressbar()
if not CurrentProgress then return end
if not CurrentProgress.onCancel then return end
SendNUIMessage({
type = "Close"
})
@@ -44,7 +44,10 @@ ESX.RegisterInput("cancelprog", "[ProgressBar] Cancel Progressbar", "keyboard",
if CurrentProgress.FreezePlayer then FreezeEntityPosition(PlayerPedId(), false) end
CurrentProgress.canceled = true
CurrentProgress.length = 0
CurrentProgress.onCancel()
CurrentProgress = nil
end)
end
ESX.RegisterInput("cancelprog", "[ProgressBar] Cancel Progressbar", "keyboard", "BACK", CancelProgressbar)
exports('Progressbar', Progressbar)
exports('CancelProgressbar', CancelProgressbar)
-9
View File
@@ -1,9 +0,0 @@
root = true
[*]
indent_size = 4
indent_style = tab
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true