diff --git a/[SQL]/legacy.sql b/[SQL]/legacy.sql
index 4fb035d1..ff923035 100644
--- a/[SQL]/legacy.sql
+++ b/[SQL]/legacy.sql
@@ -709,11 +709,13 @@ INSERT INTO `vehicle_categories` (`name`, `label`) VALUES
--
CREATE TABLE `vehicle_sold` (
+ `id` INT(11) NOT NULL AUTO_INCREMENT,
`client` varchar(50) NOT NULL,
`model` varchar(50) NOT NULL,
`plate` varchar(50) NOT NULL,
`soldby` varchar(50) NOT NULL,
- `date` varchar(50) NOT NULL
+ `date` varchar(50) NOT NULL,
+ PRIMARY KEY (`id`)
) ENGINE=InnoDB;
--
@@ -1001,20 +1003,20 @@ INSERT INTO `fine_types` (label, amount, category) VALUES
--
INSERT INTO `addon_account` (name, label, shared) VALUES
- ('society_banker','Banque',1),
- ('bank_savings','Livret Bleu',0)
+ ('society_banker','Bank',1),
+ ('bank_savings','Savings account',0)
;
INSERT INTO `jobs` (name, label) VALUES
- ('banker','Banquier')
+ ('banker','Banker')
;
INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
- ('banker',0,'advisor','Conseiller',10,'{}','{}'),
- ('banker',1,'banker','Banquier',20,'{}','{}'),
- ('banker',2,'business_banker',"Banquier d\'affaire",30,'{}','{}'),
- ('banker',3,'trader','Trader',40,'{}','{}'),
- ('banker',4,'boss','Patron',0,'{}','{}')
+ ('banker',0,'advisor','Consultant',10,'{}','{}'),
+ ('banker',1,'banker','Banker',20,'{}','{}'),
+ ('banker',2,'business_banker',"Investment banker",30,'{}','{}'),
+ ('banker',3,'trader','Broker',40,'{}','{}'),
+ ('banker',4,'boss','Boss',0,'{}','{}')
;
--
diff --git a/[esx]/es_extended/client/common.lua b/[esx]/es_extended/client/common.lua
index c3fc1c36..26020ace 100644
--- a/[esx]/es_extended/client/common.lua
+++ b/[esx]/es_extended/client/common.lua
@@ -1,9 +1,3 @@
-AddEventHandler('esx:getSharedObject', function(cb)
- local Invoke = GetInvokingResource()
- print(('[^3WARNING^7] ^5%s^7 used ^5esx:getSharedObject^7, this method is deprecated and should not be used! Refer to ^5https://docs.esx-framework.org/tutorials/sharedevent^7 for more info!'):format(Invoke))
- cb(ESX)
-end)
-
exports('getSharedObject', function()
return ESX
end)
diff --git a/[esx]/es_extended/client/functions.lua b/[esx]/es_extended/client/functions.lua
index d59e240c..83489795 100644
--- a/[esx]/es_extended/client/functions.lua
+++ b/[esx]/es_extended/client/functions.lua
@@ -877,7 +877,7 @@ function ESX.Game.SetVehicleProperties(vehicle, props)
if props.extras ~= nil then
for extraId, enabled in pairs(props.extras) do
- SetVehicleExtra(vehicle, tonumber(extraId), enabled and 0 or 0)
+ SetVehicleExtra(vehicle, tonumber(extraId), enabled and 0 or 1)
end
end
@@ -1088,22 +1088,26 @@ end
function ESX.ShowInventory()
local playerPed = ESX.PlayerData.ped
- local elements, currentWeight = {}, 0
+ local elements = {
+ {unselectable = true, icon = 'fas fa-box', title = 'Player Inventory'}
+ }
+ 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'
- table.insert(elements, {
- label = ('%s: %s'):format(ESX.PlayerData.accounts[i].label, formattedMoney),
+ 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
@@ -1111,15 +1115,16 @@ function ESX.ShowInventory()
if v.count > 0 then
currentWeight = currentWeight + (v.weight * v.count)
- table.insert(elements, {
- label = ('%s x%s'):format(v.label, 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
@@ -1135,8 +1140,9 @@ function ESX.ShowInventory()
label = v.label
end
- table.insert(elements, {
- label = label,
+ elements[#elements+1] = {
+ icon = 'fas fa-gun',
+ title = label,
count = 1,
type = 'item_weapon',
value = v.name,
@@ -1145,76 +1151,80 @@ function ESX.ShowInventory()
ammo = ammo,
canGiveAmmo = (v.ammo ~= nil),
canRemove = true
- })
+ }
end
end
- ESX.UI.Menu.CloseAll()
+ elements[#elements+1] = {
+ unselectable = true,
+ icon = "fas fa-weight",
+ title = "Current Weight: "..currentWeight
+ }
+
+ ESX.CloseContext()
- ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'inventory', {
- title = TranslateCap('inventory', currentWeight, ESX.PlayerData.maxWeight),
- align = 'bottom-right',
- elements = elements
- }, function(data, menu)
- menu.close()
+ ESX.OpenContext("right", elements, function(menu,element)
local player, distance = ESX.Game.GetClosestPlayer()
- elements = {}
- if data.current.usable then
- table.insert(elements, {
- label = TranslateCap('use'),
+ elements2 = {}
+
+ if element.usable then
+ elements2[#elements2+1] = {
+ icon = "fas fa-utensils",
+ title = TranslateCap('use'),
action = 'use',
- type = data.current.type,
- value = data.current.value
- })
+ type = element.type,
+ value = element.value
+ }
end
- if data.current.canRemove then
+ if element.canRemove then
if player ~= -1 and distance <= 3.0 then
- table.insert(elements, {
- label = TranslateCap('give'),
+ elements2[#elements2+1] = {
+ icon = "fas fa-hands",
+ title = TranslateCap('give'),
action = 'give',
- type = data.current.type,
- value = data.current.value
- })
+ type = element.type,
+ value = element.value
+ }
end
- table.insert(elements, {
- label = TranslateCap('remove'),
+ elements2[#elements2+1] = {
+ icon = "fas fa-trash",
+ title = TranslateCap('remove'),
action = 'remove',
- type = data.current.type,
- value = data.current.value
- })
+ type = element.type,
+ value = element.value
+ }
end
- if data.current.type == 'item_weapon' and data.current.canGiveAmmo and data.current.ammo > 0 and player ~= -1 and
- distance <= 3.0 then
- table.insert(elements, {
- label = TranslateCap('giveammo'),
+ 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 = data.current.type,
- value = data.current.value
- })
+ type = element.type,
+ value = element.value
+ }
end
- table.insert(elements, {
- label = TranslateCap('return'),
+ elements2[#elements2+1] = {
+ icon = "fas fa-arrow-left",
+ title = TranslateCap('return'),
action = 'return'
- })
+ }
- ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'inventory_item', {
- title = data.current.label,
- align = 'bottom-right',
- elements = elements
- }, function(data1, menu1)
- local item, type = data1.current.value, data1.current.type
+ ESX.OpenContext("right", elements2, function(menu2,element2)
+ local item, type = element2.value, element2.type
- if data1.current.action == 'give' then
+ if element2.action == "give" then
local playersNearby = ESX.Game.GetPlayersInArea(GetEntityCoords(playerPed), 3.0)
if #playersNearby > 0 then
local players = {}
- elements = {}
+ elements3 = {
+ {unselectable = true, icon = "fas fa-users", title = "Nearby Players"}
+ }
for k, playerNearby in ipairs(playersNearby) do
players[GetPlayerServerId(playerNearby)] = true
@@ -1222,19 +1232,15 @@ function ESX.ShowInventory()
ESX.TriggerServerCallback('esx:getPlayerNames', function(returnedPlayers)
for playerId, playerName in pairs(returnedPlayers) do
- table.insert(elements, {
- label = playerName,
+ elements3[#elements3+1] = {
+ icon = "fas fa-user",
+ title = playerName,
playerId = playerId
- })
+ }
end
- ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'give_item_to', {
- title = TranslateCap('give_to'),
- align = 'bottom-right',
- elements = elements
- }, function(data2, menu2)
- local selectedPlayer, selectedPlayerId = GetPlayerFromServerId(data2.current.playerId),
- data2.current.playerId
+ ESX.OpenContext("right", elements3, function(menu3,element3)
+ local selectedPlayer, selectedPlayerId = GetPlayerFromServerId(element3.playerId), element3.playerId
playersNearby = ESX.Game.GetPlayersInArea(GetEntityCoords(playerPed), 3.0)
playersNearby = ESX.Table.Set(playersNearby)
@@ -1244,62 +1250,58 @@ function ESX.ShowInventory()
if IsPedOnFoot(selectedPlayerPed) and not IsPedFalling(selectedPlayerPed) then
if type == 'item_weapon' then
TriggerServerEvent('esx:giveInventoryItem', selectedPlayerId, type, item, nil)
- menu2.close()
- menu1.close()
+ ESX.CloseContext()
else
- ESX.UI.Menu.Open('dialog', GetCurrentResourceName(),
- 'inventory_item_count_give', {
- title = TranslateCap('amount')
- }, function(data3, menu3)
- local quantity = tonumber(data3.value)
+ 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"}
+ }
- if quantity and quantity > 0 and data.current.count >= quantity then
- TriggerServerEvent('esx:giveInventoryItem', selectedPlayerId, type,
- item, quantity)
- menu3.close()
- menu2.close()
- menu1.close()
- else
- ESX.ShowNotification(TranslateCap('amount_invalid'))
- end
- end, function(data3, menu3)
- menu3.close()
- end)
+ ESX.OpenContext("right", elementsG, function(menuG,elementG)
+ local quantity = tonumber(menuG.eles[2].inputValue)
+
+ if quantity and quantity > 0 and element.count >= quantity then
+ TriggerServerEvent('esx:giveInventoryItem', selectedPlayerId, type, 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'))
- menu2.close()
+ ESX.CloseContext()
end
- end, function(data2, menu2)
- menu2.close()
end)
end, players)
- else
- ESX.ShowNotification(TranslateCap('players_nearby'))
end
- elseif data1.current.action == 'remove' then
+ 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 type == 'item_weapon' then
- menu1.close()
+ ESX.CloseContext()
TaskPlayAnim(playerPed, dict, anim, 8.0, 1.0, 1000, 16, 0.0, false, false, false)
RemoveAnimDict(dict)
Wait(1000)
TriggerServerEvent('esx:removeInventoryItem', type, item)
else
- ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'inventory_item_count_remove', {
- title = TranslateCap('amount')
- }, function(data2, menu2)
- local quantity = tonumber(data2.value)
+ 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"}
+ }
- if quantity and quantity > 0 and data.current.count >= quantity then
- menu2.close()
- menu1.close()
+ ESX.OpenContext("right", elementsR, function(menuR,elementR)
+ 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)
@@ -1307,17 +1309,16 @@ function ESX.ShowInventory()
else
ESX.ShowNotification(TranslateCap('amount_invalid'))
end
- end, function(data2, menu2)
- menu2.close()
end)
end
end
- elseif data1.current.action == 'use' then
+ elseif element2.action == "use" then
+ ESX.CloseContext()
TriggerServerEvent('esx:useItem', item)
- elseif data1.current.action == 'return' then
- ESX.UI.Menu.CloseAll()
+ elseif element2.action == "return" then
+ ESX.CloseContext()
ESX.ShowInventory()
- elseif data1.current.action == 'give_ammo' then
+ elseif element2.action == "give_ammo" then
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
local closestPed = GetPlayerPed(closestPlayer)
local pedAmmo = GetAmmoInPedWeapon(playerPed, joaat(item))
@@ -1325,25 +1326,25 @@ function ESX.ShowInventory()
if IsPedOnFoot(closestPed) and not IsPedFalling(closestPed) then
if closestPlayer ~= -1 and closestDistance < 3.0 then
if pedAmmo > 0 then
- ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'inventory_item_count_give', {
- title = TranslateCap('amountammo')
- }, function(data2, menu2)
- local quantity = tonumber(data2.value)
+ 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,elementGA)
+ 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)
- menu2.close()
- menu1.close()
+ 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, function(data2, menu2)
- menu2.close()
end)
else
ESX.ShowNotification(TranslateCap('noammo'))
@@ -1355,12 +1356,7 @@ function ESX.ShowInventory()
ESX.ShowNotification(TranslateCap('in_vehicle'))
end
end
- end, function(data1, menu1)
- ESX.UI.Menu.CloseAll()
- ESX.ShowInventory()
end)
- end, function(data, menu)
- menu.close()
end)
end
diff --git a/[esx]/es_extended/client/main.lua b/[esx]/es_extended/client/main.lua
index b613f741..a10df217 100644
--- a/[esx]/es_extended/client/main.lua
+++ b/[esx]/es_extended/client/main.lua
@@ -1,5 +1,5 @@
local pickups = {}
-local PlayerBank, PlayerMoney = 0,0
+
CreateThread(function()
while not Config.Multichar do
Wait(0)
@@ -52,71 +52,71 @@ AddEventHandler('esx:playerLoaded', function(xPlayer, isNew, skin)
while ESX.PlayerData.ped == nil do Wait(20) end
- -- enable PVP
if Config.EnablePVP then
SetCanAttackFriendly(ESX.PlayerData.ped, true, false)
NetworkSetFriendlyFireOption(true)
end
- CreateThread(function()
- local SetPlayerHealthRechargeMultiplier = SetPlayerHealthRechargeMultiplier
- local BlockWeaponWheelThisFrame = BlockWeaponWheelThisFrame
- local DisableControlAction = DisableControlAction
- local IsPedArmed = IsPedArmed
- local SetPlayerLockonRangeOverride = SetPlayerLockonRangeOverride
- local DisablePlayerVehicleRewards = DisablePlayerVehicleRewards
- local RemoveAllPickupsOfType = RemoveAllPickupsOfType
- local HideHudComponentThisFrame = HideHudComponentThisFrame
- local PlayerId = PlayerId()
- local DisabledComps = {}
- for i=1, #(Config.RemoveHudCommonents) do
- if Config.RemoveHudCommonents[i] then
- DisabledComps[#DisabledComps + 1] = i
- end
- end
- while true do
- local Sleep = true
+ CreateThread(function()
+ local SetPlayerHealthRechargeMultiplier = SetPlayerHealthRechargeMultiplier
+ local BlockWeaponWheelThisFrame = BlockWeaponWheelThisFrame
+ local DisableControlAction = DisableControlAction
+ local IsPedArmed = IsPedArmed
+ local SetPlayerLockonRangeOverride = SetPlayerLockonRangeOverride
+ local DisablePlayerVehicleRewards = DisablePlayerVehicleRewards
+ local RemoveAllPickupsOfType = RemoveAllPickupsOfType
+ local HideHudComponentThisFrame = HideHudComponentThisFrame
+ local PlayerId = PlayerId()
+ local DisabledComps = {}
+ for i=1, #(Config.RemoveHudCommonents) do
+ if Config.RemoveHudCommonents[i] then
+ DisabledComps[#DisabledComps + 1] = i
+ end
+ end
- if Config.DisableHealthRegeneration then
- Sleep = false
- SetPlayerHealthRechargeMultiplier(PlayerId, 0.0)
- end
+ while true do
+ local Sleep = true
- if Config.DisableWeaponWheel then
- Sleep = false
- BlockWeaponWheelThisFrame()
- DisableControlAction(0, 37,true)
- end
+ if Config.DisableHealthRegeneration then
+ Sleep = false
+ SetPlayerHealthRechargeMultiplier(PlayerId, 0.0)
+ end
- if Config.DisableAimAssist then
- Sleep = false
- if IsPedArmed(ESX.PlayerData.ped, 4) then
- SetPlayerLockonRangeOverride(PlayerId, 2.0)
- end
- end
+ if Config.DisableWeaponWheel then
+ Sleep = false
+ BlockWeaponWheelThisFrame()
+ DisableControlAction(0, 37,true)
+ end
- if Config.DisableVehicleRewards then
- Sleep = false
- DisablePlayerVehicleRewards(PlayerId)
+ if Config.DisableAimAssist then
+ Sleep = false
+ if IsPedArmed(ESX.PlayerData.ped, 4) then
+ SetPlayerLockonRangeOverride(PlayerId, 2.0)
end
+ end
+
+ if Config.DisableVehicleRewards then
+ Sleep = false
+ DisablePlayerVehicleRewards(PlayerId)
+ end
- if Config.DisableNPCDrops then
- Sleep = false
- RemoveAllPickupsOfType(0xDF711959) -- carbine rifle
- RemoveAllPickupsOfType(0xF9AFB48F) -- pistol
- RemoveAllPickupsOfType(0xA9355DCD) -- pumpshotgun
- end
+ if Config.DisableNPCDrops then
+ Sleep = false
+ RemoveAllPickupsOfType(0xDF711959)
+ RemoveAllPickupsOfType(0xF9AFB48F)
+ RemoveAllPickupsOfType(0xA9355DCD)
+ end
- if #DisabledComps > 0 then
- Sleep = false
- for i=1, #(DisabledComps) do
- HideHudComponentThisFrame(DisabledComps[i])
- end
+ if #DisabledComps > 0 then
+ Sleep = false
+ for i=1, #(DisabledComps) do
+ HideHudComponentThisFrame(DisabledComps[i])
end
+ end
Wait(Sleep and 1500 or 0)
- end
- end)
+ end
+ end)
if Config.EnableHud then
for i=1, #(ESX.PlayerData.accounts) do
@@ -203,8 +203,8 @@ AddStateBagChangeHandler('VehicleProperties', nil, function(bagName, key, value)
local NetId = value.NetId
local Vehicle = NetworkGetEntityFromNetworkId(NetId)
local Tries = 0
- while not DoesEntityExist(Vehicle) do
- local Vehicle = NetworkGetEntityFromNetworkId(NetId)
+ while Vehicle == 0 do
+ Vehicle = NetworkGetEntityFromNetworkId(NetId)
Wait(100)
Tries = Tries + 1
if Tries > 300 then
@@ -250,9 +250,7 @@ if not Config.OxInventory then
ESX.UI.ShowInventoryItemNotification(true, item, count)
end
- if ESX.UI.Menu.IsOpen('default', 'es_extended', 'inventory') then
- ESX.ShowInventory()
- end
+ ESX.ShowInventory()
end)
RegisterNetEvent('esx:removeInventoryItem')
@@ -269,9 +267,7 @@ if not Config.OxInventory then
ESX.UI.ShowInventoryItemNotification(false, item, count)
end
- if ESX.UI.Menu.IsOpen('default', 'es_extended', 'inventory') then
- ESX.ShowInventory()
- end
+ ESX.ShowInventory()
end)
RegisterNetEvent('esx:addWeapon')
@@ -438,32 +434,11 @@ function StartServerSyncLoops()
end
end)
end
-
- -- sync current player coords with server
- CreateThread(function()
- local previousCoords = vector3(ESX.PlayerData.coords.x, ESX.PlayerData.coords.y, ESX.PlayerData.coords.z)
-
- while ESX.PlayerLoaded do
- local playerPed = PlayerPedId()
- if ESX.PlayerData.ped ~= playerPed then ESX.SetPlayerData('ped', playerPed) end
-
- if DoesEntityExist(ESX.PlayerData.ped) then
- local playerCoords = GetEntityCoords(ESX.PlayerData.ped)
- local distance = #(playerCoords - previousCoords)
-
- if distance > 1 then
- previousCoords = playerCoords
- TriggerServerEvent('esx:updateCoords')
- end
- end
- Wait(1500)
- end
- end)
end
if not Config.OxInventory and Config.EnableDefaultInventory then
RegisterCommand('showinv', function()
- if not ESX.PlayerData.dead and not ESX.UI.Menu.IsOpen('default', 'es_extended', 'inventory') then
+ if not ESX.PlayerData.dead then
ESX.ShowInventory()
end
end)
@@ -537,158 +512,147 @@ AddEventHandler("esx:tpm", function()
local GetVehiclePedIsIn = GetVehiclePedIsIn
ESX.TriggerServerCallback("esx:isUserAdmin", function(admin)
- if admin then
- local blipMarker = GetFirstBlipInfoId(8)
- if not DoesBlipExist(blipMarker) then
- ESX.ShowNotification('No Waypoint Set.', 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
- if vehicle > 0 then
- FreezeEntityPosition(vehicle, true)
- else
- FreezeEntityPosition(ped, true)
- end
-
- 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)
- if vehicle > 0 then
- FreezeEntityPosition(vehicle, false)
- else
- FreezeEntityPosition(ped, false)
- end
-
- 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('Successfully Teleported', true, false, 140)
- end
-
- -- If Z coord was found, set coords in found coords.
- SetPedCoordsKeepVehicle(ped, x, y, groundZ)
- ESX.ShowNotification('Successfully Teleported', true, false, 140)
+ 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
+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
+end
+
RegisterNetEvent("esx:noclip")
AddEventHandler("esx:noclip", function(input)
ESX.TriggerServerCallback("esx:isUserAdmin", function(admin)
- if admin then
- local player = PlayerId()
-
- local msg = "disabled"
- if(noclip == false)then
- noclip_pos = GetEntityCoords(ESX.PlayerData.ped, false)
- end
-
- noclip = not noclip
-
- if(noclip)then
- msg = "enabled"
- end
-
- TriggerEvent("chatMessage", "Noclip has been ^2^*" .. msg)
- end
- end)
-end)
-
- local heading = 0
- CreateThread(function()
- while true do
- local Sleep = 1500
-
- if(noclip)then
- Sleep = 0
- 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
+ if not admin then
+ return
end
- Wait(Sleep)
- 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 "enabled" or "disabled"), true, false, 140)
+ end)
end)
RegisterNetEvent("esx:killPlayer")
@@ -705,34 +669,33 @@ AddEventHandler("esx:freezePlayer", function(input)
SetPlayerInvincible(player, true)
elseif input == 'unfreeze' then
SetEntityCollision(ESX.PlayerData.ped, true)
- FreezeEntityPosition(ESX.PlayerData.ped, false)
+ FreezeEntityPosition(ESX.PlayerData.ped, false)
SetPlayerInvincible(player, false)
end
end)
RegisterNetEvent("esx:GetVehicleType", function(Model, Request)
- local Model = Model
- local VehicleType = GetVehicleClassFromName(Model)
- local type = "automobile"
- if VehicleType == 15 then
- type = "heli"
- elseif VehicleType == 16 then
- type = "plane"
- elseif VehicleType == 14 then
- type = "boat"
- elseif VehicleType == 11 then
- type = "trailer"
- elseif VehicleType == 21 then
- type = "train"
- elseif VehicleType == 13 or VehicleType == 8 then
- type = "bike"
- end
- if Model == `submersible` or Model == `submersible2` then
- type = "submarine"
- end
- TriggerServerEvent("esx:ReturnVehicleType", type, Request)
-end)
+ if not IsModelInCdimage(Model) then
+ return TriggerServerEvent("esx:ReturnVehicleType", false, Request)
+ end
+ if Model == `submersible` or Model == `submersible2` then
+ return TriggerServerEvent("esx:ReturnVehicleType", "submarine", Request)
+ end
+
+ local VehicleType = GetVehicleClassFromName(Model)
+ local types = {
+ [8] = "bike",
+ [11] = "trailer",
+ [13] = "bike",
+ [14] = "boat",
+ [15] = "heli",
+ [16] = "plane",
+ [21] = "train",
+ }
+
+ TriggerServerEvent("esx:ReturnVehicleType", types[VehicleType] or "automobile", Request)
+end)
local DoNotUse = {
'essentialmode',
diff --git a/[esx]/es_extended/common/functions.lua b/[esx]/es_extended/common/functions.lua
index 2282e630..b3074c8a 100644
--- a/[esx]/es_extended/common/functions.lua
+++ b/[esx]/es_extended/common/functions.lua
@@ -4,6 +4,16 @@ for i = 48, 57 do table.insert(Charset, string.char(i)) end
for i = 65, 90 do table.insert(Charset, string.char(i)) end
for i = 97, 122 do 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
+end)
+
function ESX.GetRandomString(length)
math.randomseed(GetGameTimer())
@@ -17,19 +27,16 @@ end
function ESX.GetWeapon(weaponName)
weaponName = string.upper(weaponName)
- for k,v in ipairs(Config.Weapons) do
- if v.name == weaponName then
- return k, v
- end
- end
+ assert(weaponsByName[weaponName], "Invalid weapon name!")
+
+ local index = weaponsByName[weaponName]
+ return index, Config.Weapons[index]
end
function ESX.GetWeaponFromHash(weaponHash)
- for k,v in ipairs(Config.Weapons) do
- if joaat(v.name) == weaponHash then
- return v
- end
- end
+ weaponHash = type(weaponHash) == "string" and joaat(weaponHash) or weaponHash
+
+ return weaponsByHash[weaponHash]
end
function ESX.GetWeaponList()
@@ -39,24 +46,21 @@ end
function ESX.GetWeaponLabel(weaponName)
weaponName = string.upper(weaponName)
- for k,v in ipairs(Config.Weapons) do
- if v.name == weaponName then
- return v.label
- end
- end
+ assert(weaponsByName[weaponName], "Invalid weapon name!")
+
+ local index = weaponsByName[weaponName]
+ return Config.Weapons[index].label or ""
end
function ESX.GetWeaponComponent(weaponName, weaponComponent)
weaponName = string.upper(weaponName)
- local weapons = Config.Weapons
- for k,v in ipairs(Config.Weapons) do
- if v.name == weaponName then
- for k2,v2 in ipairs(v.components) do
- if v2.name == weaponComponent then
- return v2
- end
- end
+ 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
end
diff --git a/[esx]/es_extended/config.lua b/[esx]/es_extended/config.lua
index a72b3f64..50c57ea3 100644
--- a/[esx]/es_extended/config.lua
+++ b/[esx]/es_extended/config.lua
@@ -19,7 +19,7 @@ Config.Accounts = {
Config.StartingAccountMoney = {bank = 50000}
Config.EnableSocietyPayouts = false -- pay from the society account that the player is employed at? Requirement: esx_society
-Config.EnableHud = true -- enable the default hud? Display current job and accounts (black, bank & cash)
+Config.EnableHud = false -- enable the default hud? Display current job and accounts (black, bank & cash)
Config.MaxWeight = 24 -- the max inventory weight without backpack
Config.PaycheckInterval = 7 * 60000 -- how often to recieve pay checks in milliseconds
Config.EnableDebug = false -- Use Debug options?
diff --git a/[esx]/es_extended/locales/cs.lua b/[esx]/es_extended/locales/cs.lua
index b338d3fa..7186ef8b 100644
--- a/[esx]/es_extended/locales/cs.lua
+++ b/[esx]/es_extended/locales/cs.lua
@@ -1,228 +1,359 @@
Locales['cs'] = {
-- Inventory
- ['inventory'] = 'inventář %s / %s',
- ['use'] = 'použít',
- ['give'] = 'dát',
- ['remove'] = 'zahodit',
- ['return'] = 'zpět',
- ['give_to'] = 'dát',
- ['amount'] = 'množství',
- ['giveammo'] = 'dát munici',
- ['amountammo'] = 'množství munice',
- ['noammo'] = 'nemáte dostatek munice!',
- ['gave_item'] = 'dali jste %sx %s %s',
- ['received_item'] = 'obdrželi jste %sx %s od %s',
- ['gave_weapon'] = 'dal jsi %s hráči %s',
- ['gave_weapon_ammo'] = 'dal jsi ~o~%sx %s za %s to %s',
- ['gave_weapon_withammo'] = 'dal jwi %s s ~o~%sx %s to %s',
- ['gave_weapon_hasalready'] = '%s již má %s',
- ['gave_weapon_noweapon'] = '%s nemá tuhle zbraň',
- ['received_weapon'] = 'obdrzel jsi %s od %s',
- ['received_weapon_ammo'] = 'obdrzel jsi ~o~%sx %s za tvůj %s od %s',
- ['received_weapon_withammo'] = 'obdzel jsi %s s ~o~%sx %s od %s',
- ['received_weapon_hasalready'] = '%s se pokusil ti dat %s, ale jiz tento predmet jednou mas',
- ['received_weapon_noweapon'] = '%s se pokusil ti dat naboje pro %s, ale tuhle zbran nemas',
- ['gave_account_money'] = 'dali jste $%s (%s) %s',
- ['received_account_money'] = 'obdrželi jste $%s (%s) od %s',
- ['amount_invalid'] = 'neplatné množství',
- ['players_nearby'] = 'žádní hráči poblíž',
- ['ex_inv_lim'] = 'akce není možná, překročen limit inventáře pro %s',
- ['imp_invalid_quantity'] = 'akce není možná, neplatný počet',
- ['imp_invalid_amount'] = 'akce není možná, neplatné množství',
- ['threw_standard'] = 'vyhodil jsi %sx %s',
- ['threw_account'] = 'vyhodil jsi $%s %s',
- ['threw_weapon'] = 'vzhodil jsi %s',
- ['threw_weapon_ammo'] = 'vyhodil jsi %s s ~o~%sx %s',
- ['threw_weapon_already'] = 'jiz stejnou zbraan mas',
- ['threw_cannot_pickup'] = 'tohle nemuzes sebrat, protoze tvuj inventar je plny',
- ['threw_pickup_prompt'] = 'stiskni E po zvednuti',
+ ['inventory'] = 'Inventář ( Váha %s / %s )',
+ ['use'] = 'Použít',
+ ['give'] = 'Darovat',
+ ['remove'] = 'Odhodit',
+ ['return'] = 'Vrátit',
+ ['give_to'] = 'Darováno',
+ ['amount'] = 'Počet',
+ ['giveammo'] = 'Podat náboje',
+ ['amountammo'] = 'Počet nábojů',
+ ['noammo'] = 'Nedostatek!',
+ ['gave_item'] = 'Daroval %sx %s pro %s',
+ ['received_item'] = 'Získáno %sx %s od %s',
+ ['gave_weapon'] = 'Předání %s pro %s',
+ ['gave_weapon_ammo'] = 'Darování ~o~%sx %s do %s pro %s',
+ ['gave_weapon_withammo'] = 'Darování %s s ~o~%sx %s pro %s',
+ ['gave_weapon_hasalready'] = '%s již vlastní %s',
+ ['gave_weapon_noweapon'] = '%s nemá tuto zbraň',
+ ['received_weapon'] = 'Obdrženo %s od %s',
+ ['received_weapon_ammo'] = 'Obdrženo ~o~%sx %s pro zbraň %s od %s',
+ ['received_weapon_withammo'] = 'Obdrženo %s s ~o~%sx %s od %s',
+ ['received_weapon_hasalready'] = '%s se snažil darovat %s, ale již tuto zbraň máš',
+ ['received_weapon_noweapon'] = '%s se snažil ti dát náboje %s, ale nemáš potřebnou zbrań',
+ ['gave_account_money'] = 'Darováno $%s (%s) pro %s',
+ ['received_account_money'] = 'Získáno $%s (%s) od %s',
+ ['amount_invalid'] = 'Špatné množství',
+ ['players_nearby'] = 'Žádný hráč není poblíž',
+ ['ex_inv_lim'] = 'Nelze sebrat,protože máš plné kapsy %s',
+ ['imp_invalid_quantity'] = 'Neplatné množství',
+ ['imp_invalid_amount'] = 'Nelze provést, neplatné množství',
+ ['threw_standard'] = 'Zahozeno %sx %s',
+ ['threw_account'] = 'Zahozeno $%s %s',
+ ['threw_weapon'] = 'Zahozeno %s',
+ ['threw_weapon_ammo'] = 'Zahozeno %s s ~o~%sx %s',
+ ['threw_weapon_already'] = 'Již vlastníš tuto zbraň',
+ ['threw_cannot_pickup'] = 'Kapsy máš plné, nemůžeš sebrat!',
+ ['threw_pickup_prompt'] = 'Zmáčkni E pro sebrání!',
-- Key mapping
- ['keymap_showinventory'] = 'zobrazit inventar',
+ ['keymap_showinventory'] = 'Otevřít inventář',
-- Salary related
- ['received_salary'] = 'obdrželi jste výplatu: $%s',
- ['received_help'] = 'obdrželi jste sociální dávku: $%s',
- ['company_nomoney'] = 'společnost u které jste zaměstananí nemá peníze na váš plat',
- ['received_paycheck'] = 'obdržena výplata',
- ['bank'] = 'bankovní účet',
- ['account_bank'] = 'banka',
- ['account_black_money'] = 'spinave penize',
- ['account_money'] = 'kapesne',
+ ['received_salary'] = 'Obdržel jsi: $%s',
+ ['received_help'] = 'Obdržel jsi svůj podíl: $%s',
+ ['company_nomoney'] = 'Firma kde pracujete je příliš chudá, aby vám zaplatila',
+ ['received_paycheck'] = 'Obdržena platba',
+ ['bank'] = 'Banka',
+ ['account_bank'] = 'V bance',
+ ['account_black_money'] = 'Špináve peníze',
+ ['account_money'] = 'V kapse',
- ['act_imp'] = 'akce není možná',
- ['in_vehicle'] = 'nemůže nic dát osobě ve vozidle',
+ ['act_imp'] = 'Nelze provést',
+ ['in_vehicle'] = 'Nelze provést, hráč je v autě',
-- Commands
- ['command_car'] = 'spawn an vehicle',
- ['command_car_car'] = 'vehicle spawn name or hash',
- ['command_cardel'] = 'delete vehicle in proximity',
- ['command_cardel_radius'] = 'optional, delete every vehicle within the specified radius',
- ['command_clear'] = 'clear chat',
- ['command_clearall'] = 'clear chat for all players',
- ['command_clearinventory'] = 'clear player inventory',
- ['command_clearloadout'] = 'clear a player loadout',
- ['command_giveaccountmoney'] = 'give account money',
- ['command_giveaccountmoney_account'] = 'valid account name',
- ['command_giveaccountmoney_amount'] = 'amount to add',
- ['command_giveaccountmoney_invalid'] = 'invalid account name',
- ['command_giveitem'] = 'give an item to a player',
- ['command_giveitem_item'] = 'item name',
- ['command_giveitem_count'] = 'item count',
- ['command_giveweapon'] = 'give a weapon to a player',
- ['command_giveweapon_weapon'] = 'weapon name',
- ['command_giveweapon_ammo'] = 'ammo count',
- ['command_giveweapon_hasalready'] = 'player already has that weapon',
- ['command_giveweaponcomponent'] = 'give weapon component',
- ['command_giveweaponcomponent_component'] = 'component name',
- ['command_giveweaponcomponent_invalid'] = 'invalid weapon component',
- ['command_giveweaponcomponent_hasalready'] = 'player already has that weapon component',
- ['command_giveweaponcomponent_missingweapon'] = 'player does not have that weapon',
- ['command_save'] = 'save a player to database',
- ['command_saveall'] = 'save all players to database',
- ['command_setaccountmoney'] = 'set account money for a player',
- ['command_setaccountmoney_amount'] = 'amount of money to set',
- ['command_setcoords'] = 'teleport to coordinates',
- ['command_setcoords_x'] = 'x axis',
- ['command_setcoords_y'] = 'y axis',
- ['command_setcoords_z'] = 'z axis',
- ['command_setjob'] = 'set job for a player',
- ['command_setjob_job'] = 'job name',
- ['command_setjob_grade'] = 'job grade',
- ['command_setjob_invalid'] = 'the job, grade or both are invalid',
- ['command_setgroup'] = 'set player group',
- ['command_setgroup_group'] = 'group name',
- ['commanderror_argumentmismatch'] = 'argument count mismatch (passed %s, wanted %s)',
- ['commanderror_argumentmismatch_number'] = 'argument #%s type mismatch (passed string, wanted number)',
- ['commanderror_invaliditem'] = 'invalid item name',
- ['commanderror_invalidweapon'] = 'invalid weapon',
- ['commanderror_console'] = 'that command can not be run from console',
- ['commanderror_invalidcommand'] = '/%s is not an valid command!',
- ['commanderror_invalidplayerid'] = 'there is no player online matching that server id',
- ['commandgeneric_playerid'] = 'player id',
- ['command_giveammo_noweapon_found'] = '%s does not have that weapon',
- ['command_giveammo_weapon'] = 'Weapon name',
- ['command_giveammo_ammo'] = 'Ammo Quantity',
+ ['command_bring'] = 'Přivolat si hráče k sobě',
+ ['command_car'] = 'Spawnout vozidlo',
+ ['command_car_car'] = 'Zadej jméno vozidla nebo spawnname',
+ ['command_cardel'] = 'Odstranění vozidla v okolí',
+ ['command_cardel_radius'] = 'Odstranění vozidla v určeném dosahu',
+ ['command_clear'] = 'Vymazat text v chatu',
+ ['command_clearall'] = 'Vymazat chet pro všechny hráče',
+ ['command_clearinventory'] = 'Vymazat všechny věci z invetáře hráče',
+ ['command_clearloadout'] = 'Vymazat všechny zbraně z inventáře hráče',
+ ['command_freeze'] = 'Zmrazit hráče',
+ ['command_unfreeze'] = 'Odmrazit hráče',
+ ['command_giveaccountmoney'] = 'Poslat peníze na účet ',
+ ['command_giveaccountmoney_account'] = 'Převést peníze na účet',
+ ['command_giveaccountmoney_amount'] = 'Částka k poslání',
+ ['command_giveaccountmoney_invalid'] = 'Neplátné jméno',
+ ['command_giveitem'] = 'Darovat věc hráči',
+ ['command_giveitem_item'] = 'Název věci',
+ ['command_giveitem_count'] = 'Množství',
+ ['command_giveweapon'] = 'Dát zbraň hráči',
+ ['command_giveweapon_weapon'] = 'Název zbraně',
+ ['command_giveweapon_ammo'] = 'Množství náboje',
+ ['command_giveweapon_hasalready'] = 'Hráč již má tuto zbraň',
+ ['command_giveweaponcomponent'] = 'Darovat přídavek na zbraň',
+ ['command_giveweaponcomponent_component'] = 'Název zbraně',
+ ['command_giveweaponcomponent_invalid'] = 'Špatné jméno přídavku',
+ ['command_giveweaponcomponent_hasalready'] = 'Hráč již má tento přídavek',
+ ['command_giveweaponcomponent_missingweapon'] = 'Hráč nemá tuto zbrań',
+ ['command_goto'] = 'Teleportování sebe k hráči',
+ ['command_kill'] = 'Zabití hráče',
+ ['command_save'] = 'Uložení dat hráče',
+ ['command_saveall'] = 'Uložení veškerých dat hráče',
+ ['command_setaccountmoney'] = 'Nastavení určeného počtu peněz',
+ ['command_setaccountmoney_amount'] = 'Počet peněz',
+ ['command_setcoords'] = 'Teleportování na určené souřadnice',
+ ['command_setcoords_x'] = 'Hodnota X',
+ ['command_setcoords_y'] = 'Hodnota Y',
+ ['command_setcoords_z'] = 'Hodnota Z',
+ ['command_setjob'] = 'Nastavit práci hráči',
+ ['command_setjob_job'] = 'Název práce',
+ ['command_setjob_grade'] = 'Pozice ve firmě',
+ ['command_setjob_invalid'] = 'Špatné zadání práce,hodnosti nebo i obou hodnot',
+ ['command_setgroup'] = 'Nastavení práv hráči',
+ ['command_setgroup_group'] = 'Název skupiny',
+ ['commanderror_argumentmismatch'] = 'Chybný počet hodnot (správně %s, potřebných %s)',
+ ['commanderror_argumentmismatch_number'] = 'Chybně zadaná hodnot #%s (správně, špatně)',
+ ['commanderror_invaliditem'] = 'Špatný předmět',
+ ['commanderror_invalidweapon'] = 'Špatná zbraň',
+ ['commanderror_console'] = 'příkaz nelze být zpracován v konzoli',
+ ['commanderror_invalidcommand'] = 'Špatný příakz - /%s',
+ ['commanderror_invalidplayerid'] = 'Hráč není dostupný',
+ ['commandgeneric_playerid'] = 'Id hráče',
+ ['command_giveammo_noweapon_found'] = '%s nemá tuto zbraň',
+ ['command_giveammo_weapon'] = 'Název zbraně',
+ ['command_giveammo_ammo'] = 'Počet nábojů',
-- Locale settings
- ['locale_digit_grouping_symbol'] = ' ',
- ['locale_currency'] = '$%s',
+ ['locale_digit_grouping_symbol'] = ',',
+ ['locale_currency'] = '£%s',
-- Weapons
- ['weapon_knife'] = 'nuz',
- ['weapon_nightstick'] = 'policejni obusek',
- ['weapon_hammer'] = 'kladivo',
- ['weapon_bat'] = 'basseballka',
- ['weapon_golfclub'] = 'gollfova hul',
- ['weapon_crowbar'] = 'pacidlo',
- ['weapon_pistol'] = 'pistole',
- ['weapon_combatpistol'] = 'utocna pistole',
- ['weapon_appistol'] = 'ap pistole',
- ['weapon_pistol50'] = 'pistole .50',
- ['weapon_microsmg'] = 'micro smg',
- ['weapon_smg'] = 'smg',
- ['weapon_assaultsmg'] = 'utocne smg',
- ['weapon_assaultrifle'] = 'utocna puska',
- ['weapon_carbinerifle'] = 'carbine puska',
- ['weapon_advancedrifle'] = 'pokrocily puska',
- ['weapon_mg'] = 'mg',
- ['weapon_combatmg'] = 'utocne mg',
- ['weapon_pumpshotgun'] = 'pumpovana brokovnice',
- ['weapon_sawnoffshotgun'] = 'upilovana brokovnice',
- ['weapon_assaultshotgun'] = 'utocna brokovnice',
- ['weapon_bullpupshotgun'] = 'bullpup brokovnice',
- ['weapon_stungun'] = 'tazer',
- ['weapon_sniperrifle'] = 'sniperka',
- ['weapon_heavysniper'] = 'tezka sniperka',
- ['weapon_grenadelauncher'] = 'launcher granatu',
- ['weapon_rpg'] = 'raketomet',
- ['weapon_minigun'] = 'minigun',
- ['weapon_grenade'] = 'granat',
- ['weapon_stickybomb'] = 'lepkava bomba',
- ['weapon_smokegrenade'] = 'kourovy granat',
- ['weapon_bzgas'] = 'bz gas',
- ['weapon_molotov'] = 'molotov koktejl',
- ['weapon_fireextinguisher'] = 'hasicak',
- ['weapon_petrolcan'] = 'kanystr',
- ['weapon_ball'] = 'koule',
- ['weapon_snspistol'] = 'sns pistole',
- ['weapon_bottle'] = 'lahev',
- ['weapon_gusenberg'] = 'gusenberguv zametac',
- ['weapon_specialcarbine'] = 'specialni karabina',
- ['weapon_heavypistol'] = 'tezka pistole',
- ['weapon_bullpuprifle'] = 'bullpup puska',
- ['weapon_dagger'] = 'dyka',
- ['weapon_vintagepistol'] = 'velmi stara pistole',
- ['weapon_firework'] = 'ohnostroj',
- ['weapon_musket'] = 'musketa',
- ['weapon_heavyshotgun'] = 'tezka brokovnice',
- ['weapon_marksmanrifle'] = 'puska strelce',
- ['weapon_hominglauncher'] = 'navadeci launcher',
- ['weapon_proxmine'] = 'mina na blizko',
- ['weapon_snowball'] = 'snehova koule',
- ['weapon_flaregun'] = 'svetlice',
- ['weapon_combatpdw'] = 'utocne pdw',
- ['weapon_marksmanpistol'] = 'pistole strelce',
- ['weapon_knuckle'] = 'knuckledusters',
- ['weapon_hatchet'] = 'sekerka',
- ['weapon_railgun'] = 'vlakovy launcher',
- ['weapon_machete'] = 'maceta',
- ['weapon_machinepistol'] = 'kulomet',
- ['weapon_switchblade'] = 'vystrelovaci nuz',
- ['weapon_revolver'] = 'tezky revolver',
- ['weapon_dbshotgun'] = 'dvouhlavnova brokovnice',
- ['weapon_compactrifle'] = 'kompaktni puska',
- ['weapon_autoshotgun'] = 'automaticka brokovnice',
- ['weapon_battleaxe'] = 'bojova sekera',
- ['weapon_compactlauncher'] = 'kompaktni launcher',
- ['weapon_minismg'] = 'mini smg',
- ['weapon_pipebomb'] = 'dymkova bomba',
- ['weapon_poolcue'] = 'kulecnikove tago',
- ['weapon_wrench'] = 'klic na trubky',
- ['weapon_flashlight'] = 'baterka',
- ['gadget_parachute'] = 'padak',
- ['weapon_flare'] = 'svetlice',
- ['weapon_doubleaction'] = 'dvojhlavnovy revolver',
+
+ -- Melee
+ ['weapon_dagger'] = 'Dýka',
+ ['weapon_bat'] = 'Baseballová pálka',
+ ['weapon_battleaxe'] = 'Bitevní sekera',
+ ['weapon_bottle'] = 'Rozbitá lahve',
+ ['weapon_crowbar'] = 'Páčidlo',
+ ['weapon_flashlight'] = 'Baterka',
+ ['weapon_golfclub'] = 'Golfová hůl',
+ ['weapon_hammer'] = 'Kladivo',
+ ['weapon_hatchet'] = 'Sekera',
+ ['weapon_knife'] = 'Nůž',
+ ['weapon_knuckle'] = 'Boxer',
+ ['weapon_machete'] = 'Mačeta',
+ ['weapon_nightstick'] = 'Policejní obušek',
+ ['weapon_wrench'] = 'Francouzský klíč',
+ ['weapon_poolcue'] = 'Kulečníkové tágo',
+ ['weapon_stone_hatchet'] = 'Kamenná sekera',
+ ['weapon_switchblade'] = 'Vystřelovací nůž',
+
+ -- 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',
+
+ -- 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',
+
+ -- 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',
+
+ -- Criminal Enterprises DLC
+ ['weapon_metaldetector'] = 'Detektor kovu',
+ ['weapon_precisionrifle'] = 'Precision Rifle',
+ ['weapon_tactilerifle'] = 'Service Carbine',
+
+ -- Thrown
+ ['weapon_ball'] = 'Míček',
+ ['weapon_bzgas'] = 'Smrtící slzný plyn',
+ ['weapon_flare'] = 'Světlice',
+ ['weapon_grenade'] = 'Granát',
+ ['weapon_petrolcan'] = 'Kanistr',
+ ['weapon_hazardcan'] = 'Hazardous Jerrycan',
+ ['weapon_molotov'] = 'Molotův koktejl',
+ ['weapon_proxmine'] = 'Pohybová mina',
+ ['weapon_pipebomb'] = 'Trubková bomba',
+ ['weapon_snowball'] = 'Sněhová koule',
+ ['weapon_stickybomb'] = 'C4',
+ ['weapon_smokegrenade'] = 'Slzný plyn',
+
+ -- Special
+ ['weapon_fireextinguisher'] = 'Hasící přístroj',
+ ['weapon_digiscanner'] = 'Skener',
+ ['weapon_garbagebag'] = 'Odpadkový pytel',
+ ['weapon_handcuffs'] = 'Pouta',
+ ['gadget_nightvision'] = 'Noční vidění',
+ ['gadget_parachute'] = 'Padák',
-- Weapon Components
- ['component_clip_default'] = 'zakladni rukojet',
- ['component_clip_extended'] = 'prodloucena rukojet',
+ ['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_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_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_clip_default'] = 'default Magazine',
+ ['component_clip_extended'] = 'extended Magazine',
['component_clip_drum'] = 'drum Magazine',
- ['component_clip_box'] = 'krabice s naboji',
- ['component_flashlight'] = 'baterka',
- ['component_scope'] = 'zamerovac',
- ['component_scope_advanced'] = 'pokrocily zamerovac',
- ['component_suppressor'] = 'tlumic',
- ['component_grip'] = 'rukojet',
- ['component_luxary_finish'] = 'luxusni vzhled zbrane',
+ ['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_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_flashlight'] = 'flashlight',
+ ['component_grip'] = 'grip',
+
+ ['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_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'] = 'naboj(e)',
- ['ammo_shells'] = 'patrona(y)',
- ['ammo_charge'] = 'naboj(e)',
- ['ammo_petrol'] = 'galonu paliva',
- ['ammo_firework'] = 'ohnostroj(e)',
- ['ammo_rockets'] = 'raketa(y)',
- ['ammo_grenadelauncher'] = 'granat(y)',
- ['ammo_grenade'] = 'granat(y)',
- ['ammo_stickybomb'] = 'bomba(y)',
- ['ammo_pipebomb'] = 'bomba(y)',
- ['ammo_smokebomb'] = 'bomba(y)',
- ['ammo_molotov'] = 'koktejl(y)',
- ['ammo_proxmine'] = 'mina(y)',
- ['ammo_bzgas'] = 'kanystr(y)',
- ['ammo_ball'] = 'koule',
- ['ammo_snowball'] = 'snehova(e) koule',
- ['ammo_flare'] = 'svetlice',
- ['ammo_flaregun'] = 'svetlice',
+ ['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'] = 'zakladni skin',
- ['tint_green'] = 'zeleny skin',
- ['tint_gold'] = 'zlaty skin',
- ['tint_pink'] = 'ruzovy skin',
- ['tint_army'] = 'armadni skin',
- ['tint_lspd'] = 'modry skin',
- ['tint_orange'] = 'oranzovy skin',
- ['tint_platinum'] = 'platinovy skin',
+ ['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',
}
diff --git a/[esx]/es_extended/locales/en.lua b/[esx]/es_extended/locales/en.lua
index 30fa36c7..e480153f 100644
--- a/[esx]/es_extended/locales/en.lua
+++ b/[esx]/es_extended/locales/en.lua
@@ -108,6 +108,12 @@ Locales['en'] = {
['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~',
-- Locale settings
['locale_digit_grouping_symbol'] = ',',
diff --git a/[esx]/es_extended/locales/hu.lua b/[esx]/es_extended/locales/hu.lua
index abd4ffa6..f909601a 100644
--- a/[esx]/es_extended/locales/hu.lua
+++ b/[esx]/es_extended/locales/hu.lua
@@ -105,9 +105,15 @@ Locales["hu"] = {
["commanderror_invalidcommand"] = "Érvénytelen parancs - /%s",
["commanderror_invalidplayerid"] = "Megadott játékos nem online.",
["commandgeneric_playerid"] = "Játékos Szerver Id",
- ['command_giveammo_noweapon_found'] = '%s does not have that weapon',
- ['command_giveammo_weapon'] = 'Weapon name',
- ['command_giveammo_ammo'] = 'Ammo Quantity',
+ ['command_giveammo_noweapon_found'] = 'Nincs ilyen fegyvered: %s',
+ ['command_giveammo_weapon'] = 'Fegyver név',
+ ['command_giveammo_ammo'] = 'Lőszer mennyiség',
+ ['tpm_nowaypoint'] = 'Nincs kijelölve pozíció!',
+ ['tpm_success'] = 'Sikeres teleportálás',
+
+ ['noclip_message'] = 'Noclip %s',
+ ['enabled'] = '~g~engedélyezve~s~',
+ ['disabled'] = '~r~letiltva~s~',
-- Locale settings
["locale_digit_grouping_symbol"] = ",",
diff --git a/[esx]/es_extended/server/classes/player.lua b/[esx]/es_extended/server/classes/player.lua
index 73634829..39e303cf 100644
--- a/[esx]/es_extended/server/classes/player.lua
+++ b/[esx]/es_extended/server/classes/player.lua
@@ -1,3 +1,9 @@
+local SetTimeout = SetTimeout
+local GetPlayerPed = GetPlayerPed
+local DoesEntityExist = DoesEntityExist
+local GetEntityCoords = GetEntityCoords
+local GetEntityHeading = GetEntityHeading
+
function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, weight, job, loadout, name, coords)
local targetOverrides = Config.PlayerFunctionOverride and Core.PlayerFunctionOverrides[Config.PlayerFunctionOverride] or {}
@@ -31,7 +37,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
function self.setCoords(coords)
- self.updateCoords(coords)
local Ped = GetPlayerPed(self.source)
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)
@@ -40,10 +45,23 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
end
function self.updateCoords()
- local Ped = GetPlayerPed(self.source)
- local coords = GetEntityCoords(Ped)
- local heading = GetEntityHeading(Ped)
- self.coords = {x = ESX.Math.Round(coords.x, 1), y = ESX.Math.Round(coords.y, 1), z = ESX.Math.Round(coords.z, 1), heading = ESX.Math.Round(heading or 0.0, 1)}
+ SetTimeout(1000,function()
+ local Ped = GetPlayerPed(self.source)
+ if DoesEntityExist(Ped) then
+ local coords = GetEntityCoords(Ped)
+ local distance = #(coords - vector3(self.coords.x, self.coords.y, self.coords.z))
+ if distance > 1.5 then
+ local heading = GetEntityHeading(Ped)
+ self.coords = {
+ x = coords.x,
+ y = coords.y,
+ z = coords.z,
+ heading = heading or 0.0
+ }
+ end
+ end
+ self.updateCoords()
+ end)
end
function self.getCoords(vector)
@@ -187,7 +205,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
print(('[^1ERROR^7] Tried To Set Account ^5%s^0 For Player ^5%s^0 To An Invalid Number -> ^5%s^7'):format(accountName, self.playerId, money))
return
end
- if money > 0 then
+ if money >= 0 then
local account = self.getAccount(accountName)
if account then
diff --git a/[esx]/es_extended/server/common.lua b/[esx]/es_extended/server/common.lua
index 199491b8..0d595045 100644
--- a/[esx]/es_extended/server/common.lua
+++ b/[esx]/es_extended/server/common.lua
@@ -14,11 +14,6 @@ Core.Pickups = {}
Core.PickupId = 0
Core.PlayerFunctionOverrides = {}
-AddEventHandler('esx:getSharedObject', function(cb)
- local Invoke = GetInvokingResource()
- print(('[^3WARNING^7] ^5%s^7 used ^5esx:getSharedObject^7, this method is deprecated and should not be used, On 30/11/2022 esx:getSharedObject will come to EOL and be fully removed! Refer to ^5https://docs.esx-framework.org/tutorials/sharedevent^7 for more info!'):format(Invoke))
- cb(ESX)
-end)
exports('getSharedObject', function()
return ESX
diff --git a/[esx]/es_extended/server/main.lua b/[esx]/es_extended/server/main.lua
index 87ffeb71..52a6f6f7 100644
--- a/[esx]/es_extended/server/main.lua
+++ b/[esx]/es_extended/server/main.lua
@@ -308,6 +308,10 @@ function loadESXPlayer(identifier, playerId, isNew)
maxWeight = xPlayer.getMaxWeight(),
money = xPlayer.getMoney(),
sex = xPlayer.get("sex") or "m",
+ firstName = xPlayer.get("firstName") or "John",
+ lastName = xPlayer.get("lastName") or "Doe",
+ dateofbirth = xPlayer.get("dateofbirth") or "01/01/2000",
+ height = xPlayer.get("height") or 120,
dead = false
}, isNew,
userData.skin)
@@ -317,7 +321,7 @@ function loadESXPlayer(identifier, playerId, isNew)
else
exports.ox_inventory:setPlayerInventory(xPlayer, userData.inventory)
end
-
+ xPlayer.updateCoords()
xPlayer.triggerEvent('esx:registerSuggestions', Core.RegisteredCommands)
print(('[^2INFO^0] Player ^5"%s"^0 has connected to the server. ID: ^5%s^7'):format(xPlayer.getName(), playerId))
end
@@ -359,16 +363,6 @@ AddEventHandler('esx:playerLogout', function(playerId, cb)
TriggerClientEvent("esx:onPlayerLogout", playerId)
end)
-RegisterNetEvent('esx:updateCoords')
-AddEventHandler('esx:updateCoords', function()
- local source = source
- local xPlayer = ESX.GetPlayerFromId(source)
-
- if xPlayer then
- xPlayer.updateCoords()
- end
-end)
-
if not Config.OxInventory then
RegisterNetEvent('esx:updateWeaponAmmo')
AddEventHandler('esx:updateWeaponAmmo', function(weaponName, ammoCount)
diff --git a/[esx]/es_extended/server/onesync.lua b/[esx]/es_extended/server/onesync.lua
index 67a629d1..2ede0ff2 100644
--- a/[esx]/es_extended/server/onesync.lua
+++ b/[esx]/es_extended/server/onesync.lua
@@ -61,23 +61,29 @@ end
---@param heading number
---@param Properties table
---@param cb function
-function ESX.OneSync.SpawnVehicle(model, coords, heading, Properties, cb)
- model = type(model) == 'string' and joaat(model) or model
- Properties = Properties or {}
- local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
- TriggerClientEvent("esx:requestModel", -1, model)
- CreateThread(function()
- local xPlayer = ESX.OneSync.GetClosestPlayer(vector, 200)
- ESX.GetVehicleType(model, xPlayer.id, function(Type)
- local SpawnedEntity = CreateVehicleServerSetter(model, Type, vector, heading)
- Wait(250)
- local NetworkId = NetworkGetNetworkIdFromEntity(SpawnedEntity)
- Properties.NetId = NetworkId
- Entity(SpawnedEntity).state:set('VehicleProperties', Properties, true)
- cb(NetworkId)
- end)
- end)
-end
+ function ESX.OneSync.SpawnVehicle(model, coords, heading, Properties, cb)
+ local veh_model = type(model) == 'string' and joaat(model) or model
+ Properties = Properties or {}
+ local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
+ TriggerClientEvent("esx:requestModel", -1, model)
+ CreateThread(function()
+ local xPlayer = ESX.OneSync.GetClosestPlayer(vector, 300)
+ ESX.GetVehicleType(veh_model, xPlayer.id, function(Type)
+ if Type then
+ local SpawnedEntity = CreateVehicleServerSetter(veh_model, Type, vector, heading)
+ local NetworkId = NetworkGetNetworkIdFromEntity(SpawnedEntity)
+ while not DoesEntityExist(SpawnedEntity) do
+ Wait(100)
+ end
+ Properties.NetId = NetworkId
+ Entity(SpawnedEntity).state:set('VehicleProperties', Properties, true)
+ cb(NetworkId)
+ else
+ print(('[^1ERROR^7] Tried to spawn invalid vehicle - ^5%s^7!'):format(model))
+ end
+ end)
+ end)
+ end
---@param model number|string
diff --git a/[esx]/esx_context/index.html b/[esx]/esx_context/index.html
index fa50034e..5d15770d 100644
--- a/[esx]/esx_context/index.html
+++ b/[esx]/esx_context/index.html
@@ -352,8 +352,11 @@
}
function Close() {
- $.post(`https://${GetParentResourceName()}/closed`)
- Closed()
+ $.post(`https://${GetParentResourceName()}/closed`,(retVal)=>{
+ if(retVal){
+ Closed()
+ }
+ })
}
window.addEventListener("message", (e) => {
@@ -437,4 +440,4 @@