Commit Graph

7022 Commits

Author SHA1 Message Date
Ilias Rbayti e51aaae1b1 Added 'coordinate' arg type for ESX.RegisterCommand() 2023-08-15 14:48:54 +02:00
Ilias Rbayti 89a75bcc39 Eliminate the need for matching namespace & resource name
When the Menu.Open function is called, a new key-value pair labeled "resourceName" is now added to the menu object. This addition serves the purpose of capturing and storing the invoking resource's name that triggers the function by calling the GetInvokingResource() native.

By implementing this change, we establish a more direct and reliable method for checking the "resourceName" key within the menu object. This approach eliminates the need to solely rely on matching the namespace and resource name. As a result, the code becomes more robust and less prone to errors.
2023-08-14 23:29:24 +02:00
Epyi adf15e0ee3 fix(client/main.lua) Noclip not use locale 2023-08-12 22:18:08 +02:00
Ilias Rbayti ce90c6bc47 fix(ESX.UI): Close Opened Menus on Resource Stop
I have encountered several frustrating instances when accidentally restarting a script that still had an open ESX UI. This situation prevents the UI from closing properly and leads to a cascade of errors, ultimately forcing a game restart. To address this issue, I propose the following code changes.

The code introduces an event handler for the onResourceStop event, enabling us to loop through all open ESX UIs and identify any opened menus within the same namespace as the resource name. Following the best practice, the namespace should ideally align with the resource name.

I believe implementing these changes will provide a smoother user experience. I look forward to your feedback and merging these improvements into the main branch.
2023-08-07 21:45:58 +02:00
Only 33483cb0cf updated README files
updated the documentation urls
2023-08-07 21:28:41 +02:00
YOMAN1792 c6df3e5eb6 Update fr.lua
Fix some translation
2023-08-06 19:19:35 -04:00
YOMAN1792 9f29dc6768 Update fr.lua
Add missing translation and removed translation that were not needed.
2023-08-05 12:37:57 -04:00
Gellipapa ecc7d122e3 Merge pull request #1138 from MoskalykA/slight-optimisation
refactor: slight optimisation
2023-07-31 21:08:13 +02:00
MoskalykA cead0aa431 refactor: slight optimisation 2023-07-30 13:44:04 +02:00
Gellipapa 0365c2816c Merge pull request #1132 from MoskalykA/old-version
refactor: delete an obsolete file
2023-07-29 16:34:21 +02:00
Katoteki 3ac80fe218 Update player.lua
idk what happened, now good
2023-07-27 19:24:29 +02:00
Katoteki b114c7e998 Update player.lua 2023-07-27 19:19:12 +02:00
Katoteki d67a32ad92 Update player.lua 2023-07-27 19:17:28 +02:00
Gellipapa 7fc81984ad Merge pull request #1128 from MoskalykA/less-calculations
refactor: less calculations
2023-07-27 09:57:07 +02:00
Gellipapa 4040ee4e1a Merge pull request #1119 from CanysLypys/main
Fixing getNearbyPlayers function source definition
2023-07-27 09:38:29 +02:00
MoskalykA 7635598b13 refactor: delete an obsolete file 2023-07-27 03:35:05 +02:00
Thekuca 6bc7d418af fix 2023-07-26 23:35:25 +02:00
Katoteki df93efb778 Update player.lua
fix for `subValue` arg in `setMeta` function
2023-07-26 21:35:39 +02:00
Gellipapa da530d6ce9 Merge pull request #1130 from ItsKuf/main
🚀 Enhanced ESX Core Cron Task Handling
2023-07-26 19:21:42 +02:00
TheFantomas 804b8ac505 Merge pull request #1129 from MoskalykA/correction-of-lint-errors
refactor: correction of lint errors
2023-07-26 18:19:37 +02:00
Gellipapa a95e0397b0 Add new or update workflow 2023-07-26 15:15:42 +02:00
ItsKuf ea14a80fa0 🚀 Enhanced ESX Core Cron Task Handling
Description:
This commit brings substantial enhancements to the time handling functionality in the 'esx_core/[core]/cron/server/main.lua' script for the FiveM server:

- Utilized Unix Timestamps: Replaced the existing `GetTime()` function with `GetUnixTimestamp()`, ensuring precise time representation by using the Unix timestamp format (seconds since January 1, 1970). This change mitigates potential issues related to Daylight Saving Time (DST) transitions.

- Refined Task Execution Logic: The `OnTime` function has been refactored to operate based on Unix timestamps, ensuring accurate execution of scheduled tasks without any inconsistencies due to local time conversions.

