64 Commits

Author SHA1 Message Date
_Not_ 2f7bada4ab Merge pull request #1864 from esx-framework/v1.14.1
Bump legacy version to 1.14.1
2026-08-16 07:58:08 -05:00
_Not_ 53ee758fd8 Merge pull request #1827 from seltonmt012/fix/locale-string-invalid-utf8
fix(es_extended/shared): return false instead of raising on invalid utf8
2026-08-14 19:47:23 -05:00
Ihsan 4a22b68511 refactor(commands): simplify group filtering and update deprecation notice for AdminGroups 2026-08-08 00:16:03 +05:30
Ihsan e85b05558c feat: per-command group permissions for admin commands 2026-08-05 13:54:44 +05:30
Selt d264553490 fix(es_extended/shared): return false instead of raising on invalid utf8
ESX.IsValidLocaleString only checks that the argument is a string, but a Lua
string is a byte array and need not be valid utf8. utf8.codes raises on a
malformed sequence rather than stopping, so the function throws where its
annotation promises a boolean.

esx_identity feeds raw client input into it through checkNameFormat, so a
modified client sending a lone 0xFF byte as a first name aborts the
registerIdentity callback before cb() runs. The client is left waiting on a
promise that never resolves and cannot get past the identity screen, and it
can be repeated at will.

utf8.len returns nil instead of raising, so it is enough to reject the string
up front.

Verified on artifact 25770: "Jo\255hn" used to raise "invalid UTF-8 code" and
now returns false. "John" still returns true, "Jo!hn" still returns false, and
"Jo3hn" with allowDigits still returns true.
2026-07-27 16:17:28 +02:00
ASTROWwwW 567ee506a1 feat(es_extended): fall back to English for missing locale keys
When a key is absent from the active locale, Translate now borrows the English string instead of returning a placeholder. Locale loading is factored out so the target and English tables are lazily cached. Toggle with the esx:localeFallback convar (on by default) or per-resource Config.LocaleFallback.
2026-07-21 16:50:25 +02:00
_Not_ 915332b092 Fix typo in ESX.Table.SizeOf assignment in compat.lua 2026-07-16 00:58:00 -05:00
_Not_ 9a4c492b51 Add initialization for ESX.Table in compat.lua 2026-07-16 00:55:38 -05:00
_Not_ 51ada6d4f5 Merge remote-tracking branch 'Snail/esx_lib' into 1.14.0 2026-07-15 23:44:49 -05:00
SNAILX d3868429ed Moved esx.table from the core to esx_lib 2026-06-15 02:08:30 +01:00
Stane034 7772bc5277 hotfixes 2025-10-26 21:45:29 +01:00
Stane034 d5f8feafae Moved Timeouts and Await to esx_lib 2025-10-26 00:14:41 +02:00
zykem#0643 165c8530c3 feat: Add shared compat file 2025-10-25 19:18:03 +02:00
Kenshin13 260d9b30ee refactor(es_extended/server/class/player): add proper type annotations 2025-08-16 14:14:16 +02:00
Kenshin13 28670480bc fix(es_extended/shared/functions): fix ESX.GetConfig bug 2025-08-13 15:00:39 +02:00
Kenshin13 b9d735ceca Merge pull request #1675 from Zykem/feature/optional-identifier-type
feat(esx_core) Add optional player identifier type.
2025-08-01 11:15:10 +02:00
Kenshin13 23f78ae6e4 fix(es_extended/shared/config/adjustments): enable ambient peds & vehicles by default 2025-07-30 14:05:55 +02:00
Kenshin13 756aae3dc1 chore(es_extended/shared/config/main): replace missleading comment 2025-07-27 18:35:35 +02:00
zykem#0643 a92852298c Add Config Value and logic inside core / player class 2025-07-21 01:27:03 +02:00
Kenshin13 ddaf864bde feat(es_extended): Add configurable density multipliers for peds and vehicles 2025-07-13 09:04:12 +02:00
zykem#0643 2a2428d6e0 Remove ':' from LDoc annotation 2025-07-06 16:21:01 +02:00
zykem#0643 33ffd2c9a9 Add ESX.GetConfig optional parameter 2025-07-06 16:01:31 +02:00
YOMAN1792 dc512f97d2 feat(functions.lua): add optional digit support to IsValidLocaleString
Modified the ESX.IsValidLocaleString function to accept an optional `allowDigits` parameter.
When true, the function now allows numerical characters (0-9) in addition to the configured character ranges.

This improves string validation flexibility across locales.
2025-05-08 14:18:57 -04:00
YOMAN1792 099bd7dd46 refactor(functions.lua): use table.unpack to initialize validRanges
Replaces manual loop for copying `defaultRanges` into `validRanges` with `table.unpack`.
Avoids unnecessary iteration and duplication.
2025-05-08 13:03:40 -04:00
YOMAN1792 01e29f6e9b refactor(locale): improve performance and type safety in IsValidLocaleString
- Replaced `ipairs` with a numeric `for` loop in the UTF-8 validation step for better performance.
- Stored `validRanges[i]` in a local `range` variable to avoid duplicate table lookups.
- Added a call to `ESX.ValidateType(str, 'string')` to ensure input is of type string before processing.
These changes improve both performance and code safety.
2025-05-08 10:33:03 -04:00
YOMAN1792 e30d4e49f5 Added support for additional character sets and language customization
This update introduces a new configuration option `Config.ValidCharacterSets` to allow support for additional character sets in case the server is multilingual. This allows the server to handle character sets such as Greek, Cyrillic, Hebrew, Arabic, and East Asian languages (Chinese, Japanese, Korean). 

