Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setStored function #1559

Closed
wants to merge 217 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
217 commits
Select commit Hold shift + click to select a range
93e9fca
refactor(SQL/legacy): Add primary key to vehicles table
Kenshiin13 Nov 2, 2024
86c5e64
replace `id` PK with `model`
Kenshiin13 Nov 5, 2024
26d229d
experimental: Class and Point imports
Mycroft-Studios Nov 9, 2024
483fee8
fix(client/modules/points): safely iterate over sparse points table
Kenshiin13 Nov 9, 2024
7508823
refactor(client/modules/points): Fix function name typo
Kenshiin13 Nov 9, 2024
b5220b9
Merge pull request #1443 from Kenshiin13/points-module
Mycroft-Studios Nov 9, 2024
19423b0
Merge branch 'main' into dev
Mycroft-Studios Nov 9, 2024
efe26db
Merge branch 'main' into dev
Mycroft-Studios Nov 9, 2024
b780e98
feat(esx_notifty): new design
Mycroft-Studios Nov 9, 2024
3b6baa3
feat(esx_textui): new design
Mycroft-Studios Nov 9, 2024
5ae1b36
fix(esx_notify): disable debug mode
Mycroft-Studios Nov 9, 2024
9c760bf
Merge branch 'main' into dev
Mycroft-Studios Nov 9, 2024
c09ce09
feat(esx_progressbar): New styling
Mycroft-Studios Nov 9, 2024
3a1adc8
es_extended(server/main.lua): return if no weapon
iSentrie Nov 9, 2024
247b70a
add locale
Kenshiin13 Nov 9, 2024
5af7bd3
add ai-generated locales
Kenshiin13 Nov 9, 2024
da0d13e
add mk2 weapon tints
Kenshiin13 Nov 9, 2024
2ab3cf2
fix(es_extended/server): support routing buckets for /car
Mycroft-Studios Nov 10, 2024
f464bd1
tweak(esx_progressbar): new colours
Mycroft-Studios Nov 10, 2024
a1084d3
tweak(esx_menu_default): new theme, maybe
Mycroft-Studios Nov 10, 2024
970fcf7
fix(esx_textui): wipe last message
Mycroft-Studios Nov 10, 2024
dc9a9b6
validate player skin
EinS4ckZwiebeln Nov 10, 2024
a8940f5
fix/feat(esx_notify): use correct length and add animations correctly
Mycroft-Studios Nov 10, 2024
5971420
Merge pull request #1447 from EinS4ckZwiebeln/patch-01
Mycroft-Studios Nov 10, 2024
7e800eb
Merge pull request #1446 from Kenshiin13/mk2-weapon-tints
Mycroft-Studios Nov 10, 2024
62971c3
Merge pull request #1445 from iSentrie/patch-11
Mycroft-Studios Nov 10, 2024
40e4390
refactor(locales): Remove unused duty locales
Kenshiin13 Nov 10, 2024
1e47624
Merge pull request #1448 from Kenshiin13/unused-locales
Arctos2win Nov 10, 2024
a3fab28
fix: Cached Ped not being updated Correctly
Mycroft-Studios Nov 11, 2024
094eaf9
Merge pull request #1449 from Mycroft-Studios/updates
Mycroft-Studios Nov 11, 2024
aa4af07
Merge branch 'dev' into 1.11-hotfix
Arctos2win Nov 11, 2024
b620a2f
Merge pull request #1452 from esx-framework/1.11-hotfix
Arctos2win Nov 11, 2024
89c2f8a
Merge pull request #1458 from esx-framework/main
Mycroft-Studios Nov 12, 2024
4be87bb
Fix issues
Nov 12, 2024
7b65f9e
Revert "Fix issues"
Nov 12, 2024
7f27241
Fixes
Nov 12, 2024
75a3f94
lol
Nov 12, 2024
90dc0d1
Merge pull request #1459 from luckie12/feature/esx_identity_nui
Mycroft-Studios Nov 12, 2024
4d67a63
Removed DOB validation as the weird dob notation from overseas doesnt…
Nov 13, 2024
f42c76d
fix(esx_identity/server): DoB validation not respecting config
Mycroft-Studios Nov 13, 2024
73b0d20
fix(esx_identity/client): format date before it reaches server
Mycroft-Studios Nov 13, 2024
2aa7810
See previous message
Nov 13, 2024
955d011
Merge branch 'dev' of https://github.com/luckie12/esx_core into dev
Nov 13, 2024
fee45b5
Revert "fix(esx_identity/server): DoB validation not respecting config"
Kenshiin13 Nov 13, 2024
94e7e44
Revert "fix(esx_identity/client): format date before it reaches server"
Kenshiin13 Nov 13, 2024
45d66b8
Revert "See previous message"
Kenshiin13 Nov 13, 2024
4c74d55
fix(esx_identity): DOB validation
Kenshiin13 Nov 13, 2024
96d20f9
Revert "Removed DOB validation as the weird dob notation from oversea…
Kenshiin13 Nov 13, 2024
17f6b3e
esx_identity: re-build
Kenshiin13 Nov 13, 2024
66abb0e
Merge pull request #1461 from luckie12/dev
Kenshiin13 Nov 13, 2024
a491cf2
fix(es_extended/client/adjustments): use correct natives
Mycroft-Studios Nov 13, 2024
0b2cdf8
Merge pull request #1464 from Mycroft-Studios/Lockon-fix
Arctos2win Nov 13, 2024
1aae197
refactor/cron/server/main): Validate event params
Kenshiin13 Nov 14, 2024
4bb69c1
refactor(cron/server/main): Add type annotations
Kenshiin13 Nov 14, 2024
b69385f
refactor(cron/server/main): More appropriate variable names
Kenshiin13 Nov 14, 2024
6b91207
refactor(cron/server/main): Add more type annotations
Kenshiin13 Nov 14, 2024
ad8bd53
Moved Web stuff to web folder
Nov 14, 2024
15b64a7
Added FXManifest
Nov 14, 2024
dcfd752
Merge pull request #1466 from luckie12/dev
Mycroft-Studios Nov 14, 2024
2b9b406
fix(es_extended/locales/de): Fix German received_weapon_noweapon
Kenshiin13 Nov 14, 2024
0576b20
validate serialized function references
Kenshiin13 Nov 15, 2024
26768c6
Merge pull request #1468 from Kenshiin13/cron-fix
Kenshiin13 Nov 15, 2024
6711d91
Merge pull request #1467 from Kenshiin13/translation-de
Mycroft-Studios Nov 15, 2024
3922e19
fix(skinchanger): wrong operator
Mycroft-Studios Nov 16, 2024
6ef149a
Merge pull request #1469 from Mycroft-Studios/skin-fix
Mycroft-Studios Nov 16, 2024
e0ccc66
fix(es_extended/client/modules/actions): correctly update ped referen…
Kenshiin13 Nov 17, 2024
22d66aa
Merge pull request #1475 from Kenshiin13/fix-actions
Arctos2win Nov 17, 2024
b10c599
test for lua lint ignore
Gellipapa Nov 17, 2024
5c8d65d
test for lua lint ignore
Gellipapa Nov 17, 2024
f367b8e
:pencil2: ignore/handle lint errors
Gellipapa Nov 17, 2024
20fd65b
Merge pull request #1476 from Gellipapa/main
Kenshiin13 Nov 17, 2024
e40d487
fix(skinchanger/client/main): fix HeadOverlay not being applied corre…
Kenshiin13 Nov 17, 2024
18b7987
Merge pull request #1478 from Kenshiin13/fix-skinchanger
Kenshiin13 Nov 17, 2024
1fb6037
fix(es_extended/client/main): use RegisterNetEvent for esx:playerLoaded
Kenshiin13 Nov 17, 2024
56cd03c
fix(es_extended/client/modules/npwd): use RegisterNetEvent for esx:pl…
Kenshiin13 Nov 17, 2024
9446d73
fix(esx_multicharacter/client/main): use RegisterNetEvent for esx:pla…
Kenshiin13 Nov 17, 2024
5d59b2d
refactor(es_extended/server/main): use esx:playerLoaded:internal
Kenshiin13 Nov 17, 2024
8004dcf
feat(es_extended/client/callback): implement ESX.AwaitServerCallback
Mycroft-Studios Nov 17, 2024
6aa4936
Revert "refactor(es_extended/server/main): use esx:playerLoaded:inter…
Kenshiin13 Nov 17, 2024
37aaae6
fix(es_extended/imports): use RegisterNetEvent for esx:playerLoaded
Kenshiin13 Nov 17, 2024
99f34fc
Merge pull request #1480 from Kenshiin13/fix-esx-playerdata
Kenshiin13 Nov 17, 2024
b454894
tweak(es_extended/client/callback): use self:Execute
Mycroft-Studios Nov 17, 2024
32f8e05
fix(es_extended/client/callback): dont return before cleanup
Mycroft-Studios Nov 17, 2024
7cf3673
Merge pull request #1472 from zImSkillz/main
Kenshiin13 Nov 17, 2024
faef100
fix(es_extended/client/callback): make sure data is cleaned up
Mycroft-Studios Nov 17, 2024
4bd84d6
Merge pull request #1481 from Mycroft-Studios/await-callbacks
Mycroft-Studios Nov 17, 2024
e4f55ab
fix(esx_skin): restrict menu
Mycroft-Studios Nov 18, 2024
9758cbe
Merge branch 'dev' into skin-fixs
Mycroft-Studios Nov 18, 2024
7910d01
Merge pull request #1484 from Mycroft-Studios/skin-fixs
Mycroft-Studios Nov 18, 2024
de7dcb7
fix(esx_skin/client/modules/menu): clear old menu items before insert…
Kenshiin13 Nov 20, 2024
d947633
refactor(esx_skin/client/modules/menu): remove redundant check
Kenshiin13 Nov 20, 2024
c63e1fd
Merge pull request #1492 from Kenshiin13/fix-esx-skin
Mycroft-Studios Nov 20, 2024
6ed90e8
fix(esx_skin/client/modules/menu): set initial camera offsets properly
Kenshiin13 Nov 20, 2024
10a125a
Merge pull request #1493 from Kenshiin13/fix-esx-skin
Kenshiin13 Nov 20, 2024
07038a0
Merge branch 'dev' into callback-patch
Mycroft-Studios Nov 21, 2024
e64c7f7
fix(es_extended/callback): correctly dispose of function references
Mycroft-Studios Nov 21, 2024
7c4c3ae
update: menu.lua
Fellow1990 Nov 21, 2024
0b4b159
Merge branch 'dev' into 1.11.2-hotfix
Mycroft-Studios Nov 21, 2024
2483b80
Merge pull request #1497 from esx-framework/1.11.2-hotfix
Mycroft-Studios Nov 21, 2024
042ad34
Merge pull request #1495 from Fellow1990/main
Mycroft-Studios Nov 21, 2024
7954d6e
refactor(es_extended/server/modules/actions): replace deprecated Regi…
Kenshiin13 Nov 22, 2024
d7f346f
Merge pull request #1499 from Kenshiin13/actions-refactor
Arctos2win Nov 22, 2024
4feda3b
feat(es_extended/shared/modules/table): add ESX.Table.ToArray
Kenshiin13 Nov 22, 2024
3a61ae5
refactor(es_extended/server/functions): refactor ESX.GetExtendedPlayers
Kenshiin13 Nov 23, 2024
556d82e
Merge pull request #1501 from Kenshiin13/getextendedplayers-refactor
Arctos2win Nov 24, 2024
d69af15
feat(es_extended/client/modules/adjustments): add adjustment DisableR…
Kenshiin13 Nov 24, 2024
359077c
fix(es_extended/client/modules/adjustments): add SetHudComponentPosition
Kenshiin13 Nov 24, 2024
1d330db
Merge pull request #1436 from Kenshiin13/refactor-sql
Arctos2win Nov 24, 2024
4fb1ac0
fix(es_extended/client/functions): properly call SetVehicleExtra
Kenshiin13 Nov 25, 2024
cdfe24d
Merge pull request #1504 from Kenshiin13/fix-veh-props
Kenshiin13 Nov 25, 2024
b9f11e1
Merge branch 'dev' into extra-callback-functions
Mycroft-Studios Nov 25, 2024
ef935e1
feat(es_extended/server): more callback functions
Mycroft-Studios Nov 25, 2024
a4115d5
feat(es_extended/client): extra callback functions
Mycroft-Studios Nov 25, 2024
672237c
fix(es_extended/server/callback): correct function names
Mycroft-Studios Nov 25, 2024
ccc9b3d
Added missing parameter
1OSaft Nov 26, 2024
7585270
Merge pull request #1508 from 1OSaft/main
Kenshiin13 Nov 26, 2024
9272d71
fix(esx_multicharacter/client/modules/multicharacter): remove redunda…
Kenshiin13 Nov 26, 2024
8528321
fix(es_extended/client/main): apply player metadata in esx:onPlayerSp…
Kenshiin13 Nov 26, 2024
4744202
fix(es_extended/client/main): only apply metadata on first spawn
Kenshiin13 Nov 26, 2024
51c777f
fix(es_extended/client/main): reset isFirstSpawn on logout
Kenshiin13 Nov 26, 2024
47ae063
feat(es_extended/shared/config/main): add Config.SaveDeathStatus
Kenshiin13 Nov 26, 2024
5392f38
feat(es_extended/shared/functions): add ESX.IsFunctionReference
Kenshiin13 Nov 27, 2024
346ce34
fix(skinchanger/config): add missing textureof
Kenshiin13 Nov 27, 2024
2b8841c
fix(esx_skin/client/modules/menu): fix texture variations not updating
Kenshiin13 Nov 27, 2024
166fdff
refactor(esx_skin/client/modules/menu): bad habbits
Kenshiin13 Nov 27, 2024
95497ef
Merge pull request #1510 from Kenshiin13/fix-skin
Kenshiin13 Nov 27, 2024
016b9bb
fix(esx_skin/client/modules/menu): immediately update texture variati…
Kenshiin13 Nov 27, 2024
ef77e5a
Merge pull request #1511 from Kenshiin13/fix-skin
Kenshiin13 Nov 27, 2024
2bfd7ef
Merge pull request #1509 from Kenshiin13/fix-player-death
Kenshiin13 Nov 27, 2024
96cb6b0
refactor(es_extended/client/modules/death): replace gameEventTriggered
Kenshiin13 Nov 28, 2024
e2c4ab7
refactor(es_extended/client/modules/death): fix typo
Kenshiin13 Nov 28, 2024
1bbd9b1
refactor(es_extended/client/modules/death): cleanup redundant checks
Kenshiin13 Nov 28, 2024
3af9ce3
refactor(es_extended/client/modules/death): remove unused function param
Kenshiin13 Nov 28, 2024
114c337
refactor(es_extended/client/modules/death): more appropriate function…
Kenshiin13 Nov 28, 2024
0fe6ef4
fix(es_extended/server/classes/player): remove throwables from loadou…
Kenshiin13 Nov 30, 2024
d1cdd35
refactor(es_extended/client/main): lowercase ammo
Kenshiin13 Nov 30, 2024
6fd92c7
refactor(es_extended/client/main): faster thread, but only update wea…
Kenshiin13 Nov 30, 2024
d1412c7
fix(es_extended/client/main): track parachute opening to remove from …
Kenshiin13 Dec 1, 2024
edc73a1
fix(es_extended/shared/config/weapons): add remaining throwables
Kenshiin13 Dec 1, 2024
018b663
fix(es_extended/shared/config/weapons): add missing throwables
Kenshiin13 Dec 1, 2024
2b74b5f
fix(es_extended/client/main): remove parachute immediately on use
Kenshiin13 Dec 1, 2024
0b21aff
fix(es_extended/client/main): revert ammo caching
Kenshiin13 Dec 1, 2024
727ef83
refactor(es_extended/server/classes/player): index is unused
Kenshiin13 Dec 1, 2024
369a015
Merge pull request #1521 from Kenshiin13/fix-throwables
Kenshiin13 Dec 1, 2024
50d736f
Merge pull request #1514 from Kenshiin13/refactor-death-module
Kenshiin13 Dec 3, 2024
612006b
Merge pull request #1502 from Kenshiin13/remove-radio-hud
Kenshiin13 Dec 3, 2024
783c812
feat(es_extended/client/main): sync where players look at
Kenshiin13 Dec 3, 2024
d019c19
Merge pull request #1522 from Kenshiin13/sync-look-at
Kenshiin13 Dec 3, 2024
37b5f05
Merge pull request #1494 from Mycroft-Studios/callback-patch
Mycroft-Studios Dec 3, 2024
122dece
Merge branch 'dev' into extra-callback-functions
Mycroft-Studios Dec 3, 2024
2e3917f
tweak(es_extended/callback): remove GetCallbackInfo
Mycroft-Studios Dec 3, 2024
a9a4ff6
fix(es_extended/client/callback): merge issues
Mycroft-Studios Dec 3, 2024
d23b7ce
tweak(es)extended/client/callback): merging style issues
Mycroft-Studios Dec 3, 2024
76a1df3
fix(es_extended/callback): merge styling issues
Mycroft-Studios Dec 3, 2024
dc2256a
Merge pull request #1505 from Mycroft-Studios/extra-callback-functions
Mycroft-Studios Dec 3, 2024
803508b
Merge branch 'dev' into vehicle-spawn-validation
Mycroft-Studios Dec 4, 2024
1b8774f
fix(es_extended/client/functions): validate model is a vehicle
Mycroft-Studios Dec 4, 2024
dbcffd6
Merge pull request #1523 from Mycroft-Studios/vehicle-spawn-validation
Mycroft-Studios Dec 4, 2024
a9b52fa
chore: add contrinbution guidelines
Kenshiin13 Dec 5, 2024
32fb097
chore: rename contribution guidelines
Kenshiin13 Dec 5, 2024
7e61031
feat(es_extended/server/modules/commands): match target dimension on …
Kenshiin13 Dec 6, 2024
fcdd257
feat(es_extended/server/modules/commands): add /setdim admin cmd
Kenshiin13 Dec 6, 2024
be7a448
fix(es_extended/server/modules/commands): only set dim if needed
Kenshiin13 Dec 6, 2024
6c9726f
refactor(es_extended/server/functions): address lint errors
Kenshiin13 Dec 6, 2024
5478165
Merge pull request #1526 from esx-framework/fix-tp-cmds
Kenshiin13 Dec 6, 2024
74d1820
feat(es_extended/locales/de): translated 2 missing locales
FirstSanchez Dec 6, 2024
b436fc6
Space error
FirstSanchez Dec 6, 2024
ca453c6
Merge pull request #1527 from FirstSanchez/patch-3
Arctos2win Dec 6, 2024
23ad35b
feat(es_extended/shared/main): restore backwards compat
Kenshiin13 Dec 6, 2024
65e8c94
Merge pull request #1528 from esx-framework/get-shared-object
Arctos2win Dec 6, 2024
092b843
feat(es_extended/client/modules/actions): track current ped weapon
Kenshiin13 Dec 6, 2024
ce773fe
Create pl.lua
xGhostxDev Dec 7, 2024
4ee70d4
Merge pull request #1529 from esx-framework/track-weapon
Kenshiin13 Dec 8, 2024
e1a0643
Merge pull request #1525 from esx-framework/contribution-guidelines
Kenshiin13 Dec 8, 2024
0e991ce
Merge pull request #1531 from xGhostxDev/patch-1
feelfreetofee Dec 8, 2024
db685e6
feat(es_extended/client/modules/actions): track vehicle seat
Kenshiin13 Dec 8, 2024
3c6d887
feat(es_extended/client/modules/actions): add current weapon to playe…
Kenshiin13 Dec 8, 2024
9083c38
Merge pull request #1533 from Kenshiin13/vehicle-seat
Kenshiin13 Dec 8, 2024
a84c28f
fix(es_extended/client/modules/death): fix death event for multichar …
Kenshiin13 Dec 8, 2024
f2eedb6
Merge pull request #1534 from Kenshiin13/fix-death-event
Kenshiin13 Dec 8, 2024
9fb586e
Add files via upload
Gold14567 Dec 9, 2024
635a556
Update tr.lua
Gold14567 Dec 9, 2024
0903f4d
Merge pull request #1535 from Gold14567/main
Kenshiin13 Dec 9, 2024
f34f0d2
feat(es_extended/server/modules/onesync): add promise support for ESX…
Kenshiin13 Dec 14, 2024
16e208c
feat(es_extended/client/functions): add promise support for ESX.Game.…
Kenshiin13 Dec 14, 2024
627d48a
fix(es_extended/client/functions): reject on invalid vehicle model
Kenshiin13 Dec 14, 2024
792543b
fix(es_extended/client/functions): add optional return type
Kenshiin13 Dec 14, 2024
1d9f528
refactor(es_extended/client/functions): validate cb fun
Kenshiin13 Dec 14, 2024
30a850b
Merge pull request #1539 from Kenshiin13/spawn-vehicle
Kenshiin13 Dec 14, 2024
276fc69
Add ESX.Await function
Zykem Dec 15, 2024
8568e62
Fix EnterVehicle wrong variable name assign
Zykem Dec 15, 2024
3f010ac
Merge pull request #1542 from Zykem/actions-fix
Kenshiin13 Dec 15, 2024
c32c41d
Addressed PR feedback from Kenshiin13
Zykem Dec 15, 2024
b6e82bd
Addressing requested changes: pcall replace, errorMessage validation …
Zykem Dec 15, 2024
9336cfd
fix(es_extended/shared/functions): return result of conditionFunc & r…
Kenshiin13 Dec 15, 2024
db68fce
fix(es_extended/shared/functions): invokingResource not being displayed
Kenshiin13 Dec 15, 2024
778cc0a
Merge pull request #1540 from Zykem/await-func
Kenshiin13 Dec 15, 2024
29fbab3
feat(es_extended/shared): add ox inventory detection back
Mycroft-Studios Dec 15, 2024
11a26dc
tweak(es_extended/shared/config/main): adjust comment
Mycroft-Studios Dec 15, 2024
032b6f6
Merge pull request #1544 from Mycroft-Studios/ox-inventory-detection
Mycroft-Studios Dec 15, 2024
f254c91
refactor(es_extended/client): rename common.lua and main.lua
Mycroft-Studios Dec 15, 2024
c00a9b6
refactor(es_extended/client): move events.lua to modules
Mycroft-Studios Dec 15, 2024
ab19608
chore(es_extended/server): remove actions.lua
Mycroft-Studios Dec 15, 2024
4c8f577
tweak(es_extended/fxmanifest): remove actions.lua
Mycroft-Studios Dec 15, 2024
5e5e4d3
Merge pull request #1550 from Mycroft-Studios/remove-server-actions
Arctos2win Dec 15, 2024
023dfa5
feat(es_extended/client/actions): add debug prints
Mycroft-Studios Dec 15, 2024
afdbee3
Merge pull request #1551 from Mycroft-Studios/debug-actions
Arctos2win Dec 15, 2024
1f25982
Merge branch 'dev' into better-vehicle-spawning
Mycroft-Studios Dec 16, 2024
00eafee
fix(es_extended/server/onesync): better vehicle spawning method
Mycroft-Studios Dec 16, 2024
c32d674
Merge remote-tracking branch 'upstream/main' into better-vehicle-spaw…
Mycroft-Studios Dec 16, 2024
c26b5d7
Merge pull request #1553 from Mycroft-Studios/better-vehicle-spawning
Kenshiin13 Dec 16, 2024
f7eb0ca
Merge pull request #1545 from Mycroft-Studios/rename-client-common-main
Kenshiin13 Dec 17, 2024
3a3c3f1
fix(es_extended/imports): wait for ped to be set before setting Playe…
Kenshiin13 Dec 22, 2024
831e409
fix(es_extended/client/modules/actions): fix ped change not propogating
Kenshiin13 Dec 23, 2024
553303f
fix(es_extended/client/modules/death): fix death module trying to acc…
Kenshiin13 Dec 23, 2024
cb153c2
fix(es_extended/client/modules/actions): avoid manually setting playe…
Kenshiin13 Dec 23, 2024
bb98a81
Merge pull request #1558 from Kenshiin13/fix-race-condition
Kenshiin13 Dec 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contribution Guidelines