By introducing these improvements, the cron-like system now operates with enhanced accuracy, bolstering the stability and predictability of scheduled events on the FiveM server. Extensive testing has been conducted to guarantee compatibility with various server environments.
2023-07-26 09:52:33 +01:00
MoskalykA fb160f4f0d refactor: correction of lint errors 2023-07-26 05:06:52 +02:00
MoskalykA 74d7d7e6f6 refactor: less calculations 2023-07-26 04:58:55 +02:00
Canis_Lupus b6e1c4deba Updating getNearbyPlayers
- Added an 'early' return with an empty table if the source or the playerCoord are not given.
2023-07-24 19:58:27 +02:00
Gellipapa 7fa110c9b2 Merge pull request #1125 from 1nexis/patch-2
fixed setjob logs
2023-07-24 17:57:42 +02:00
nexis 0273c9dfc0 fixed setjob logs
Setjob logs were not working/false
2023-07-24 15:35:12 +02:00
Gellipapa a61eb8b099 Merge pull request #1122 from Gellipapa/main
🚑 fix register commands handle optional args
2023-07-24 10:26:59 +02:00
Gellipapa c995a29288 🚑 fix register commands handle optional args 2023-07-23 19:04:07 +02:00
TheFantomas 054f720390 Merge pull request #1121 from tekkenkkk/typo
fix(es_extended/client): fix RemoveHudCommonents typo
2023-07-23 15:19:14 +02:00
tekken 560a702861 typo 2023-07-23 08:32:07 +02:00
Canis_Lupus 30d497500d Fixing getNearbyPlayers source definition (updated)
The requested features are now included. playerPed and playerCoords do have now two different locals for better orientation and included nil checking for the function.
2023-07-21 00:50:16 +02:00
Gellipapa 87cccc11ca Merge pull request #1102 from epyidev/dev
Add repair command
2023-07-21 00:08:58 +02:00
Gellipapa bc11ea660c Merge pull request #1108 from wornysek/main
Added start items feature
2023-07-20 23:42:26 +02:00
TheFantomas da06117403 fix(es_extended/function): Fix esx_contex to esx_context 2023-07-20 13:33:36 +02:00
Canis_Lupus ef8f806045 Fixing getNearbyPlayers function
By using the function you see the following:

source = GetPlayerPed(source)
-- So source is now the playerPed

source = GetEntityCoords(GetPlayerPed(source))
-- The source is getting new defined by calling the entity coords from the playerPed and then the playerPed once again.
2023-07-18 19:01:31 +02:00
Gellipapa a6ad55a1e1 change default StartingInventoryItem to false 2023-07-17 21:12:59 +02:00
Gellipapa c99ab5d242 Merge pull request #1118 from FilipeCuco/main
Enhanced xPlayer Metadata Management Function
2023-07-17 20:59:42 +02:00
Thekuca 6f5cdcb045 ♻️(client/functions): context functions 2023-07-17 14:35:00 +02:00
TheFantomas c4a82b464e refactor(es_extended/config.weapons.lua): Fix and add all heavyrifle components 2023-07-16 15:05:01 +02:00
TheFantomas a4c276af50 feat(es_extended/locales): Add locale for weapon_heavyrifle 2023-07-16 14:46:56 +02:00
TheFantomas eaa6cf4f30 Merge pull request #1116 from Cookiieezz/main
feat(es_extended/config.weapons.lua): Added new weapon weapon_heavyrifle
2023-07-16 14:37:23 +02:00
TheFantomas 07f3ab771e Formatting 2023-07-16 14:00:43 +02:00
FilipeCuco 6364152c5c Enhanced xPlayer Metadata Management Function
Support for Clearing Specific Value:
You can now use the "clearMeta" function to remove a specific value associated with an index. By providing the "index" and the "subValue" (as a string), the function will remove that specific value from the metadata table.

Support for Clearing Multiple Values:
The function has been expanded to allow the removal of multiple values simultaneously. By passing a table of "subValues" to the function, you can specify several values to clear from the metadata table associated with a particular index.

Handling Entire Index Value:
If no "subValues" are provided, the function will clear the entire value associated with the given "index." This allows you to wipe out all the data related to that particular index.

-- Clear the "level" value within the "player1" index
self.clearMeta("player1", "level")

-- Clear the "score" and "level" values within the "player1" index
self.clearMeta("player1", {"score", "level"})

-- Clear the entire value associated with "player1" index
self.clearMeta("player1")
2023-07-15 21:44:01 +01:00
Csoki 2f7d9c7ad6 Merge pull request #1114 from dolutattoo/dev
refactor(esx_multicharacter/client): Smoother spawn transition
2023-07-15 22:05:22 +02:00
thefourCraft 30ffd6ab4f fix unfinished string 2023-07-15 22:34:46 +03:00
thefourCraft 15965ebdf1 Merge branch 'hebrew' of https://github.com/IMS-Network/esx-legacy into hebrew 2023-07-15 22:32:39 +03:00
thefourCraft 1c8153eacc fix format 2023-07-15 22:29:12 +03:00
thefourCraft 2fc6ee8504 Update he.lua
Signed-off-by: thefourCraft <me@thefourcraft.com>
2023-07-15 22:00:16 +03:00
thefourCraft e945580e1e fix format 2023-07-15 21:55:42 +03:00