By default, these character sets are disabled (`false`). The user can enable them if needed, depending on the language requirements of the server.
2025-05-07 12:34:42 -04:00
YOMAN1792 e9fe5babdb Refactor: Add ESX.IsValidLocaleString function to validate locale-based characters
This commit introduces the new `ESX.IsValidLocaleString` function, which checks if a given string contains valid characters based on the configured locale. It validates characters from various locales, such as Greek, Cyrillic, Hebrew, Arabic, and Chinese, in addition to basic Latin characters. The function is flexible, allowing for the inclusion of additional character sets via the `Config.ValidCharacterSets` configuration.

Changes include:
- A new function, `ESX.IsValidLocaleString`, added to validate characters based on the locale.
- The validation takes into account default Latin ranges as well as specific ranges for supported languages.
- The function supports dynamic locale configurations by using `Config.ValidCharacterSets`.

This refactor improves handling of locale-specific characters and provides a way to easily extend validation for new locales as needed.
2025-05-07 12:31:14 -04:00
Kasey Fitton 901f16fb7b fix(es_extended/shared/main): remove unused variable 2025-02-07 13:52:31 +00:00
Kasey Fitton 6b4def278e tweak(es_extended/shared/main): remove deprication message 2025-02-07 11:51:51 +00:00
Kenshin13 86af2ef0ed feat(es_extended/locale): add support for lazy loading locales 2025-01-19 12:54:14 +01:00
Kasey FItton eb96467ce1 chore: update docs link 2025-01-04 02:28:40 +00:00
Kenshin13 cd29078548 feat(es_extended/shared/modules/table): add ESX.Table.Wipe 2025-01-02 20:30:29 +01:00
Kenshin13 670d0c4b7f feat(es_extended/server/modules/paycheck): add offDuty pay 2025-01-01 16:31:27 +01:00
Kenshin13 8056d0f03c feat(es_extended/shared/config/weapons): add WEAPON_TECPISTOL
DLC: San Andreas Mercenaries
2024-12-31 23:29:23 +01:00
Kenshin13 88f9ac87bf feat(es_extended/shared/config/weapons): add bottom dollar bounties dlc weapons 2024-12-31 23:03:57 +01:00
Kenshin13 d79a3c1d1d feat(es_extended/shared/config/weapons): add chop shop dlcs weapons 2024-12-31 22:48:35 +01:00
Kasey Fitton 032b6f623f Merge pull request #1544 from Mycroft-Studios/ox-inventory-detection
feat(es_extended/shared): add ox inventory detection back
2024-12-15 21:42:41 +00:00
Kasey FItton 11a26dc7af tweak(es_extended/shared/config/main): adjust comment 2024-12-15 21:40:33 +00:00
Kasey FItton 29fbab3d46 feat(es_extended/shared): add ox inventory detection back 2024-12-15 21:39:12 +00:00
Kenshin13 778cc0a81c Merge pull request #1540 from Zykem/await-func
feat(es_extended) Add ESX.Await function
2024-12-15 17:58:39 +01:00
Kenshin13 db68fceccc fix(es_extended/shared/functions): invokingResource not being displayed 2024-12-15 17:56:12 +01:00
Kenshin13 9336cfdc69 fix(es_extended/shared/functions): return result of conditionFunc & refactored code 2024-12-15 17:51:12 +01:00
zykem#0643 b6e82bd93d Addressing requested changes: pcall replace, errorMessage validation before loop, throwing actual error as formattedErrorMessage 2024-12-15 15:31:40 +01:00
zykem#0643 c32c41d718 Addressed PR feedback from Kenshiin13 2024-12-15 14:26:57 +01:00
zykem#0643 276fc69449 Add ESX.Await function 2024-12-15 10:11:01 +01:00
Kenshin13 23ad35b6e2 feat(es_extended/shared/main): restore backwards compat 2024-12-06 22:00:33 +01:00
Ilias Rbayti 018b663b8a fix(es_extended/shared/config/weapons): add missing throwables 2024-12-01 02:02:33 +01:00
Ilias Rbayti edc73a1048 fix(es_extended/shared/config/weapons): add remaining throwables 2024-12-01 01:49:41 +01:00
Ilias Rbayti 0fe6ef4b1c fix(es_extended/server/classes/player): remove throwables from loadout when out of ammo 2024-11-30 23:40:09 +01:00
Kenshin13 292cb6c4f8 Merge pull request #1509 from Kenshiin13/fix-player-death
fix(es_extended/client/main): fix player death race condition
2024-11-30 16:32:42 +01:00