If you're planning to contribute, **please follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard.**

Pull Requests (PRs) that do not adhere to this standard will **not be accepted**.

## Branch Requirements

- **All PRs must be based on the `dev` branch.**
- Merges will only occur into the `dev` branch before being released to the main branch.

## Commit Message Format

Ensure your commit messages and PR titles use the following format:

```
<type>(<scope>): <description>
```

For example:
```
feat(es_extended/client/main): sync where players look at
fix(es_extended/client/functions): validate model is a vehicle
refactor(es_extended/client/modules/death): replace gameEventTriggered
```

Common commit types include:
- **`feat`** for new features
- **`fix`** for bug fixes
- **`refactor`** for code improvements without functionality changes
- **`!`** to indicate breaking changes (e.g., `feat!` or `fix!`)

---

## PR Checklist

**Please include this in your PR.**
```
- [ ] My commit messages and PR title follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard.
- [ ] My changes have been tested locally and function as expected.
- [ ] My PR does not introduce any breaking changes.
- [ ] I have provided a clear explanation of what my PR does, including the reasoning behind the changes and any relevant context.
```


# We value your contribution!
By adhering to these guidelines, we can ensure a clean and maintainable codebase. Thank you for contributing to ESX!
7 changes: 7 additions & 0 deletions [SQL]/legacy.sql
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,13 @@ ALTER TABLE `licenses`
ALTER TABLE `owned_vehicles`
ADD PRIMARY KEY (`plate`);

