Skip to content

Update#1220

Open
GhzGarage wants to merge 43 commits into
v2.0from
main
Open

Update#1220
GhzGarage wants to merge 43 commits into
v2.0from
main

Conversation

@GhzGarage
Copy link
Copy Markdown
Member

No description provided.

Legen141215 and others added 30 commits March 12, 2025 21:29
Updated a few spelling errors
Added workbench & attachment to items.
Added workbench & attachment items to items.lua
Remove spaces at the end of lines 398 and 400 of `server/functions.lua`
…ype 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.
Added zh-tw language and modified the file name
feat(core): add functions to retrieve online players by job name or type with optional on-duty check
Cocodrulo and others added 12 commits November 20, 2025 11:15
Set job duty status at player login
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.
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.
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.
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
Add timeouts and validation to asset loaders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants