Commit Graph
1334 Commits
Author SHA1 Message Date
Kenshin13 78b8b21f2e Merge pull request #1635 from auradevelopment5m/main
refactor(esx_notify): redesign, code improvements.
2025-05-09 23:53:36 +02:00
zykem 605fad5795 Merge pull request #1630 from YOMAN1792/dev
Refactor name validation: remove numeric check and simplify character validation
2025-05-09 11:12:47 +02:00
zlexif f2f55f1d48 Merge branch 'main' of https://github.com/auradevelopment5m/esx_core 2025-05-08 21:54:12 +03:00
zlexif 7d61f378e2 fix:('added title parameter to ESX.ShowNotification. 2025-05-08 21:53:34 +03: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
Aura Development 612d61e015 Merge branch 'dev' into main 2025-05-08 16:23:14 +03: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
YOMAN1792 8f07d854eb refactor(main.lua): use ESX.IsValidLocaleString with configurable character sets
Replaced the manual character validation logic in checkNameFormat with ESX.IsValidLocaleString to centralize string validation and allow configuration of valid character sets per locale.

Added support for Config.ValidCharacterSets to enable or disable specific Unicode blocks such as Greek, Cyrillic, Hebrew, Arabic, or CJK (Chinese, Japanese, Korean). This change introduces greater flexibility for multilingual servers while maintaining basic Latin character support by default.

⚠️ Behavior changes: Characters that were previously allowed may now be rejected depending on the server’s locale configuration.
2025-05-07 12:23:25 -04:00
zlexif 59d2e9a839 fix(readme esx_notify): 2025-05-05 19:49:07 +03:00
zlexif 7a1eef95ff refactor(esx_notify): redesign, code improvements. 2025-05-05 19:32:19 +03:00
YOMAN1792 77be031e82 Add early returns 2025-04-28 17:19:49 -04:00
YOMAN1792 f4f6f22578 Refactor name validation: remove numeric check and simplify character validation
- Removed the redundant numeric check as it is already handled by the character validation.
- Simplified the name validation logic by keeping only the `checkValidCharacter()` function for validating characters.
- The `checkValidCharacter()` function checks for allowed characters: Latin, Greek, Cyrillic, Hebrew, Arabic, and CJK.
- Updated `checkNameFormat()` to rely solely on the new character validation logic.
2025-04-23 01:51:44 -04:00
Mirow 9f0bafef3d Revert "feat(paycheck): add event"
This reverts commit aba21e2c03.
2025-04-04 17:02:10 +02:00
Mirow aba21e2c03 feat(paycheck): add event 2025-04-04 16:59:08 +02:00
Mirow 532070b72d feat(callback): add AwaitClientCallback function 2025-04-01 17:56:50 +02:00
Kenshin13 4627d8a7d5 Merge pull request #1618 from iSentrie/patch-12
fix(es_extended/server/functions.lua): IsPlayerAdmin group fix
2025-03-09 23:15:46 +01:00
iSentrie 5bb75de78f Update functions.lua 2025-03-10 00:11:09 +02:00
iSentrie 45efe07743 Merge branch 'dev' into patch-12 2025-03-10 00:02:55 +02:00
iSentrie 23915d1508 Update functions.lua 2025-03-09 23:42:54 +02:00
iSentrie eb1a2b9923 Update functions.lua 2025-03-09 23:39:57 +02:00
iSentrie 88a415a2b6 Update functions.lua 2025-03-09 23:29:52 +02:00
nexis 638ce3a276 fix(es_extended/server/main): GlobalState jobcount infinitely increasing 2025-03-06 09:41:03 +01:00
Kenshin13 22d191b51e Revert "feat(es_extended/server/modules/commands.lua): Add Validation Number" 2025-03-04 14:06:50 +01:00
YOMAN1792 80d934ac59 feat(player): refine inventory item count handling with rounding and maximum limit enforcement. 2025-03-03 21:33:05 -05:00
iSentrie 9083a71526 fix(functions.lua): IsPlayerAdmin group fix
Function failed to properly detect is player admin or not, while GetPlayerFromId function was receiving a string instead of number.
2025-03-02 11:49:04 +02:00
YOMAN1792 6693a7f503 feat(player): update inventory item addition to enforce maximum count limit 2025-02-25 22:59:31 -05:00
YOMAN1792 90ba45075e feat(player): enforce maximum amount limit for account money transactions 2025-02-25 22:01:15 -05:00
YOMAN1792 7877d9e40a feat(inventory): implement maximum amount cap for account money transactions 2025-02-25 21:58:23 -05:00
YOMAN1792 f2cde31251 feat(commands): remove maximum amount validation for account money and item commands 2025-02-25 21:55:24 -05:00
YOMAN1792 b60eb3b43c feat(commands): rename amount to count for giveitem and update ammo validation for giveweapon and giveammo 2025-02-25 17:05:23 -05:00
YOMAN1792 a0389d7e51 feat(commands): add max amount validation for giveitem, giveweapon, and giveammo 2025-02-25 16:47:44 -05:00
YOMAN1792 91e783c9e9 feat(commands): prevent money overflow from blocking further transactions 2025-02-25 16:47:05 -05:00
YOMAN1792 221e23b2b7 feat(commands): prevent Ox from breaking due to money overflow 2025-02-25 16:46:25 -05:00
t1ger-scripts b66909c33d feat(modules/createJob): triggerevent for created jobs
Added a TriggerEvent when a job is created successfully, allowing developers to use an event listener and update ESX.Jobs, instead of importing the whole ESX object.
2025-02-18 22:28:02 +01:00
t1ger-scripts 5ddd200802 fix(server/modules/createJob): skin nil check before json encode
Added checks for skin_male and skin_female before json encoding to prevent 'NULL' entries in database
2025-02-18 13:36:53 +01:00
t1ger-scripts 364dfc03c6 fix(server/modules/createJob): job grades not inserting
The queries assume that the parsed grades are numerically indexed. But removing ipairs method, and using pairs method, allows to loop grades that are indexed with strings as well. Just like we are using pairs method inside generatenewJobTable
2025-02-17 18:02:44 +01:00
t1ger-scripts 6d7831b0d0 fix(es_extended/server/functions): whitelisted attribute for unemployed
Added the missing whitelisted attribute for defaulted unemployed job.
2025-02-17 16:56:59 +01:00
t1ger-scripts 262ae32a8b fix: missing attributes for unemployed
Added missing attributes for unemployed job if no Jobs found
2025-02-17 16:35:01 +01: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 34a5c00b5b fix(esx_multicharacter/server/modules/database): fix conn string parser 2025-02-03 17:03:24 +01:00
Kenshin13 db5128fcb6 fix(es_extended/server/functions): fix admin logs 2025-01-25 14:25:20 +01:00
Manifest Bumper 74e76ed613 chore: bump manifest version to 1.12.4 2025-01-23 21:29:23 +00:00
Kenshin13 2d86b4cb25 Merge branch 'main' of https://github.com/Kenshiin13/esx_core 2025-01-23 22:17:17 +01:00
Kenshin13 4c4dc4496b fix(es_extended/client/modules/death): fix death thread on first spawn 2025-01-23 22:15:35 +01:00
Kenshin13 66bf71c254 feat(es_extended/server/classes/player): add getter for playerId 2025-01-22 18:35:21 +01:00
Kenshin13 1ad52fa3e2 feat(es_extended/server/classes/player): add isAdmin getter 2025-01-22 18:33:11 +01:00