diff --git a/[esx]/cron/fxmanifest.lua b/[esx]/cron/fxmanifest.lua index 1fb1e57b..6ed3d813 100644 --- a/[esx]/cron/fxmanifest.lua +++ b/[esx]/cron/fxmanifest.lua @@ -4,6 +4,6 @@ game 'gta5' author 'ESX-Framework' description 'cron' lua54 'yes' -version '1.7.5' +version '1.8.5' server_script 'server/main.lua' diff --git a/[esx]/es_extended/client/functions.lua b/[esx]/es_extended/client/functions.lua index 50c91c23..3ba77831 100644 --- a/[esx]/es_extended/client/functions.lua +++ b/[esx]/es_extended/client/functions.lua @@ -84,15 +84,14 @@ function ESX.Progressbar(message, length, Options) end function ESX.ShowNotification(message, type, length) - if Config.NativeNotify then - BeginTextCommandThefeedPost('STRING') - AddTextComponentSubstringPlayerName(message) - EndTextCommandThefeedPostTicker(0, 1) - else + if GetResourceState("esx_notify") ~= "missing" then exports["esx_notify"]:Notify(type, length, message) + else + print("[ERROR] Missing esx_notify") + end end -end - + + function ESX.TextUI(message, type) if GetResourceState("esx_textui") ~= "missing" then exports["esx_textui"]:TextUI(message, type) @@ -491,70 +490,33 @@ function ESX.Game.DeleteObject(object) end function ESX.Game.SpawnVehicle(vehicle, coords, heading, cb, networked) - local model = (type(vehicle) == 'number' and vehicle or joaat(vehicle)) + local model = type(vehicle) == 'number' and vehicle or joaat(vehicle) local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z) networked = networked == nil and true or networked - if networked then - local isAutomobile = IsThisModelACar(model) - if isAutomobile ~= false then isAutomobile = true end - ESX.TriggerServerCallback('esx:Onesync:SpawnVehicle',function(NetID) - if NetID then - local Tries = 0 - SetNetworkIdCanMigrate(NetID, true) - local vehicle = NetworkGetEntityFromNetworkId(NetID) - while not DoesEntityExist(vehicle) do - Wait(0) - vehicle = NetworkGetEntityFromNetworkId(NetID) - Tries += 1 - if Tries > 250 then - break - end - end - Tries = 0 - NetworkRequestControlOfEntity(vehicle) - while not NetworkHasControlOfEntity(vehicle) do - Wait(0) - Tries += 1 - if Tries > 250 then - break - end - end - SetEntityAsMissionEntity(vehicle, true, true) - SetVehicleHasBeenOwnedByPlayer(vehicle, true) - SetVehicleNeedsToBeHotwired(vehicle, false) - SetModelAsNoLongerNeeded(model) - SetVehRadioStation(vehicle, 'OFF') - if cb then - cb(vehicle) - end - end - end, model, vector, heading, isAutomobile) - else - CreateThread(function() - ESX.Streaming.RequestModel(model) + CreateThread(function() + ESX.Streaming.RequestModel(model) - local vehicle = CreateVehicle(model, vector.xyz, heading, networked, false) + local vehicle = CreateVehicle(model, vector.xyz, heading, networked, true) - if networked then - local id = NetworkGetNetworkIdFromEntity(vehicle) - SetNetworkIdCanMigrate(id, true) - SetEntityAsMissionEntity(vehicle, true, false) - end - SetVehicleHasBeenOwnedByPlayer(vehicle, true) - SetVehicleNeedsToBeHotwired(vehicle, false) - SetModelAsNoLongerNeeded(model) - SetVehRadioStation(vehicle, 'OFF') + if networked then + local id = NetworkGetNetworkIdFromEntity(vehicle) + SetNetworkIdCanMigrate(id, true) + SetEntityAsMissionEntity(vehicle, true, true) + end + SetVehicleHasBeenOwnedByPlayer(vehicle, true) + SetVehicleNeedsToBeHotwired(vehicle, false) + SetModelAsNoLongerNeeded(model) + SetVehRadioStation(vehicle, 'OFF') - RequestCollisionAtCoord(vector.xyz) - while not HasCollisionLoadedAroundEntity(vehicle) do - Wait(0) - end + RequestCollisionAtCoord(vector.xyz) + while not HasCollisionLoadedAroundEntity(vehicle) do + Wait(0) + end - if cb then - cb(vehicle) - end - end) - end + if cb then + cb(vehicle) + end + end) end function ESX.Game.SpawnLocalVehicle(vehicle, coords, heading, cb) diff --git a/[esx]/es_extended/client/main.lua b/[esx]/es_extended/client/main.lua index 7c2f2c2b..d9338792 100644 --- a/[esx]/es_extended/client/main.lua +++ b/[esx]/es_extended/client/main.lua @@ -193,18 +193,23 @@ AddEventHandler('esx:restoreLoadout', function() end end) +AddStateBagChangeHandler('VehicleProperties', nil, function(bagName, key, value) + if value then + Wait(0) + local NetId = tonumber(bagName:gsub('entity:', ''), 10) + local Vehicle = NetworkGetEntityFromNetworkId(NetId) + + if NetworkGetEntityOwner(Vehicle) == PlayerId() then + ESX.Game.SetVehicleProperties(Vehicle, value) + end + end +end) + RegisterNetEvent('esx:setAccountMoney') AddEventHandler('esx:setAccountMoney', function(account) for i=1, #(ESX.PlayerData.accounts) do if ESX.PlayerData.accounts[i].name == account.name then ESX.PlayerData.accounts[i] = account - if ESX.PlayerData.accounts[i].name == "bank" then - PlayerBank = account.money - StatSetInt("BANK_BALANCE", PlayerBank, true) - elseif ESX.PlayerData.accounts[i].name == "money" then - PlayerMoney = account.money - StatSetInt("MP0_WALLET_BALANCE", PlayerMoney, true) - end break end end diff --git a/[esx]/es_extended/config.lua b/[esx]/es_extended/config.lua index 438c2711..3967c3f1 100644 --- a/[esx]/es_extended/config.lua +++ b/[esx]/es_extended/config.lua @@ -26,7 +26,6 @@ Config.EnableDebug = false -- Use Debug options? Config.EnableDefaultInventory = true -- Display the default Inventory ( F2 ) Config.EnableWantedLevel = false -- Use Normal GTA wanted Level? Config.EnablePVP = true -- Allow Player to player combat -Config.NativeNotify = false -- use old native notification? Config.Multichar = true -- Enable support for esx_multicharacter Config.Identity = true -- Select a characters identity data before they have loaded in (this happens by default with multichar) @@ -61,6 +60,7 @@ Config.RemoveHudCommonents = { [22] = false, --HUD_WEAPONS } +Config.MaxAdminVehicles = true -- admin vehicles spawn with max vehcle settings Config.CustomAIPlates = 'ESX.A111' -- Custom plates for AI vehicles -- Pattern string format --1 will lead to a random number from 0-9. @@ -70,5 +70,3 @@ Config.CustomAIPlates = 'ESX.A111' -- Custom plates for AI vehicles --^A will lead to a literal A being emitted. --Any other character will lead to said character being emitted. -- A string shorter than 8 characters will be padded on the right. - -Config.MaxAdminVehicles = true -- admin vehicles spawn with max vehcle settings \ No newline at end of file diff --git a/[esx]/es_extended/fxmanifest.lua b/[esx]/es_extended/fxmanifest.lua index 42ecb286..62081532 100644 --- a/[esx]/es_extended/fxmanifest.lua +++ b/[esx]/es_extended/fxmanifest.lua @@ -5,7 +5,7 @@ game 'gta5' description 'ES Extended' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_scripts { 'locale.lua', diff --git a/[esx]/es_extended/server/functions.lua b/[esx]/es_extended/server/functions.lua index a9df8d1b..33111355 100644 --- a/[esx]/es_extended/server/functions.lua +++ b/[esx]/es_extended/server/functions.lua @@ -253,6 +253,10 @@ function ESX.GetPlayerFromIdentifier(identifier) end function ESX.GetIdentifier(playerId) + local fxDk = GetConvarInt('sv_fxdkMode', 0) + if fxDk == 1 then + return "ESX-DEBUG-LICENCE" + end for k, v in ipairs(GetPlayerIdentifiers(playerId)) do if string.match(v, 'license:') then local identifier = string.gsub(v, 'license:', '') diff --git a/[esx]/es_extended/server/onesync.lua b/[esx]/es_extended/server/onesync.lua index 0c1005db..039c721f 100644 --- a/[esx]/es_extended/server/onesync.lua +++ b/[esx]/es_extended/server/onesync.lua @@ -59,18 +59,22 @@ end ---@param model number|string ---@param coords vector3|table ---@param heading number +---@param autoMobile boolean +---@param Properties table ---@param cb function -function ESX.OneSync.SpawnVehicle(model, coords, heading, autoMobile, cb) - if type(model) == 'string' then model = joaat(model) end - local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z) - if type(autoMobile) ~= 'boolean' then - return - end - CreateThread(function() +function ESX.OneSync.SpawnVehicle(model, coords, heading, autoMobile, 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) + if type(autoMobile) ~= 'boolean' then + return + end + CreateThread(function() local Entity = autoMobile and Citizen.InvokeNative(`CREATE_AUTOMOBILE`, model, coords.x, coords.y, coords.z, heading) or CreateVehicle(model, coords, heading, true, true) while not DoesEntityExist(Entity) do Wait(0) end + Entity(Entity).state:set('VehicleProperties', Properties, true) local netID = NetworkGetNetworkIdFromEntity(Entity) cb(netID) end) @@ -197,16 +201,6 @@ function ESX.OneSync.GetClosestVehicle(coords, modelFilter) return getClosestEntity(GetAllVehicles(), coords, modelFilter) end -ESX.RegisterServerCallback("esx:Onesync:SpawnVehicle", function(source, cb, model, coords, heading, autoMobile) - ESX.OneSync.SpawnVehicle(model, coords, heading, autoMobile, cb) -end) - ESX.RegisterServerCallback("esx:Onesync:SpawnObject", function(source, cb, model, coords, heading) ESX.OneSync.SpawnObject(model, coords, heading, cb) end) - --- for k,v in pairs(ESX.OneSync) do --- ESX.RegisterServerCallback("esx:Onesync:"..k, function(source, cb, ...) --- cb(v(...)) --- end) --- end \ No newline at end of file diff --git a/[esx]/es_extended/version.json b/[esx]/es_extended/version.json index a5592eb1..abbcc898 100644 --- a/[esx]/es_extended/version.json +++ b/[esx]/es_extended/version.json @@ -1,5 +1,5 @@ { "version": "legacy", - "commit" : "1.7.5", + "commit" : "1.8.5", "changelog": "\n- Add PlayerOveride System, ESX Notify, ESX Progressbar and ESX TextUI" } diff --git a/[esx]/esx_context/fxmanifest.lua b/[esx]/esx_context/fxmanifest.lua index d46be98c..e99c1cc2 100644 --- a/[esx]/esx_context/fxmanifest.lua +++ b/[esx]/esx_context/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' author 'ESX-Framework & Brayden' description 'Offical ESX Legacy Context Menu' lua54 'yes' -version '1.7.5' +version '1.8.5' ui_page 'index.html' diff --git a/[esx]/esx_identity/fxmanifest.lua b/[esx]/esx_identity/fxmanifest.lua index 158293d8..48f81e69 100644 --- a/[esx]/esx_identity/fxmanifest.lua +++ b/[esx]/esx_identity/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Identity' lua54 'yes' -version '1.7.6' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx]/esx_loadingscreen/fxmanifest.lua b/[esx]/esx_loadingscreen/fxmanifest.lua index 981795db..29f1e1d6 100644 --- a/[esx]/esx_loadingscreen/fxmanifest.lua +++ b/[esx]/esx_loadingscreen/fxmanifest.lua @@ -1,5 +1,5 @@ game 'common' -version '1.7.5' +version '1.8.5' fx_version 'cerulean' author 'ESX-Framework' lua54 'yes' diff --git a/[esx]/esx_menu_default/fxmanifest.lua b/[esx]/esx_menu_default/fxmanifest.lua index 9f92670f..693e7917 100644 --- a/[esx]/esx_menu_default/fxmanifest.lua +++ b/[esx]/esx_menu_default/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Menu Default' lua54 'yes' -version '1.7.5' +version '1.8.5' client_scripts {'@es_extended/imports.lua', 'client/main.lua'} diff --git a/[esx]/esx_menu_dialog/fxmanifest.lua b/[esx]/esx_menu_dialog/fxmanifest.lua index 918bbec1..9d64c0bb 100644 --- a/[esx]/esx_menu_dialog/fxmanifest.lua +++ b/[esx]/esx_menu_dialog/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Menu Dialog' lua54 'yes' -version '1.7.5' +version '1.8.5' client_scripts { '@es_extended/imports.lua', diff --git a/[esx]/esx_menu_list/fxmanifest.lua b/[esx]/esx_menu_list/fxmanifest.lua index 085762e8..bd098426 100644 --- a/[esx]/esx_menu_list/fxmanifest.lua +++ b/[esx]/esx_menu_list/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Menu List' lua54 'yes' -version '1.7.5' +version '1.8.5' client_scripts { '@es_extended/imports.lua', diff --git a/[esx]/esx_multicharacter/client/main.lua b/[esx]/esx_multicharacter/client/main.lua index fccdc5f2..840576b3 100644 --- a/[esx]/esx_multicharacter/client/main.lua +++ b/[esx]/esx_multicharacter/client/main.lua @@ -8,7 +8,7 @@ if ESX.GetConfig().Multichar then if NetworkIsPlayerActive(PlayerId()) then exports.spawnmanager:setAutoSpawn(false) DoScreenFadeOut(0) - while not GetResourceState('esx_menu_default') == 'started' do + while not GetResourceState('esx_context') == 'started' do Wait(0) end TriggerEvent("esx_multicharacter:SetupCharacters") @@ -114,7 +114,7 @@ if ESX.GetConfig().Multichar then end TriggerEvent('skinchanger:loadSkin', skin) end - DoScreenFadeIn(400) + DoScreenFadeIn(600) end) repeat Wait(200) until not IsScreenFadedOut() @@ -141,16 +141,88 @@ if ESX.GetConfig().Multichar then }) end + function CharacterOptions(Characters, slots, SelectedCharacter) + local elements = {{title = "Character: ".. Characters[SelectedCharacter.value].firstname .. " ".. Characters[SelectedCharacter.value].lastname,icon = "fa-regular fa-user", unselectable = true}, + {title = "Return", unselectable = false,icon = "fa-solid fa-arrow-left",description ="Return To Character Selection.", action = "return"}} + if not Characters[SelectedCharacter.value].disabled then + elements[3] = {title = _('char_play'), description ="Continue Into The City.", icon ="fa-solid fa-play",action = 'play', value = SelectedCharacter.value} + else + elements[3] = {title = _('char_disabled'), value = SelectedCharacter.value, icon ="fa-solid fa-xmark", description ="This Character Is Unusable.",} + end + if Config.CanDelete then elements[4] = {title = _('char_delete'),icon ="fa-solid fa-xmark",description ="Permanently Remove This Character.", action = 'delete', value = SelectedCharacter.value} end + ESX.OpenContext("left", elements, function(element, Action) + if Action.action == "play" then + SendNUIMessage({ + action = "closeui" + }) + ESX.CloseContext() + TriggerServerEvent('esx_multicharacter:CharacterChosen', Action.value, false) + elseif Action.action == "delete" then + ESX.CloseContext() + TriggerServerEvent('esx_multicharacter:DeleteCharacter', Action.value) + spawned = false + elseif Action.action == "return" then + SelectCharacterMenu(Characters, slots) + end + end, nil, true) + end + + function SelectCharacterMenu(Characters, slots) + local Character = next(Characters) + local elements = {{title = "Select A Character." , icon = "fa-solid fa-users", description = "Select a character to play as." , unselectable = true}} + for k,v in pairs(Characters) do + if not v.model and v.skin then + if v.skin.model then v.model = v.skin.model elseif v.skin.sex == 1 then v.model = mp_f_freemode_01 else v.model = mp_m_freemode_01 end + end + if spawned == false then SetupCharacter(Character) end + local label = v.firstname..' '..v.lastname + if Characters[k].disabled then + elements[#elements+1] = {title = label,icon = "fa-regular fa-user", value = v.id} + else + elements[#elements+1] = {title = label,icon = "fa-regular fa-user", value = v.id} + end + end + if #elements < slots then + elements[#elements+1] = {title = _('create_char'), icon = "fa-solid fa-plus", value = (#elements+1), new = true} + end + + ESX.OpenContext("left", elements, function(menu, SelectedCharacter) + if SelectedCharacter.new then + ESX.CloseContext() + local GetSlot = function() + for i = 1, slots do + if not Characters[i] then + return i + end + end + end + local slot = GetSlot() + TriggerServerEvent('esx_multicharacter:CharacterChosen', slot, true) + TriggerEvent('esx_identity:showRegisterIdentity') + local playerPed = PlayerPedId() + SetPedAoBlobRendering(playerPed, false) + SetEntityAlpha(playerPed, 0) + SendNUIMessage({ + action = "closeui" + }) + else + CharacterOptions(Characters,slots, SelectedCharacter) + SetupCharacter(SelectedCharacter.value) + local playerPed = PlayerPedId() + SetPedAoBlobRendering(playerPed, true) + ResetEntityAlpha(playerPed) + end + end, nil, true) + end RegisterNetEvent('esx_multicharacter:SetupUI') AddEventHandler('esx_multicharacter:SetupUI', function(data, slots) DoScreenFadeOut(0) Characters = data slots = slots - local elements = {} local Character = next(Characters) exports.spawnmanager:forceRespawn() - if Character == nil then + if not Character then SendNUIMessage({ action = "closeui" }) @@ -172,98 +244,7 @@ if ESX.GetConfig().Multichar then TriggerEvent('esx_identity:showRegisterIdentity') end) else - for k,v in pairs(Characters) do - if not v.model and v.skin then - if v.skin.model then v.model = v.skin.model elseif v.skin.sex == 1 then v.model = mp_f_freemode_01 else v.model = mp_m_freemode_01 end - end - if spawned == false then SetupCharacter(Character) end - local label = v.firstname..' '..v.lastname - if Characters[k].disabled then - elements[#elements+1] = {label = label, value = v.id} - else - elements[#elements+1] = {label = label, value = v.id} - end - end - if #elements < slots then - elements[#elements+1] = {label = _('create_char'), value = (#elements+1), new = true} - end - ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'selectchar', { - title = _('select_char'), - align = 'top-left', - elements = elements - }, function(data, menu) - local elements = {} - if not data.current.new then - if not Characters[data.current.value].disabled then - elements[1] = {label = _('char_play'), action = 'play', value = data.current.value} - else - elements[1] = {label = _('char_disabled'), value = data.current.value} - end - if Config.CanDelete then elements[2] = {label = _('char_delete'), action = 'delete', value = data.current.value} end - ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'choosechar', { - title = _('select_char'), - align = 'top-left', - elements = elements - }, function(data, menu) - if data.current.action == 'play' then - ESX.UI.Menu.CloseAll() - SendNUIMessage({ - action = "closeui" - }) - TriggerServerEvent('esx_multicharacter:CharacterChosen', data.current.value, false) - elseif data.current.action == 'delete' then - local elements2 = {} - elements2[1] = {label = _('cancel')} - elements2[2] = {label = _('confirm'), value = data.current.value} - ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'deletechar', { - title = _('delete_label', Characters[data.current.value].firstname, Characters[data.current.value].lastname), - align = 'center', - elements = elements2 - }, function(data, menu) - if data.current.value then - TriggerServerEvent('esx_multicharacter:DeleteCharacter', data.current.value) - spawned = false - ESX.UI.Menu.CloseAll() - else - menu.close() - end - end, function(data, menu) - menu.close() - end) - end - end, function(data, menu) - menu.close() - end) - else - ESX.UI.Menu.CloseAll() - local GetSlot = function() - for i = 1, slots do - if not Characters[i] then - return i - end - end - end - local slot = GetSlot() - TriggerServerEvent('esx_multicharacter:CharacterChosen', slot, true) - TriggerEvent('esx_identity:showRegisterIdentity') - end - end, function(data, menu) - menu.refresh() - end, function(data, menu) - if data.current.new then - local playerPed = PlayerPedId() - SetPedAoBlobRendering(playerPed, false) - SetEntityAlpha(playerPed, 0) - SendNUIMessage({ - action = "closeui" - }) - else - SetupCharacter(data.current.value) - local playerPed = PlayerPedId() - SetPedAoBlobRendering(playerPed, true) - ResetEntityAlpha(playerPed) - end - end) + SelectCharacterMenu(Characters, slots) end end) @@ -314,7 +295,8 @@ if ESX.GetConfig().Multichar then RegisterNetEvent('esx:onPlayerLogout') AddEventHandler('esx:onPlayerLogout', function() - DoScreenFadeOut(0) + DoScreenFadeOut(500) + Wait(1000) spawned = false TriggerEvent("esx_multicharacter:SetupCharacters") TriggerEvent('esx_skin:resetFirstSpawn') diff --git a/[esx]/esx_multicharacter/config.lua b/[esx]/esx_multicharacter/config.lua index 6ceb7dc6..9a2cb18f 100644 --- a/[esx]/esx_multicharacter/config.lua +++ b/[esx]/esx_multicharacter/config.lua @@ -16,7 +16,7 @@ if IsDuplicityVersion() then else -- Sets the location for the character selection scene -- To set the spawn location for new characters, modify the default value in the users SQL table - Config.Spawn = vector4(-113.7, 565.3, 195.2, 0) + Config.Spawn = vector4(-284.2856, 562.4627, 172.9182, 19.9895) -------------------- -- Do not use unless you are prepared to adjust your resources to correctly reset data diff --git a/[esx]/esx_multicharacter/fxmanifest.lua b/[esx]/esx_multicharacter/fxmanifest.lua index e6d8b176..83f55093 100644 --- a/[esx]/esx_multicharacter/fxmanifest.lua +++ b/[esx]/esx_multicharacter/fxmanifest.lua @@ -2,7 +2,7 @@ fx_version 'cerulean' game 'gta5' author 'ESX-Framework - Linden - KASH' description 'Official Multicharacter System For ESX Legacy' -version '1.7.5' +version '1.8.5' lua54 'yes' dependencies {'es_extended', 'esx_menu_default', 'esx_identity', 'esx_skin'} diff --git a/[esx]/esx_multicharacter/html/css/main.css b/[esx]/esx_multicharacter/html/css/main.css index 15fb9bc5..c8b969f1 100644 --- a/[esx]/esx_multicharacter/html/css/main.css +++ b/[esx]/esx_multicharacter/html/css/main.css @@ -1,9 +1,11 @@ @import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;600&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Oswald&display=swap'); * { margin: 0; padding: 0; user-select: none; color: rgb(255, 255, 255); + border-radius: 15px; font-weight: 300; font-size: 1.6vh; font-family: Calibri, "Helvetica", san-serif; @@ -25,25 +27,30 @@ body { display:none; position: absolute; top: 50%; - right: 25; + right: 150; transform: translate(0, -50%); - background: rgba(0,0,0,0.7); + border-radius: 15px; + background: rgba(15,15,15, 0.9); } .header { + font-family: 'Oswald', sans-serif; position: absolute; - top: 5%; + background: rgba(10, 10, 10, 0.9); + border-radius: 15px 15px 0px 0px; + height: 10%; + width: 100%; left: 50%; + text-align: center; transform: translate(-50%); - font-size: 1.1rem; + font-weight: 700; + padding-bottom: 5px; + font-size: 1.6rem; } .footer { position: absolute; - bottom: 5%; - left: 50%; - transform: translate(-50%); - font-size: 1.1rem; + font-size: 0rem; } .character-box { @@ -54,17 +61,16 @@ body { align-items: center; text-align: center; line-height: 1.4rem; - height: calc(100vh - 6rem); - width: 20rem; - padding: 1rem; - border: 1px rgba(12,12,12,200) solid; - box-shadow: 0px 0px 4px 1px rgba(12,12,12,20); + height: calc(30rem); + width: 17rem; + border: 1px rgba(10,10,10,0.7) solid; + box-shadow: 2px 1px 9px 3px rgba(10,10,10,0.7); } h1 { - font-family: 'Raleway', sans-serif; - padding-top: 2rem; + font-family: 'Oswald', sans-serif; + font-size: 22px; + padding-top: 1.3rem; display: block; - font-size: 1.3rem; - font-weight: 600; + font-weight: 0; } diff --git a/[esx]/esx_multicharacter/html/ui.html b/[esx]/esx_multicharacter/html/ui.html index 7b59ac89..3ca18eed 100644 --- a/[esx]/esx_multicharacter/html/ui.html +++ b/[esx]/esx_multicharacter/html/ui.html @@ -9,7 +9,7 @@
-
ESX Legacy
+
Character Info

diff --git a/[esx]/esx_multicharacter/locales/en.lua b/[esx]/esx_multicharacter/locales/en.lua index 2acccb10..946bd781 100644 --- a/[esx]/esx_multicharacter/locales/en.lua +++ b/[esx]/esx_multicharacter/locales/en.lua @@ -3,10 +3,10 @@ Locales["en"] = { ["female"] = "Female", ["delete_label"] = "Delete %s %s?", ["select_char"] = "Select Character", - ["create_char"] = "Create new character", - ["char_play"] = "Play this character", - ["char_disabled"] = "This character is disabled", - ["char_delete"] = "Delete this character", + ["create_char"] = "New Character", + ["char_play"] = "Play", + ["char_disabled"] = "Disabled", + ["char_delete"] = "Delete", ["cancel"] = "Cancel", ["confirm"] = "Confirm", ["command_setslots"] = "Set multicharacter slots number of a player", diff --git a/[esx]/esx_multicharacter/server/main.lua b/[esx]/esx_multicharacter/server/main.lua index 91e0317e..9dcc915f 100644 --- a/[esx]/esx_multicharacter/server/main.lua +++ b/[esx]/esx_multicharacter/server/main.lua @@ -213,6 +213,7 @@ elseif ESX.GetConfig().Multichar == true then end) RegisterNetEvent('esx_multicharacter:relog', function() + local source = source TriggerEvent('esx:playerLogout', source) end) diff --git a/[esx]/esx_notify/fxmanifest.lua b/[esx]/esx_notify/fxmanifest.lua index b2caeaaf..3776425d 100644 --- a/[esx]/esx_notify/fxmanifest.lua +++ b/[esx]/esx_notify/fxmanifest.lua @@ -1,7 +1,7 @@ fx_version 'adamant' lua54 'yes' game 'gta5' - +version '1.8.5' author 'ESX-Framework' description 'Official NUI Notification system for ESX' diff --git a/[esx]/esx_skin/fxmanifest.lua b/[esx]/esx_skin/fxmanifest.lua index 5fe02d56..9acffd2f 100644 --- a/[esx]/esx_skin/fxmanifest.lua +++ b/[esx]/esx_skin/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Skin' -version '1.7.5' +version '1.8.5' lua54 'yes' shared_script '@es_extended/imports.lua' diff --git a/[esx]/esx_textui/fxmanifest.lua b/[esx]/esx_textui/fxmanifest.lua index 700bd4c9..814fbc9e 100644 --- a/[esx]/esx_textui/fxmanifest.lua +++ b/[esx]/esx_textui/fxmanifest.lua @@ -1,6 +1,7 @@ fx_version 'adamant' game 'gta5' author 'ESX-Framework' +version '1.8.5' description 'ESX TextUI' lua54 'yes' client_scripts { 'TextUI.lua' } diff --git a/[esx]/skinchanger/fxmanifest.lua b/[esx]/skinchanger/fxmanifest.lua index 0ef661a1..438b0f25 100644 --- a/[esx]/skinchanger/fxmanifest.lua +++ b/[esx]/skinchanger/fxmanifest.lua @@ -6,7 +6,7 @@ lua54 'yes' description 'Official ESX-Legacy resource for handling the Player`s Skin' -version '1.7.5' +version '1.8.5' client_scripts { '@es_extended/locale.lua', diff --git a/[esx_addons]/esx_accessories/fxmanifest.lua b/[esx_addons]/esx_accessories/fxmanifest.lua index c54450d1..8d5fde13 100644 --- a/[esx_addons]/esx_accessories/fxmanifest.lua +++ b/[esx_addons]/esx_accessories/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Accessories' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_scripts { '@es_extended/imports.lua', diff --git a/[esx_addons]/esx_addonaccount/fxmanifest.lua b/[esx_addons]/esx_addonaccount/fxmanifest.lua index f7830b92..188cc635 100644 --- a/[esx_addons]/esx_addonaccount/fxmanifest.lua +++ b/[esx_addons]/esx_addonaccount/fxmanifest.lua @@ -5,7 +5,7 @@ game 'gta5' author 'ESX-Framework' description 'ESX Addon Account' lua54 'yes' -version '1.7.5' +version '1.8.5' server_scripts { '@es_extended/imports.lua', diff --git a/[esx_addons]/esx_addoninventory/fxmanifest.lua b/[esx_addons]/esx_addoninventory/fxmanifest.lua index 8b167b18..f90db4b4 100644 --- a/[esx_addons]/esx_addoninventory/fxmanifest.lua +++ b/[esx_addons]/esx_addoninventory/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Addon Inventory' lua54 'yes' -version '1.7.5' +version '1.8.5' server_scripts { '@es_extended/imports.lua', diff --git a/[esx_addons]/esx_allowlist/fxmanifest.lua b/[esx_addons]/esx_allowlist/fxmanifest.lua index 9798bf33..3c9c39e3 100644 --- a/[esx_addons]/esx_allowlist/fxmanifest.lua +++ b/[esx_addons]/esx_allowlist/fxmanifest.lua @@ -5,7 +5,7 @@ game 'gta5' author 'ESX-Framework' description 'Offical AllowList script for ESX' -version '1.7.5' +version '1.8.5' lua54 'yes' server_only 'yes' diff --git a/[esx_addons]/esx_ambulancejob/fxmanifest.lua b/[esx_addons]/esx_ambulancejob/fxmanifest.lua index 671fcedc..c5994db5 100644 --- a/[esx_addons]/esx_ambulancejob/fxmanifest.lua +++ b/[esx_addons]/esx_ambulancejob/fxmanifest.lua @@ -5,7 +5,7 @@ game 'gta5' description 'ESX Ambulance Job' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_scripts { '@es_extended/imports.lua', diff --git a/[esx_addons]/esx_animations/fxmanifest.lua b/[esx_addons]/esx_animations/fxmanifest.lua index e81b2e8c..746dc5dc 100644 --- a/[esx_addons]/esx_animations/fxmanifest.lua +++ b/[esx_addons]/esx_animations/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Animations' lua54 'yes' -version '1.7.5' +version '1.8.5' client_scripts { '@es_extended/imports.lua', diff --git a/[esx_addons]/esx_bankerjob/fxmanifest.lua b/[esx_addons]/esx_bankerjob/fxmanifest.lua index edbfeb95..d81b580f 100644 --- a/[esx_addons]/esx_bankerjob/fxmanifest.lua +++ b/[esx_addons]/esx_bankerjob/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Banker job' -version '1.7.5' +version '1.8.5' lua54 'yes' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_banking/README.md b/[esx_addons]/esx_banking/README.md index c9c3592b..d2f2e791 100644 --- a/[esx_addons]/esx_banking/README.md +++ b/[esx_addons]/esx_banking/README.md @@ -3,6 +3,13 @@ A beautiful and Easy-To-Use Banking & ATM system for ESX, with optional OX Target Support +## BANK UI +![esx_banking_pic1](https://user-images.githubusercontent.com/22717950/189738189-375101ac-c86b-4ce8-8df3-19d740c3809c.png) +## ATM UI +![esx_banking_pic2](https://user-images.githubusercontent.com/22717950/189738199-a325092b-5f1d-4c7f-8950-d660d053ed0f.png) +![esx_banking_pic3](https://user-images.githubusercontent.com/22717950/189738210-7af2c7d5-7fa1-4f70-8460-743ee9258f88.png) + + ## Special thanks: Gellipapa#9186,Rav3n95#2849,Csoki, csontvazharcos, Füsti, Pécé ## Download & Installation diff --git a/[esx_addons]/esx_banking/fxmanifest.lua b/[esx_addons]/esx_banking/fxmanifest.lua index d168de5f..25f0e83f 100644 --- a/[esx_addons]/esx_banking/fxmanifest.lua +++ b/[esx_addons]/esx_banking/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX banking' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_scripts { '@es_extended/imports.lua', diff --git a/[esx_addons]/esx_barbershop/fxmanifest.lua b/[esx_addons]/esx_barbershop/fxmanifest.lua index 8bd715f1..3d5fd75d 100644 --- a/[esx_addons]/esx_barbershop/fxmanifest.lua +++ b/[esx_addons]/esx_barbershop/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Barber Shop' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_basicneeds/fxmanifest.lua b/[esx_addons]/esx_basicneeds/fxmanifest.lua index baf765f0..b2211a85 100644 --- a/[esx_addons]/esx_basicneeds/fxmanifest.lua +++ b/[esx_addons]/esx_basicneeds/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Basic Needs' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_billing/fxmanifest.lua b/[esx_addons]/esx_billing/fxmanifest.lua index fbb08d6c..8b14e750 100644 --- a/[esx_addons]/esx_billing/fxmanifest.lua +++ b/[esx_addons]/esx_billing/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Billing' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_boat/fxmanifest.lua b/[esx_addons]/esx_boat/fxmanifest.lua index 95bd79a8..04b5afb4 100644 --- a/[esx_addons]/esx_boat/fxmanifest.lua +++ b/[esx_addons]/esx_boat/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Boat' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_clotheshop/fxmanifest.lua b/[esx_addons]/esx_clotheshop/fxmanifest.lua index 758250d2..2f1be7d9 100644 --- a/[esx_addons]/esx_clotheshop/fxmanifest.lua +++ b/[esx_addons]/esx_clotheshop/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Clothes Shop' -version '1.7.5' +version '1.8.5' lua54 'yes' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_cruisecontrol/fxmanifest.lua b/[esx_addons]/esx_cruisecontrol/fxmanifest.lua index c3ac9ed7..cc6a242a 100644 --- a/[esx_addons]/esx_cruisecontrol/fxmanifest.lua +++ b/[esx_addons]/esx_cruisecontrol/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'CruiseControl System for ESX' -version '1.7.5' +version '1.8.5' lua54 'yes' dependencies { 'es_extended' diff --git a/[esx_addons]/esx_datastore/fxmanifest.lua b/[esx_addons]/esx_datastore/fxmanifest.lua index 85acf49b..184b59c0 100644 --- a/[esx_addons]/esx_datastore/fxmanifest.lua +++ b/[esx_addons]/esx_datastore/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Data Store' lua54 'yes' -version '1.7.5' +version '1.8.5' server_scripts { '@es_extended/imports.lua', diff --git a/[esx_addons]/esx_dmvschool/fxmanifest.lua b/[esx_addons]/esx_dmvschool/fxmanifest.lua index 105bd487..285d7aa8 100644 --- a/[esx_addons]/esx_dmvschool/fxmanifest.lua +++ b/[esx_addons]/esx_dmvschool/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX DMV School' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_drugs/fxmanifest.lua b/[esx_addons]/esx_drugs/fxmanifest.lua index 97906627..e4ce5831 100644 --- a/[esx_addons]/esx_drugs/fxmanifest.lua +++ b/[esx_addons]/esx_drugs/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' lua54 'yes' description 'ESX Drugs' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_garage/fxmanifest.lua b/[esx_addons]/esx_garage/fxmanifest.lua index 6ed1c9fa..38f40da8 100644 --- a/[esx_addons]/esx_garage/fxmanifest.lua +++ b/[esx_addons]/esx_garage/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' author 'ESX-Framework' description 'Official ESX Garage System for ESX Legacy' -version '1.0.0' +version '1.8.5' lua54 'yes' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_holdup/fxmanifest.lua b/[esx_addons]/esx_holdup/fxmanifest.lua index 1851cf11..8389e8e5 100644 --- a/[esx_addons]/esx_holdup/fxmanifest.lua +++ b/[esx_addons]/esx_holdup/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Holdup' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_joblisting/README.md b/[esx_addons]/esx_joblisting/README.md index 97ad643b..a8e4cfd5 100644 --- a/[esx_addons]/esx_joblisting/README.md +++ b/[esx_addons]/esx_joblisting/README.md @@ -6,7 +6,7 @@ This Simple resource lets you finally contribute to Society and make a differenc esx_joblisting - virtual Job Center! -Copyright (C) 2015-2022 Jérémie N'gadi +Copyright (C) 2015-2022 Jérémie N'gadi, ESX-Framework This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version. diff --git a/[esx_addons]/esx_joblisting/client/main.lua b/[esx_addons]/esx_joblisting/client/main.lua index 94e7a053..5e958e13 100644 --- a/[esx_addons]/esx_joblisting/client/main.lua +++ b/[esx_addons]/esx_joblisting/client/main.lua @@ -1,82 +1,81 @@ -local menuIsShowed = false +local menuIsShowed, TextUIdrawing = false, false function ShowJobListingMenu() - menuIsShowed = true - ESX.TriggerServerCallback('esx_joblisting:getJobsList', function(jobs) - local elements = {} + menuIsShowed = true + ESX.TriggerServerCallback('esx_joblisting:getJobsList', function(jobs) + local elements = {{unselectable = "true", title = _U('job_center'), icon = "fas fa-briefcase"}} - for k,v in pairs(jobs) do - table.insert(elements, { - label = v.label, - job = k - }) - end + for i = 1, #(jobs) do + elements[#elements + 1] = {title = jobs[i].label, name = jobs[i].name} + end - ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'joblisting', { - title = _U('job_center'), - align = 'top-left', - elements = elements - }, function(data, menu) - TriggerServerEvent('esx_joblisting:setJob', data.current.job) - ESX.ShowNotification(_U('new_job')) - menuIsShowed = false - menu.close() - end, function(data, menu) - menuIsShowed = false - menu.close() - end) - - end) + ESX.OpenContext("right", elements, function(menu, SelectJob) + TriggerServerEvent('esx_joblisting:setJob', SelectJob.name) + ESX.CloseContext() + ESX.ShowNotification(_U('new_job', SelectJob.title), "success") + menuIsShowed = false + TextUIdrawing = false + end, function() + menuIsShowed = false + TextUIdrawing = false + end) + end) end -- Activate menu when player is inside marker, and draw markers CreateThread(function() - while true do - local Sleep = 1500 + while true do + local Sleep = 1500 - local coords = GetEntityCoords(PlayerPedId()) - local isInMarker = false + local coords = GetEntityCoords(ESX.PlayerData.ped) + local isInMarker = false - for i=1, #Config.Zones, 1 do - local distance = #(coords - Config.Zones[i]) + for i = 1, #Config.Zones, 1 do + local distance = #(coords - Config.Zones[i]) - if distance < Config.DrawDistance then - Sleep = 0 - DrawMarker(Config.MarkerType, Config.Zones[i], 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.ZoneSize.x, Config.ZoneSize.y, Config.ZoneSize.z, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, false, false, false) - end + if distance < Config.DrawDistance then + Sleep = 0 + DrawMarker(Config.MarkerType, Config.Zones[i], 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.ZoneSize.x, Config.ZoneSize.y, Config.ZoneSize.z, + Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, false, false, false) + end - if distance < (Config.ZoneSize.x / 2) then - isInMarker = true - ESX.ShowHelpNotification(_U('access_job_center')) - if IsControlJustReleased(0, 38) and not menuIsShowed then - ESX.UI.Menu.CloseAll() - ShowJobListingMenu() - end - end - end + if distance < (Config.ZoneSize.x / 2) then + isInMarker = true + if not TextUIdrawing then + ESX.TextUI(_U("access_job_center")) + TextUIdrawing = true + end + if IsControlJustReleased(0, 38) and not menuIsShowed then + ShowJobListingMenu() + ESX.HideUI() + end + end + end - if not isInMarker and menuIsShowed then - ESX.UI.Menu.CloseAll() - menuIsShowed = false - end + if not isInMarker and TextUIdrawing then + ESX.HideUI() + TextUIdrawing = false + end - Wait(Sleep) - end + Wait(Sleep) + end end) -- Create blips -CreateThread(function() - for i=1, #Config.Zones, 1 do - local blip = AddBlipForCoord(Config.Zones[i]) +if Config.Blip.Enabled then + CreateThread(function() + for i = 1, #Config.Zones, 1 do + local blip = AddBlipForCoord(Config.Zones[i]) - SetBlipSprite (blip, Config.Blip.Sprite) - SetBlipDisplay(blip, Config.Blip.Display) - SetBlipScale (blip, Config.Blip.Scale) - SetBlipColour (blip, Config.Blip.Colour) - SetBlipAsShortRange(blip, Config.Blip.ShortRange) + SetBlipSprite(blip, Config.Blip.Sprite) + SetBlipDisplay(blip, Config.Blip.Display) + SetBlipScale(blip, Config.Blip.Scale) + SetBlipColour(blip, Config.Blip.Colour) + SetBlipAsShortRange(blip, Config.Blip.ShortRange) - BeginTextCommandSetBlipName("STRING") - AddTextComponentSubstringPlayerName(_U('job_center')) - EndTextCommandSetBlipName(blip) - end -end) + BeginTextCommandSetBlipName("STRING") + AddTextComponentSubstringPlayerName(_U('blip_text')) + EndTextCommandSetBlipName(blip) + end + end) +end \ No newline at end of file diff --git a/[esx_addons]/esx_joblisting/config.lua b/[esx_addons]/esx_joblisting/config.lua index 5434d6a8..f26abe18 100644 --- a/[esx_addons]/esx_joblisting/config.lua +++ b/[esx_addons]/esx_joblisting/config.lua @@ -1,22 +1,22 @@ -Config = {} +Config = {} -Config.DrawDistance = 10.0 -Config.ZoneSize = {x = 2.7, y = 2.7, z = 0.5} -Config.MarkerColor = {r = 100, g = 200, b = 104} -Config.MarkerType = 27 +Config.DrawDistance = 15.0 +Config.ZoneSize = {x = 2.7, y = 2.7, z = 0.5} +Config.MarkerColor = {r = 100, g = 200, b = 104} +Config.MarkerType = 27 Config.Debug = ESX.GetConfig().EnableDebug - Config.Locale = GetConvar('esx:locale', 'en') Config.Zones = { - vector3(-265.08, -964.1, 30.3) + vector3(-265.08, -964.1, 30.3) } Config.Blip = { - Sprite = 407, - Display = 4, - Scale = 0.9, - Colour = 27, - ShortRange = true -} \ No newline at end of file + Enabled = true, + Sprite = 407, + Display = 4, + Scale = 0.8, + Colour = 27, + ShortRange = true +} diff --git a/[esx_addons]/esx_joblisting/esx_joblisting.sql b/[esx_addons]/esx_joblisting/esx_joblisting.sql index 21e24f6b..98493ad5 100644 --- a/[esx_addons]/esx_joblisting/esx_joblisting.sql +++ b/[esx_addons]/esx_joblisting/esx_joblisting.sql @@ -1,3 +1 @@ - - ALTER TABLE jobs add whitelisted BOOLEAN NOT NULL DEFAULT FALSE; \ No newline at end of file diff --git a/[esx_addons]/esx_joblisting/fxmanifest.lua b/[esx_addons]/esx_joblisting/fxmanifest.lua index 57f547dc..003ed8e7 100644 --- a/[esx_addons]/esx_joblisting/fxmanifest.lua +++ b/[esx_addons]/esx_joblisting/fxmanifest.lua @@ -3,7 +3,7 @@ game 'gta5' description 'ESX Job Listing' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_scripts { '@es_extended/imports.lua', diff --git a/[esx_addons]/esx_joblisting/locales/en.lua b/[esx_addons]/esx_joblisting/locales/en.lua index 0ca5861a..901e076f 100644 --- a/[esx_addons]/esx_joblisting/locales/en.lua +++ b/[esx_addons]/esx_joblisting/locales/en.lua @@ -1,5 +1,6 @@ Locales['en'] = { - ['new_job'] = 'you have a new job!', - ['access_job_center'] = 'press ~INPUT_PICKUP~ to access the job center.', - ['job_center'] = 'job Center', + ['new_job'] = 'New Job: ~b~%s~s~ !', + ['access_job_center'] = 'Press ~b~[E]~s~ To Open Job Selector.', + ['job_center'] = 'Select A Job.', + ["blip_text"] = "Job Centre" } diff --git a/[esx_addons]/esx_joblisting/server/main.lua b/[esx_addons]/esx_joblisting/server/main.lua index 83c5e330..987eb3a5 100644 --- a/[esx_addons]/esx_joblisting/server/main.lua +++ b/[esx_addons]/esx_joblisting/server/main.lua @@ -1,42 +1,47 @@ function getJobs() - local jobs = ESX.GetJobs() - local availableJobs = {} - for k,v in pairs(jobs) do - if v.whitelisted == false then - availableJobs[k] = {label = v.label} - end - end - return availableJobs + local jobs = ESX.GetJobs() + local availableJobs = {} + for k, v in pairs(jobs) do + if v.whitelisted == false then + availableJobs[#availableJobs + 1] = {label = v.label, name = k} + end + end + return availableJobs end ESX.RegisterServerCallback('esx_joblisting:getJobsList', function(source, cb) - local jobs = getJobs() - cb(jobs) + local jobs = getJobs() + cb(jobs) end) function IsNearCentre(player) - local Ped = GetPlayerPed(player) - local PedCoords = GetEntityCoords(Ped) - local Zones = Config.Zones + local Ped = GetPlayerPed(player) + local PedCoords = GetEntityCoords(Ped) + local Zones = Config.Zones + local Close = false - for i=1, #Config.Zones, 1 do - local distance = #(PedCoords - Config.Zones[i]) + for i = 1, #Config.Zones, 1 do + local distance = #(PedCoords - Config.Zones[i]) - if distance < Config.DrawDistance then - return true - end - end + if distance < Config.DrawDistance then + Close = true + end + end + + return Close end RegisterServerEvent('esx_joblisting:setJob') AddEventHandler('esx_joblisting:setJob', function(job) - local source = source - local xPlayer = ESX.GetPlayerFromId(source) - local jobs = getJobs() + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + local jobs = getJobs() - if xPlayer and IsNearCentre(source) then - if jobs[job] then - xPlayer.setJob(job, 0) - end - end + if xPlayer and IsNearCentre(source) then + if ESX.DoesJobExist(job, 0) then + xPlayer.setJob(job, 0) + else + print("[^1ERROR^7] Tried Setting User To Invalid Job - ^5"..job .."^7!") + end + end end) diff --git a/[esx_addons]/esx_jobs/fxmanifest.lua b/[esx_addons]/esx_jobs/fxmanifest.lua index c9f12897..fbe70ba9 100644 --- a/[esx_addons]/esx_jobs/fxmanifest.lua +++ b/[esx_addons]/esx_jobs/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Jobs' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_scripts { '@es_extended/imports.lua', diff --git a/[esx_addons]/esx_license/fxmanifest.lua b/[esx_addons]/esx_license/fxmanifest.lua index f74ffc24..66f1e7d0 100644 --- a/[esx_addons]/esx_license/fxmanifest.lua +++ b/[esx_addons]/esx_license/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX License' lua54 'yes' -version '1.7.5' +version '1.8.5' server_scripts { '@es_extended/imports.lua', diff --git a/[esx_addons]/esx_lscustom/fxmanifest.lua b/[esx_addons]/esx_lscustom/fxmanifest.lua index c5c446c8..606c3547 100644 --- a/[esx_addons]/esx_lscustom/fxmanifest.lua +++ b/[esx_addons]/esx_lscustom/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX LS Customs' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_mechanicjob/fxmanifest.lua b/[esx_addons]/esx_mechanicjob/fxmanifest.lua index 7b804083..f2387dc9 100644 --- a/[esx_addons]/esx_mechanicjob/fxmanifest.lua +++ b/[esx_addons]/esx_mechanicjob/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Mechanic Job' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_optionalneeds/fxmanifest.lua b/[esx_addons]/esx_optionalneeds/fxmanifest.lua index 6d83550a..a71d682b 100644 --- a/[esx_addons]/esx_optionalneeds/fxmanifest.lua +++ b/[esx_addons]/esx_optionalneeds/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Optional Needs' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_phone/fxmanifest.lua b/[esx_addons]/esx_phone/fxmanifest.lua index f26c67bf..4057735e 100644 --- a/[esx_addons]/esx_phone/fxmanifest.lua +++ b/[esx_addons]/esx_phone/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Phone' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_policejob/fxmanifest.lua b/[esx_addons]/esx_policejob/fxmanifest.lua index 0cad2317..811af374 100644 --- a/[esx_addons]/esx_policejob/fxmanifest.lua +++ b/[esx_addons]/esx_policejob/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Police Job' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_property/fxmanifest.lua b/[esx_addons]/esx_property/fxmanifest.lua index f8b1b1b3..66b82a63 100644 --- a/[esx_addons]/esx_property/fxmanifest.lua +++ b/[esx_addons]/esx_property/fxmanifest.lua @@ -22,8 +22,7 @@ lua54 'yes' author 'ESX-Framework' description 'Official ESX-Legacy Property System' - -version '1.8.0' +version '1.8.5' shared_scripts {'@es_extended/imports.lua', '@es_extended/locale.lua', 'locales/*.lua'} file "client/html/copy.html" diff --git a/[esx_addons]/esx_rpchat/fxmanifest.lua b/[esx_addons]/esx_rpchat/fxmanifest.lua index 29291252..ca78ea01 100644 --- a/[esx_addons]/esx_rpchat/fxmanifest.lua +++ b/[esx_addons]/esx_rpchat/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX RP Chat' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_service/fxmanifest.lua b/[esx_addons]/esx_service/fxmanifest.lua index f7b25aec..930b9475 100644 --- a/[esx_addons]/esx_service/fxmanifest.lua +++ b/[esx_addons]/esx_service/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' lua54 'yes' description 'ESX Service' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_shops/fxmanifest.lua b/[esx_addons]/esx_shops/fxmanifest.lua index 80f5444d..2aa240d0 100644 --- a/[esx_addons]/esx_shops/fxmanifest.lua +++ b/[esx_addons]/esx_shops/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Shops' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_sit/fxmanifest.lua b/[esx_addons]/esx_sit/fxmanifest.lua index efd53df6..ad508029 100644 --- a/[esx_addons]/esx_sit/fxmanifest.lua +++ b/[esx_addons]/esx_sit/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Sit' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_society/fxmanifest.lua b/[esx_addons]/esx_society/fxmanifest.lua index da1f69cb..7e332bed 100644 --- a/[esx_addons]/esx_society/fxmanifest.lua +++ b/[esx_addons]/esx_society/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Society' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_society/server/main.lua b/[esx_addons]/esx_society/server/main.lua index 3333099a..affefaaa 100644 --- a/[esx_addons]/esx_society/server/main.lua +++ b/[esx_addons]/esx_society/server/main.lua @@ -284,10 +284,13 @@ ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier if type == 'hire' then xTarget.showNotification(_U('you_have_been_hired', job)) + xPlayer.showNotification(_U("you_have_hired", xTarget.getName())) elseif type == 'promote' then xTarget.showNotification(_U('you_have_been_promoted')) + xPlayer.showNotification(_U("you_have_promoted", xTarget.getName())) elseif type == 'fire' then xTarget.showNotification(_U('you_have_been_fired', xTarget.getJob().label)) + xPlayer.showNotification(_U("you_have_fired", xTarget.getName())) end cb() @@ -303,6 +306,7 @@ ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier end end) + ESX.RegisterServerCallback('esx_society:setJobSalary', function(source, cb, job, grade, salary) local xPlayer = ESX.GetPlayerFromId(source) diff --git a/[esx_addons]/esx_status/fxmanifest.lua b/[esx_addons]/esx_status/fxmanifest.lua index cd977ce7..7d186ebc 100644 --- a/[esx_addons]/esx_status/fxmanifest.lua +++ b/[esx_addons]/esx_status/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Status' -version '1.7.5' +version '1.8.5' lua54 'yes' diff --git a/[esx_addons]/esx_taxijob/fxmanifest.lua b/[esx_addons]/esx_taxijob/fxmanifest.lua index c3e37c99..b969178d 100644 --- a/[esx_addons]/esx_taxijob/fxmanifest.lua +++ b/[esx_addons]/esx_taxijob/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Taxi Job' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_vehicleshop/client/main.lua b/[esx_addons]/esx_vehicleshop/client/main.lua index 98633626..b003dceb 100644 --- a/[esx_addons]/esx_vehicleshop/client/main.lua +++ b/[esx_addons]/esx_vehicleshop/client/main.lua @@ -228,18 +228,12 @@ function OpenShopMenu() menu2.close() menu.close() DeleteDisplayVehicleInsideShop() - - ESX.Game.SpawnVehicle(vehicleData.model, Config.Zones.ShopOutside.Pos, Config.Zones.ShopOutside.Heading, function(vehicle) - TaskWarpPedIntoVehicle(playerPed, vehicle, -1) - SetVehicleNumberPlateText(vehicle, generatedPlate) - - FreezeEntityPosition(playerPed, false) - SetEntityVisible(playerPed, true) - end) + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) else ESX.ShowNotification(_U('not_enough_money')) end - end, vehicleData.model, generatedPlate) + end, vehicleData.model, generatedPlate, IsThisModelACar(vehicleData.model)) end else menu2.close() diff --git a/[esx_addons]/esx_vehicleshop/fxmanifest.lua b/[esx_addons]/esx_vehicleshop/fxmanifest.lua index f46880e2..ef661f7e 100644 --- a/[esx_addons]/esx_vehicleshop/fxmanifest.lua +++ b/[esx_addons]/esx_vehicleshop/fxmanifest.lua @@ -6,7 +6,7 @@ lua54 'yes' description 'ESX Vehicle Shop' -version '1.7.5' +version '1.8.5' shared_script '@es_extended/imports.lua' diff --git a/[esx_addons]/esx_vehicleshop/server/main.lua b/[esx_addons]/esx_vehicleshop/server/main.lua index 40ddb1dc..8c4ae063 100644 --- a/[esx_addons]/esx_vehicleshop/server/main.lua +++ b/[esx_addons]/esx_vehicleshop/server/main.lua @@ -162,7 +162,7 @@ ESX.RegisterServerCallback('esx_vehicleshop:getVehicles', function(source, cb) cb(vehicles) end) -ESX.RegisterServerCallback('esx_vehicleshop:buyVehicle', function(source, cb, model, plate) +ESX.RegisterServerCallback('esx_vehicleshop:buyVehicle', function(source, cb, model, plate, automobile) local xPlayer = ESX.GetPlayerFromId(source) local modelPrice = getVehicleFromModel(model).price @@ -172,6 +172,9 @@ ESX.RegisterServerCallback('esx_vehicleshop:buyVehicle', function(source, cb, mo MySQL.insert('INSERT INTO owned_vehicles (owner, plate, vehicle) VALUES (?, ?, ?)', {xPlayer.identifier, plate, json.encode({model = joaat(model), plate = plate}) }, function(rowsChanged) xPlayer.showNotification(_U('vehicle_belongs', plate)) + ESX.OneSync.SpawnVehicle(joaat(model), Config.Zones.VehicleSpawnPoint.Pos, Config.Zones.VehicleSpawnPoint.Heading, automobile,{plate = plate}, function(vehicle) + TaskWarpPedIntoVehicle(GetPlayerPed(source), vehicle, -1) + end) cb(true) end) else diff --git a/[esx_addons]/esx_weaponshop/fxmanifest.lua b/[esx_addons]/esx_weaponshop/fxmanifest.lua index 9372ec1a..ed39b1d8 100644 --- a/[esx_addons]/esx_weaponshop/fxmanifest.lua +++ b/[esx_addons]/esx_weaponshop/fxmanifest.lua @@ -4,7 +4,7 @@ game 'gta5' description 'ESX Weapon Shop' lua54 'yes' -version '1.7.5' +version '1.8.5' shared_scripts { '@es_extended/imports.lua',