Commit Graph

1515 Commits

Author SHA1 Message Date
Kakarot 7c91136784 Merge pull request #1223 from Mehdi-MMO/main
🐛 Fix race condition causing ghost characters on deletion
2026-05-29 08:56:12 -05:00
Mehdi 1b126f1bd0 🐛 Fix async race condition causing ghost characters on deletion 2026-05-29 12:17:00 +01:00
Mehdi 02ce867a37 the damn bug 2026-05-29 12:00:30 +01:00
Kakarot 7104e8c81f fixes for AddPlayerMethod 2026-05-19 22:59:06 -05:00
Kakarot 42b27077ff GetShared fix 2026-05-19 21:56:19 -05:00
Kakarot 74ac036d4a Refactor core structure and notification UI
Major refactor to centralize QBCore and replace the web UI stack:

- Move QBConfig into a unified QBCore.Config and initialize QBCore.PlayerData; add shared/functions.lua.
- Remove legacy client/main.lua and server/main.lua exports and update fxmanifest to include shared/functions and drop those main scripts.
- Update client event handling: adapt player data events to QBCore:Client:OnPlayerUpdated and trigger job/gang update events; remove deprecated exploitable handlers.
- Web UI rewrite: remove Vue/Quasar dependency and config module; implement a lightweight vanilla JS notification system (html/js/app.js) with updated html and css assets, plus drawtext tweaks.
- CSS overhaul for notification styling and animations; HTML head/meta/font cleanup.
- Server fixes: use QBCore.Shared.Locations in teleport command and strengthen numeric parsing/validation for coords.
- Add .gitattributes for consistent text/eol handling and small code cleanups (thread/comment removal).

These changes consolidate config/shared logic under QBCore, simplify the frontend dependencies, and fix a few parsing/event issues.
2026-05-19 18:13:35 -05:00
Kakarot 891b039bf3 Merge pull request #1219 from MrNewb/main
Add timeouts and validation to asset loaders
2026-05-12 23:52:27 -05:00
MrNewb b5ea0f7387 Add timeouts and validation to asset loaders
Enhance several asset-loading helpers in client/functions.lua to avoid indefinite blocking and provide explicit status. LoadModel, RequestAnimDict, LoadAnimSet, and LoadParticleDictionary now accept an optional timeout (default 5000ms), return a boolean load result and the resolved name/hash, and perform existence/validity checks before requesting. LoadModel also accepts string model names (converted via joaat) and logs a warning if the model doesn't exist. These changes make asset loading safer and easier to debug when assets fail to load.

Adds timeout as optional param, stops infinite loops on model/animset/anim dict/particle requests
No breaking changes and backwards compatable
2026-05-10 14:29:33 -04:00
Kakarot 1cee09a394 Support partial player data updates
Add support for sending single-field player data updates to clients to reduce bandwidth. Added a new client event QBCore:Player:UpdatePlayerDataField that updates a single key on QBCore.PlayerData. Modified server QBCore.Player.CreatePlayer UpdatePlayerData to accept an optional key and value; when provided it triggers the new per-field client event, otherwise it falls back to sending the full player data. Updated various player functions to call UpdatePlayerData with specific keys (job, gang, metadata, money, etc.) instead of always triggering a full sync. Files changed: client/events.lua, server/player.lua.
2026-04-20 19:18:48 -05:00
Kakarot 17da7688f0 Run paychecks in async thread and fix society check
Move the paycheck loop into a CreateThread to avoid blocking the main thread and prevent paychecks from stopping. Add a nil guard for Player and keep existing payment lookup logic. Tighten society payroll logic: check the society account balance before removing funds and still pay employees if the account is zero, avoiding duplicate AddMoney/Notify branches. Add a short Wait(50) between player iterations to yield. Preserve the existing SetTimeout scheduling for the next paycheck run.
2026-04-20 18:58:05 -05:00
Kakarot 6dbbfed6c7 Reduce client loop CPU usage; tweak Kick timing
Increase client loop default sleep from 0 to 1000 to avoid a tight busy-wait when the player is not logged in, reducing CPU usage. In server/functions.lua move the Wait(100) out of the inner Kick loop so the DropPlayer thread is spawned immediately and the short delay happens after the loop, improving timing and avoiding blocking behavior.
2026-04-20 18:51:33 -05:00
Kakarot 83152ac815 dom asked for optimization lol 2026-04-20 18:34:22 -05:00
Joel 36d8986b42 Merge pull request #1208 from Cocodrulo/feature/get-shared-item
Feature/get shared item
2026-01-10 23:13:56 +00:00
Cocodrulo dba6ca9d0f Merge branch 'main' into feature/get-shared-item 2026-01-10 17:52:59 +00:00
Joel c2c0de6dea Merge pull request #1210 from GR-Scripts-25/main
Set job duty status at player login
2025-12-15 15:05:22 +00:00
GR-Scripts 9d6143c7a9 Set job duty status at player login 2025-12-15 05:13:21 +01:00
Cocodrulo 3da7c33b97 feat: Add shared utility functions, starter items, glove data, and a GetShared helper. 2025-11-20 16:07:22 +00:00
Cocodrulo 98b6c5bf1f Actualizar main.lua 2025-11-20 13:52:30 +00:00
Cocodrulo 35fdca273a Update main.lua 2025-11-20 11:15:17 +00:00
Joel e1151d0b62 Merge pull request #1207 from qbcore-framework/fix/client-callback-collisions
Fix/client callback collisions
2025-10-06 15:11:59 -04:00
Joel 63d6cc9681 fix(client-callbacks): check source before attempting concatenation 2025-10-06 14:48:21 -04:00
Joel 3c9ce7cc4c fix: append source id when registering client callback in table to prevent collisions 2025-10-06 13:41:12 -04:00
Joel aaa681fdd4 fix: append source id to prevent client callback collisions 2025-10-06 13:39:11 -04:00
Kakarot 5cf9f4b143 Merge pull request #1198 from MrNewb/main
feat(core): add functions to retrieve online players by job name or type with optional on-duty check
2025-06-22 14:45:51 -05:00
MrNewb d19f34ba09 update 2025-06-22 15:45:03 -04:00
Kakarot 2827a6350b Merge branch 'main' into main 2025-06-22 14:38:43 -05:00
Kakarot 7562568ef8 Merge pull request #1193 from Stevie-World/main
Semantic Version Bump
2025-06-22 13:48:29 -05:00
Kakarot aaa8ada235 Merge pull request #1194 from ShangYi7/main
Added zh-tw language and modified the file name
2025-06-21 16:16:35 -05:00
MrNewb 7a0567efac feat(core): add functions to retrieve online players by job name or type with optional on-duty check
Adds two utility functions to retrieve online players by either job name or job type, with optional filtering for on-duty status. While the logic is a bit nested, this approach avoids unnecessary function splitting and keeps related behavior in a single place. Although I'm not entirely satisfied with the nesting, this structure felt like a reasonable trade-off between readability and reusability.