--
--
-- Indexes for table `vehicles`
--
ALTER TABLE `vehicles`
ADD PRIMARY KEY (`model`);

--
-- Indexes for table `rented_vehicles`
--
Expand Down
60 changes: 42 additions & 18 deletions [core]/cron/server/main.lua
Original file line number Diff line number Diff line change
@@ -1,51 +1,75 @@
local Jobs = {}
local LastTime = nil
---@class CronJob
---@field h number
---@field m number
---@field cb function|table

---@type CronJob[]
local cronJobs = {}
---@type number|false
local lastTimestamp = false

---@param h number
---@param m number
---@param cb function|table
function RunAt(h, m, cb)
Jobs[#Jobs + 1] = {
cronJobs[#cronJobs + 1] = {
h = h,
m = m,
cb = cb,
}
end

---@return number
function GetUnixTimestamp()
return os.time()
end

function OnTime(time)
for i = 1, #Jobs, 1 do
---@param timestamp number
function OnTime(timestamp)
for i = 1, #cronJobs, 1 do
local scheduledTimestamp = os.time({
hour = Jobs[i].h,
min = Jobs[i].m,
hour = cronJobs[i].h,
min = cronJobs[i].m,
sec = 0, -- Assuming tasks run at the start of the minute
day = os.date("%d", time),
month = os.date("%m", time),
year = os.date("%Y", time),
day = os.date("%d", timestamp),
month = os.date("%m", timestamp),
year = os.date("%Y", timestamp),
})

if time >= scheduledTimestamp and (not LastTime or LastTime < scheduledTimestamp) then
if timestamp >= scheduledTimestamp and (not lastTimestamp or lastTimestamp < scheduledTimestamp) then
local d = os.date('*t', scheduledTimestamp).wday
Jobs[i].cb(d, Jobs[i].h, Jobs[i].m)
cronJobs[i].cb(d, cronJobs[i].h, cronJobs[i].m)
end
end
end

---@return nil
function Tick()
local time = GetUnixTimestamp()
local timestamp = GetUnixTimestamp()

if not LastTime or os.date("%M", time) ~= os.date("%M", LastTime) then
OnTime(time)
LastTime = time
if not lastTimestamp or os.date("%M", timestamp) ~= os.date("%M", lastTimestamp) then
OnTime(timestamp)
lastTimestamp = timestamp
end

SetTimeout(60000, Tick)
end

LastTime = GetUnixTimestamp()

lastTimestamp = GetUnixTimestamp()
Tick()

---@param h number
---@param m number
---@param cb function|table
AddEventHandler("cron:runAt", function(h, m, cb)
local invokingResource = GetInvokingResource() or "Unknown"
local typeH = type(h)
local typeM = type(m)
local typeCb = type(cb)

assert(typeH == "number", ("Expected number for h, got %s. Invoking Resource: '%s'"):format(typeH, invokingResource))
assert(typeM == "number", ("Expected number for m, got %s. Invoking Resource: '%s'"):format(typeM, invokingResource))
assert(typeCb == "function" or (typeCb == "table" and type(getmetatable(cb)?.__call) == "function"), ("Expected function for cb, got %s. Invoking Resource: '%s'"):format(typeCb, invokingResource))

RunAt(h, m, cb)
end)
30 changes: 0 additions & 30 deletions [core]/es_extended/client/common.lua

This file was deleted.

34 changes: 28 additions & 6 deletions [core]/es_extended/client/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ function ESX.UI.Menu.Close(menuType, namespace, name, cancel)
else
local menu = ESX.UI.Menu.Opened[i]
ESX.UI.Menu.RegisteredTypes[menu.type].close(menu.namespace, menu.name)

if type(menu.cancel) ~= "nil" then
menu.cancel(menu.data, menu)
end
Expand All @@ -412,7 +412,7 @@ function ESX.UI.Menu.CloseAll(cancel)
else
local menu = ESX.UI.Menu.Opened[i]
ESX.UI.Menu.RegisteredTypes[menu.type].close(menu.namespace, menu.name)

if type(menu.cancel) ~= "nil" then
menu.cancel(menu.data, menu)
end
Expand Down Expand Up @@ -530,10 +530,14 @@ end
---@param vehicleModel integer | string The vehicle to spawn
---@param coords table | vector3 The coords to spawn the vehicle at
---@param heading number The heading of the vehicle
---@param cb? function The callback function
---@param cb? fun(vehicle: number) The callback function
---@param networked? boolean Whether the vehicle should be networked
---@return nil
---@return number? vehicle
function ESX.Game.SpawnVehicle(vehicleModel, coords, heading, cb, networked)
if cb and not ESX.IsFunctionReference(cb) then
error("Invalid callback function")
end

local model = type(vehicleModel) == "number" and vehicleModel or joaat(vehicleModel)
local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
local isNetworked = networked == nil or networked
Expand All @@ -549,8 +553,15 @@ function ESX.Game.SpawnVehicle(vehicleModel, coords, heading, cb, networked)
return error(("Resource ^5%s^1 Tried to spawn vehicle on the client but the position is too far away (Out of onesync range)."):format(executingResource))
end

local promise = not cb and promise.new()
CreateThread(function()
ESX.Streaming.RequestModel(model)
local modelHash = ESX.Streaming.RequestModel(model)
if not modelHash then
if promise then
return promise:reject(("Tried to spawn invalid vehicle - ^5%s^7!"):format(model))
end
error(("Tried to spawn invalid vehicle - ^5%s^7!"):format(model))
end

local vehicle = CreateVehicle(model, vector.x, vector.y, vector.z, heading, isNetworked, true)

Expand All @@ -569,10 +580,16 @@ function ESX.Game.SpawnVehicle(vehicleModel, coords, heading, cb, networked)
Wait(0)
end

if cb then
if promise then
promise:resolve(vehicle)
elseif cb then
cb(vehicle)
end
end)

if promise then
return Citizen.Await(promise)
end
end

---@param vehicle integer The vehicle to spawn
Expand Down Expand Up @@ -1585,6 +1602,11 @@ function ESX.GetVehicleTypeClient(model)
if not IsModelInCdimage(model) then
return false
end

if not IsModelAVehicle(model) then
return false
end

if mismatchedTypes[model] then
return mismatchedTypes[model]
end
Expand Down
21 changes: 21 additions & 0 deletions [core]/es_extended/client/imports/class.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
local class = {}
class.__index = class

function class:new(...)
local instance = setmetatable({}, self)
if instance.constructor then
local ret = instance:constructor(...)
if type(ret) == 'table' then
return ret
end
end
return instance
end

function Class(body, heritage)
local prototype = body or {}
prototype.__index = prototype
return setmetatable(prototype, heritage or class)
end

return Class
44 changes: 44 additions & 0 deletions [core]/es_extended/client/imports/point.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Point = ESX.Class()

function Point:constructor(properties)
self.coords = properties.coords
self.hidden = properties.hidden or false
self.inside = properties.inside or function() end
self.enter = properties.enter or function() end
self.leave = properties.leave or function() end
self.handle = ESX.CreatePointInternal(properties.coords, properties.distance, properties.hidden, function()
self.nearby = true
if self.enter then
self:enter()
end
if self.inside then
CreateThread(function()
while self.nearby do
local coords = GetEntityCoords(ESX.PlayerData.ped)
self.currDistance = #(coords - self.coords)
self:inside()
Wait(0)
end
end)
end
end, function()
self.nearby = false
if self.leave then
self:leave()
end
end)
end

function Point:delete()
ESX.RemovePointInternal(self.handle)
end

function Point:toggle(hidden)
if hidden == nil then
hidden = not self.hidden
end
self.hidden = hidden
ESX.HidePointInternal(self.handle, hidden)
end

return Point
Loading
Loading