mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 02:01:31 +00:00
4267f1d915
commitfffe62c047Merge:35899761b7e5351fAuthor: Benzo <102178921+Benzo00@users.noreply.github.com> Date: Wed Jan 18 14:16:02 2023 +0100 Merge pull request #838 from Rav3n95/develop refactor(esx_banking) commit35899761baMerge:b09776b41d06e246Author: Benzo <102178921+Benzo00@users.noreply.github.com> Date: Wed Jan 18 13:56:51 2023 +0100 Merge pull request #834 from lexinor/patch-2 refactor(esx_service/server/main.lua): Added some new globalstate stuff and fixed stuff commitb09776b4c5Merge:3c4f81f918c4d704Author: Benzo <102178921+Benzo00@users.noreply.github.com> Date: Wed Jan 18 13:51:46 2023 +0100 Merge pull request #837 from esx-framework/esx_phone_removing build: remove esx_phone commit3c4f81f989Merge:3bc649d7935eb8f2Author: Benzo <102178921+Benzo00@users.noreply.github.com> Date: Wed Jan 18 13:40:43 2023 +0100 Merge pull request #843 from PoPoGH/main Create fr.lua commit935eb8f2d6Author: PoPo <76515395+PoPoGH@users.noreply.github.com> Date: Wed Jan 18 00:07:23 2023 +0100 Update fr.lua commit06d17a6ddfAuthor: PoPo <76515395+PoPoGH@users.noreply.github.com> Date: Wed Jan 18 00:06:03 2023 +0100 add french locale some improvements commit811636cb58Author: PoPo <76515395+PoPoGH@users.noreply.github.com> Date: Tue Jan 17 19:35:14 2023 +0100 Add French Language commit3b7e4281dcAuthor: PoPo <76515395+PoPoGH@users.noreply.github.com> Date: Tue Jan 17 15:09:10 2023 +0100 Create fr.lua commitb7e5351fcbAuthor: Csoki <feketetibi71@gmail.com> Date: Mon Jan 16 13:38:55 2023 +0100 fix(esx_banking/client): cant open if player death add 'esx:onPlayerDeath' event commit618eafc9a1Author: Csoki <feketetibi71@gmail.com> Date: Mon Jan 16 13:26:22 2023 +0100 Update README.md -remove: ox target support -format commit81c95b1a2bMerge:472f33bc2e8871ccAuthor: Csoki <feketetibi71@gmail.com> Date: Mon Jan 16 13:22:33 2023 +0100 Merge branch 'develop' of https://github.com/Rav3n95/esx-legacy into pr/838 commit472f33bcafAuthor: Csoki <feketetibi71@gmail.com> Date: Mon Jan 16 13:21:31 2023 +0100 refactor(esx_banking/client): refactor some if conditions commit8258d3fb6eAuthor: P Gergő <paldi95@gmail.com> Date: Sat Jan 14 22:48:06 2023 +0100 or 10 fix: distance condition commit2e8871cc95Author: P Gergő <paldi95@gmail.com> Date: Sat Jan 14 22:48:06 2023 +0100 or 10 commitc70cd30922Author: P Gergő <paldi95@gmail.com> Date: Sat Jan 14 22:39:06 2023 +0100 refactor(esx_banking) commit3bc649d76bMerge:3568d2bfd300c1f0Author: Gellipapa <gellerthorvath0@gmail.com> Date: Sat Jan 14 19:36:08 2023 +0100 Merge pull request #832 from Flambaa/feat/tr-locale feat(esx_accsessories): Add tr locales/translation commit18c4d704e1Author: Jean-Baptiste Devic <jean.baptiste.d06@gmail.com> Date: Sat Jan 14 13:52:41 2023 +0100 build: remove esx_phone commit3568d2bf07Merge:00c0006ec503b078Author: Csoki <feketetibi71@gmail.com> Date: Sat Jan 14 10:59:55 2023 +0100 Merge pull request #835 from esx-framework/tony-stark-17-patch-1 Send lastJob data to client commitc503b07805Author: Tony Stark <76168122+tony-stark-17@users.noreply.github.com> Date: Sat Jan 14 13:24:55 2023 +0530 Send lastJob data to client commit1d06e246abAuthor: Alessandro Alterno <28725795+lexinor@users.noreply.github.com> Date: Fri Jan 13 22:47:26 2023 +0100 Added some new globalstate stuff and fixed stuff - esx:playerDropped event was not working properly, source was not working, changed it to playerId - Added GlobalState[name] to make it easier to track onduty counters commitd300c1f09aAuthor: Flamba <denizakgxll@gmail.com> Date: Thu Jan 12 23:06:46 2023 +1100 feat(esx_accsessories): Add tr locales/translation commit00c0006e93Merge:cef3d217d822a902Author: Gellipapa <gellerthorvath0@gmail.com> Date: Wed Jan 11 00:41:02 2023 +0100 Merge pull request #830 from fivemland/fix-779-2 fix(esx_property): some fixes and refactor commitd822a90273Author: Csoki <feketetibi71@gmail.com> Date: Wed Dec 28 23:27:40 2022 +0100 fix(esx_multicharacter): update 'hu' locales # add missing locales # add new locales PR #777 commit58360836e7Author: Csoki <feketetibi71@gmail.com> Date: Wed Dec 28 23:13:09 2022 +0100 feat(esx_property): remove unused variables commit5ad4c1b2c0Author: Csoki <feketetibi71@gmail.com> Date: Wed Dec 28 23:03:45 2022 +0100 fix(esx_property): move 'es' locales to correct location commitd1e64919ffAuthor: Csoki <feketetibi71@gmail.com> Date: Wed Dec 28 22:56:50 2022 +0100 feat(esx_property): update native names commitcef3d2172fMerge:8030c9f999c8d116Author: Gellipapa <gellerthorvath0@gmail.com> Date: Mon Jan 9 23:31:05 2023 +0100 Merge pull request #794 from fivemland/society-refactor refactor(esx_society) commit8030c9f98fMerge:fda6249178200ceeAuthor: Gellipapa <gellerthorvath0@gmail.com> Date: Mon Jan 9 22:51:56 2023 +0100 Merge pull request #829 from Gellipapa/fix-2 fix(ex_extended locales.lua) fix nil value if change locales commit99c8d116b7Author: Csoki <feketetibi71@gmail.com> Date: Mon Jan 9 22:51:27 2023 +0100 fix commit78200cee9fAuthor: Gellipapa <gellerthorvath0@gmail.com> Date: Mon Jan 9 22:47:23 2023 +0100 fix nil value if change locales commit83833eb20cMerge:25016e8bfda62491Author: Csoki <feketetibi71@gmail.com> Date: Mon Jan 9 22:44:46 2023 +0100 Merge branch 'develop' into society-refactor commitfda62491f4Merge:e10494a3163dd3b0Author: Gellipapa <gellerthorvath0@gmail.com> Date: Mon Jan 9 22:27:09 2023 +0100 Merge pull request #799 from TheFantomas/main New year licenses 🎈 🎈 🎈 commite10494a382Merge:24d4556053d2aa56Author: Gellipapa <gellerthorvath0@gmail.com> Date: Mon Jan 9 22:08:00 2023 +0100 Merge pull request #601 from AstroNext/AstroNext refactor(esx_menu_default/client/main.lua): Change isControlePress to ESX.RegisterInput commit24d4556019Merge:191088c8f5e0115eAuthor: Jean-Baptiste <jean.baptiste.d06@gmail.com> Date: Mon Jan 9 19:41:21 2023 +0100 Merge pull request #823 from TheFantomas/main Add Feature Request and General Support commit191088c818Merge:58e48df521535af0Author: Jean-Baptiste <jean.baptiste.d06@gmail.com> Date: Mon Jan 9 19:36:46 2023 +0100 Merge pull request #827 from esx-framework/main make dev up to date commit58e48df514Author: Benzo <102178921+Benzo00@users.noreply.github.com> Date: Mon Jan 9 11:25:42 2023 +0100 Revert "Only show Default Inventory if Config enabled." This reverts commit1abd1fb5b4. commitee09e06f1dMerge:aa3032cf23705a13Author: JackDUpModZ <83776161+JackDUpModZ@users.noreply.github.com> Date: Mon Jan 9 10:09:29 2023 +0000 Merge pull request #824 from Rav3n95/develop Fix for #821 commitaa3032cf23Merge:b62be9eac75e3a14Author: JackDUpModZ <83776161+JackDUpModZ@users.noreply.github.com> Date: Mon Jan 9 10:08:40 2023 +0000 Merge pull request #826 from iSentrie/patch-8 fix(esx_lscustom): Added 5th engine level commitc75e3a1400Author: iSentrie <xvender7@gmail.com> Date: Mon Jan 9 11:29:25 2023 +0200 Added 5th engine level Fix for vehicles that has 5 engine upgrades, example `shinobi` Prevents errors commit23705a135fAuthor: P Gergő <69343477+Rav3n95@users.noreply.github.com> Date: Sun Jan 8 18:31:48 2023 +0100 Forgotten print commitdd634b66ccAuthor: P Gergő <69343477+Rav3n95@users.noreply.github.com> Date: Sun Jan 8 18:30:58 2023 +0100 Fixes commitf5e0115e1eAuthor: TheFarFantomas <thefarfantomas@gmail.com> Date: Sun Jan 8 17:55:09 2023 +0100 Add tag commit8b9fb47eb0Author: TheFarFantomas <thefarfantomas@gmail.com> Date: Sun Jan 8 17:53:29 2023 +0100 Support commit15d8a337a9Author: TheFarFantomas <thefarfantomas@gmail.com> Date: Sun Jan 8 17:50:40 2023 +0100 Feature request commit163dd3b01cMerge:ff5d728db62be9eaAuthor: TheFantomas <117121911+TheFantomas@users.noreply.github.com> Date: Sun Jan 8 17:33:26 2023 +0100 Merge branch 'develop' into main commitb62be9ea91Merge:13be75143ce03968Author: JackDUpModZ <83776161+JackDUpModZ@users.noreply.github.com> Date: Sun Jan 8 16:09:36 2023 +0000 Merge pull request #813 from zinzin92/main Create fr.lua commit13be751437Merge:ddd19d0feffd9858Author: JackDUpModZ <83776161+JackDUpModZ@users.noreply.github.com> Date: Sun Jan 8 16:07:54 2023 +0000 Merge pull request #778 from johnsoul777/main Fix Translate Saving commitddd19d0ff1Merge:c501f3f5c4cc9843Author: JackDUpModZ <83776161+JackDUpModZ@users.noreply.github.com> Date: Sun Jan 8 16:04:27 2023 +0000 Merge pull request #811 from BeansFL/patch-3 Update de.lua commitc501f3f565Merge:86d03e7b56992cd8Author: JackDUpModZ <83776161+JackDUpModZ@users.noreply.github.com> Date: Sun Jan 8 16:03:55 2023 +0000 Merge pull request #810 from BeansFL/patch-1 Update de.lua commit86d03e7bc9Merge:ae8d408be9e761b0Author: JackDUpModZ <83776161+JackDUpModZ@users.noreply.github.com> Date: Sun Jan 8 16:02:40 2023 +0000 Merge pull request #816 from Zan1456/patch-3 Create ui_hu.html commitae8d408b2fMerge:7f53c705de666f1bAuthor: JackDUpModZ <83776161+JackDUpModZ@users.noreply.github.com> Date: Sun Jan 8 16:01:08 2023 +0000 Merge pull request #815 from Zan1456/patch-2 Create questions_hu.js commit7f53c70502Merge:63c06c0bba4820c0Author: JackDUpModZ <83776161+JackDUpModZ@users.noreply.github.com> Date: Sun Jan 8 15:58:58 2023 +0000 Merge pull request #814 from Zan1456/patch-1 Update hu.lua commit63c06c0b96Merge:8c47f5fa36d05607Author: JackDUpModZ <83776161+JackDUpModZ@users.noreply.github.com> Date: Sun Jan 8 15:56:01 2023 +0000 Merge pull request #812 from BeansFL/patch-4 Update de.lua commit8c47f5fa56Merge:46fc5f4381306d50Author: JackDUpModZ <83776161+JackDUpModZ@users.noreply.github.com> Date: Sun Jan 8 15:51:11 2023 +0000 Merge pull request #789 from Cartman117/patch-1 fix(esx_mechanicjob): Translation & Spawn vehicle from garage commit46fc5f4326Merge:ba08825e842f221bAuthor: JackDUpModZ <83776161+JackDUpModZ@users.noreply.github.com> Date: Sun Jan 8 15:49:02 2023 +0000 Merge pull request #798 from Mojito-Fivem/patch-1 Update readme.md commitba08825eefMerge:a8c424f72a659184Author: JackDUpModZ <83776161+JackDUpModZ@users.noreply.github.com> Date: Sun Jan 8 15:48:49 2023 +0000 Merge pull request #793 from fivemland/vehicleshop-refactor refactor(esx_vehicleshop) commita8c424f738Merge:90c977791abd1fb5Author: Benzo <102178921+Benzo00@users.noreply.github.com> Date: Sun Jan 8 10:56:03 2023 +0100 Merge pull request #818 from Kuuzoo/patch-1 Only show Default Inventory if Config enabled. commit90c97779cbMerge:5362966877de399bAuthor: Benzo <102178921+Benzo00@users.noreply.github.com> Date: Sun Jan 8 10:55:38 2023 +0100 Merge pull request #808 from QB-Extended/main feat(es_extended): add message to event commit1abd1fb5b4Author: Kuuzoo <81863846+Kuuzoo@users.noreply.github.com> Date: Fri Jan 6 23:01:10 2023 +0100 Only show Default Inventory if Config enabled. On Itme Remove/Add the Default Inventory will now only show if enabled in the es_extended Config! commite9e761b065Author: Zan <62830223+Zan1456@users.noreply.github.com> Date: Fri Jan 6 11:46:26 2023 +0100 Create ui_hu.html commitde666f1b92Author: Zan <62830223+Zan1456@users.noreply.github.com> Date: Fri Jan 6 11:46:02 2023 +0100 Create questions_hu.js commitba4820c0a2Author: Zan <62830223+Zan1456@users.noreply.github.com> Date: Fri Jan 6 11:42:08 2023 +0100 Update hu.lua commit3ce03968dbAuthor: Zinzin92 <kevin-descours@outlook.fr> Date: Thu Jan 5 12:16:02 2023 +0100 Create fr.lua commit36d05607ebAuthor: BeansFL <106496863+BeansFL@users.noreply.github.com> Date: Thu Jan 5 03:26:47 2023 +0100 Update de.lua commitc4cc9843d5Author: BeansFL <106496863+BeansFL@users.noreply.github.com> Date: Thu Jan 5 03:09:31 2023 +0100 Update de.lua commit56992cd8bcAuthor: BeansFL <106496863+BeansFL@users.noreply.github.com> Date: Thu Jan 5 02:57:03 2023 +0100 Update de.lua commit77de399b99Author: Mycroft <kaseyfitton@hotmail.co.uk> Date: Wed Jan 4 19:58:43 2023 +0000 fix: more race condition fixing commit3892aa9b8fAuthor: Mycroft <kaseyfitton@hotmail.co.uk> Date: Wed Jan 4 18:59:30 2023 +0000 fix: society race conditions commit43fe788a2bAuthor: Mycroft <kaseyfitton@hotmail.co.uk> Date: Wed Jan 4 18:52:48 2023 +0000 refactor(esx_society): allow registering society with exports commitc732d79263Author: Mycroft <kaseyfitton@hotmail.co.uk> Date: Wed Jan 4 18:50:34 2023 +0000 tweak(esx_society): better readme commite9e4fa0205Author: Mycroft <kaseyfitton@hotmail.co.uk> Date: Wed Jan 4 00:17:51 2023 +0000 fix(es_extended): print formatting commit5b2509b2faAuthor: Mycroft <kaseyfitton@hotmail.co.uk> Date: Tue Jan 3 23:14:27 2023 +0000 feat(es_extended): add message to event commitff5d728d29Merge:63215f7ee0f55fc5Author: TheFantomas <117121911+TheFantomas@users.noreply.github.com> Date: Mon Jan 2 21:01:20 2023 +0100 Merge branch 'develop' into main commit63215f7e2dAuthor: TheFarFantomas <thefarfantomas@gmail.com> Date: Mon Jan 2 19:00:01 2023 +0100 Edit date in esx_identity commit25441de8b3Author: TheFarFantomas <thefarfantomas@gmail.com> Date: Mon Jan 2 18:57:43 2023 +0100 New year licenses commit842f221b34Author: Liam Dormon <66041893+Mojito-Fivem@users.noreply.github.com> Date: Mon Jan 2 17:06:59 2023 +0000 Update readme.md commiteffd985898Author: AL1ƎN <72218928+johnsoul777@users.noreply.github.com> Date: Fri Dec 30 15:56:21 2022 +0100 Create es.js commit0bc5589679Merge:92b111cb17f96a74Author: AL1ƎN <72218928+johnsoul777@users.noreply.github.com> Date: Fri Dec 30 15:55:12 2022 +0100 Merge branch 'esx-framework:main' into main commit25016e8b4dAuthor: Csoki <feketetibi71@gmail.com> Date: Fri Dec 30 12:06:18 2022 +0100 refactor(esx_society): main/server.lua commita759b4d74bAuthor: Csoki <feketetibi71@gmail.com> Date: Fri Dec 30 12:06:00 2022 +0100 fix(esx_society): invalid job bug commit93d8a11aafAuthor: Csoki <feketetibi71@gmail.com> Date: Fri Dec 30 11:28:11 2022 +0100 feat(esx_policejob): add esx_proprty dependency commit88bbaa1282Author: Csoki <feketetibi71@gmail.com> Date: Fri Dec 30 11:27:10 2022 +0100 fix(esx_society): fix invalid job bug commitd572f1acb0Author: Csoki <feketetibi71@gmail.com> Date: Fri Dec 30 11:15:36 2022 +0100 feat(esx_society): add missing locales commit2a659184d6Author: Csoki <feketetibi71@gmail.com> Date: Fri Dec 30 10:41:57 2022 +0100 refactor(esx_vehicleshop): main/client.lua commit6212076bd4Author: Csoki <feketetibi71@gmail.com> Date: Fri Dec 30 10:24:19 2022 +0100 fix(esx_vehicleshop): 'hu' locales commitfbbd6eb66aAuthor: Csoki <feketetibi71@gmail.com> Date: Fri Dec 30 10:01:51 2022 +0100 refactor(esx_vehicleshop): server/main.lua commit43f44a052fAuthor: Csoki <feketetibi71@gmail.com> Date: Fri Dec 30 09:43:27 2022 +0100 refactor(esx_vehicleshop): GeneratePlate(), IsPlateTaken() commit81306d503bAuthor: Cartman117 <121615906+Cartman117@users.noreply.github.com> Date: Thu Dec 29 14:02:01 2022 +0100 fix(esx_mechanicjob): French translation commite6481e106eAuthor: Cartman117 <121615906+Cartman117@users.noreply.github.com> Date: Thu Dec 29 13:42:48 2022 +0100 fix(esx_mechanicjob): Spawn vehicule from garage If Config.EnableSocietyOwnedVehicles = true, spawning vehicule from garage wasn't possible because element.value = 'vehicle_list' but we want vehicule's informations (element2.value) commit92b111cbc0Author: AL1ƎN <72218928+johnsoul777@users.noreply.github.com> Date: Wed Dec 28 12:44:39 2022 +0100 Fix Translate Saving Fix Translate Saving commit53d2aa56eeAuthor: Amir_Lynx <60301485+AmirLynx@users.noreply.github.com> Date: Sat Oct 29 17:26:49 2022 +0330 change isControlePress to registerInput
ESX Imports
Similar to importing the ESX locale functions or MySQL-Async, there is now an import for ESX
- Define
shared_script '@es_extended/imports.lua'above all other scripts in your fxmanifest - This will define the ESX object for both the client and server
The following event handler will also be created on the client
AddEventHandler('esx:setPlayerData', function(key, val)
if GetInvokingResource() == 'es_extended' then
ESX.PlayerData[key] = val
if OnPlayerData ~= nil then OnPlayerData(key, val) end
end
end)
- You will now receive updated ESX.PlayerData values whenever they change
- This does not include inventory or loadout data and it should still be retrieved with
ESX.GetPlayerData() - You can add your own functions to the import if you believe they will be useful in your resources
- You can trigger certain events or functions based on the key and value received (example in client.lua)
- The idea of this function is ensuring up-to-date values for
job, accounts, ped, and dead - You can set any data this way if you want to share it between resources
- Using
ESX.SetPlayerData('cuffed', true)will create and set a new value that you can now reference anywhere - If you are using OneSync you could set certain values to set a state bag (useful for other players to reference)
- Using
- This does not include inventory or loadout data and it should still be retrieved with
Replacement for ESX.GetPlayers()
Old resources would utilise the ESX.GetPlayers() function in a loop with ESX.GetPlayerFromId() to retrieve xPlayer data
- This can be referred to as an xPlayer loop, and has been the cause for server hitches in resources such as esx_society and esx_status
- It is commonly used in robbery scripts to get the active number of cops, or for determining the number of EMS in other places
This method is outdated and should be replaced if you are using ESX Legacy
local xPlayers = ESX.GetPlayers()
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == 'police' then
TriggerClientEvent('esx:showNotification', xPlayers[i], 'You are a cop!')
end
end
This new method retrieves all xPlayer data at once, reducing the number of function references being called
local xPlayers = ESX.GetExtendedPlayers() -- Returns all xPlayers
for _, xPlayer in pairs(xPlayers) do
if xPlayer.job.name == 'police' then
TriggerClientEvent('esx:showNotification', xPlayer.source, 'You are a cop!')
end
end
local xPlayers = ESX.GetExtendedPlayers('job', 'police') -- Returns xPlayers with the police job
for _, xPlayer in pairs(xPlayers) do
TriggerClientEvent('esx:showNotification', xPlayer.source, 'You are a cop!')
end