This method could also serve as a foundation for deprecating older job-check functions, should the maintainer choose to consolidate similar logic in the future.
2025-05-23 04:13:17 -04:00
ShangYi7 e772426c49 Update functions.lua
Remove spaces at the end of lines 398 and 400 of `server/functions.lua`
2025-04-16 20:08:28 +08:00
ShangYi7 763ee0f3e7 Rename zh-tw to zh-tw.lua 2025-04-15 23:14:35 +08:00
ShangYi7 0e4b7090c5 Update and rename cn.lua to zh-cn.lua 2025-04-15 23:09:23 +08:00
ShangYi7 e51dfc8f96 Update zh-tw 2025-04-15 23:01:19 +08:00
ShangYi7 e44b637c1b Create zh-tw 2025-04-15 22:57:00 +08:00
Stevie 76dcd087df Update functions.lua 2025-04-11 04:26:31 +01:00
Stevie eabfb14086 Update functions.lua 2025-04-11 04:24:56 +01:00
Stevie d293239c71 Update functions.lua 2025-04-11 04:23:35 +01:00
Stevie 85bc71416a Update functions.lua 2025-04-11 03:44:55 +01:00
Stevie fc1a4b42e5 Add files via upload 2025-04-10 23:17:27 +01:00
Joel fdd380e7cf Merge pull request #1185 from Legen141215/patch-1
Update pt.lua
2025-04-10 23:14:42 +01:00
Joel e086f247f8 Merge branch 'main' into patch-1 2025-04-10 23:13:56 +01:00
Joel 43758d4c84 Merge pull request #1189 from atarevals/patch-1
Update fa.lua
2025-04-10 22:12:29 +01:00
Joel 2e96eb0e8f Merge branch 'main' into patch-1 2025-04-10 22:11:47 +01:00
Joel 48b4594c45 Merge pull request #1191 from illusi0n003/main
Added workbench & attachment items to items.lua
2025-04-10 21:27:20 +01:00
Illusion ab02e7bef1 Merge pull request #1 from illusi0n003/illusi0n003-patch-1
Add files via upload
2025-04-01 02:00:20 +02:00
Illusion 7f14e90687 Add files via upload
Added workbench & attachment to items.
2025-04-01 01:58:30 +02:00
Ata Revals 23ad1ccb6f Update fa.lua 2025-03-16 10:51:47 +03:30
Kakarot fe654facee Styling update 2025-03-13 15:50:32 -05:00
Legen 3b685761e7 Update pt.lua
Updated a few spelling errors
2025-03-12 21:29:16 +00:00
Joel bb56120a16 Merge pull request #1180 from DispersiaRoleplay/main
Added new locale file ua.lua
2025-03-10 23:30:08 +00:00