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.
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
The QBCore.Functions.LookAtEntity function in Lua makes a player's character turn to face a specified entity in the game. It checks if the entity exists and if the input parameters are valid. It then calculates the direction to the entity and gradually adjusts the player's heading to match this direction. The function stops either when the player is facing the entity or when the specified timeout is reached.
The runningAnim function is designed to play a specific animation for a player's ped (character) in FiveM. Here's a detailed breakdown of what the function does:
The function takes four parameters: animDict (the name of the animation dictionary), animName (the name of the animation within the dictionary), duration (the duration of the animation in milliseconds), and upperbodyOnly (a boolean indicating whether the animation should only affect the upper body of the ped).
It starts by creating a new promise, animPromise, which will be used to handle the asynchronous nature of loading and playing the animation.
The function then checks if animDict and animName are strings. If not, it rejects the promise with an error message and returns.
It checks if the animation dictionary exists. If not, it rejects the promise with an error message and returns.
It sets the animation flags based on the upperbodyOnly parameter. If upperbodyOnly is true, the flags are set to 16, otherwise, they are set to 0. If the duration is -1 (indicating the animation should loop indefinitely), the flags are set to 49.
It gets the player's ped and the current game time.
It enters a loop where it requests the animation dictionary and waits until it's loaded. If the dictionary isn't loaded within 5 seconds, it rejects the promise with an error message and returns.
Once the animation dictionary is loaded, it plays the animation on the player's ped using TaskPlayAnim.
It waits for a short time to allow the animation to start, then gets the duration of the animation using GetAnimDuration.
If the animation duration is 0 (indicating the animation doesn't exist), it rejects the promise with an error message and returns.
It calculates the full duration of the animation in milliseconds and sets the wait time to the minimum of the provided duration and the full duration.
It waits for the duration of the animation, then removes the animation dictionary.
Finally, it resolves the promise with the current time, indicating when the animation concluded.
- This function has an issue with some references of blips and the usage is not very user friendly, no need for this because local functions are better