56 Commits

Author SHA1 Message Date
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 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
Christian J Bennett ba658d99a0 Fixed the hasKeys Export to return the value true of HasKeys 2025-01-21 12:04:58 -06:00
Zerio dc8fbf04e9 feat: use promises in callbacks + cleanup 2025-01-06 21:31:23 +01:00
Kakarot d479831d0d server functions 2024-05-23 02:39:29 -05:00
Kakarot 5c60c94197 Allow defining icon
- Adds warning class
2024-02-17 06:13:47 -06:00
MoskalykA fb4cc3e113 refactor: small optimization 2023-12-21 20:17:32 +01:00
Kakarot d7323ba147 fxdk handling + naming + duplicate license 2023-11-13 03:28:14 -06:00
Kakarot a73e878487 Weapon attachment rework 2023-11-03 09:40:35 -05:00
hakos 7775667139 fix-lint: client/events.lua:266:63: line contains trailing whitespace 2023-09-28 12:52:53 +02:00
hakos 8ea6644270 update shared at player connection 2023-09-28 12:32:57 +02:00
Mythic 2311af93b4 sets veh as mission entity to use delete native 2023-02-01 09:33:57 -08:00
Charlie e6f5bf5ab6 Remove vehicle keys depdency from core (#920)
Co-authored-by: Zerio <54480523+Z3rio@users.noreply.github.com>
2023-01-18 17:17:15 +01:00
KamuiKody c79a7b907a add baseevents back (#898) 2022-12-19 22:29:18 +01:00
R0adRa93 cc64ee38e8 Getting QB-Core ready for qb-jobs (#883)
Co-authored-by: Zerio <54480523+Z3rio@users.noreply.github.com>
2022-12-16 23:38:31 +01:00
KamuiKody ade0652ee2 fix variable 2022-09-04 23:05:02 -04:00
KamuiKody 8386143cd7 Framework Optimization
for optimization of other resources.
2022-09-04 22:51:27 -04:00
David Malchin ce216ad676 🎨 Rename locales and remove notify translation type 2022-08-21 23:48:45 +03:00
ChatDisabled c6403fdc4b client/events.lua 2022-08-21 18:28:17 +02:00
David Malchin ee92e7f436 👕 Remove usage of source in client script 2022-08-19 22:51:05 +03:00
Kakarot 8fffc421bb Merge Dev (#794)
* [Update] Stuff and Things - Fix Exploit

- Update doors on teleport so they don't get stuck (requires my doorlock PR that creates a updateDoors() export
- Support for heading with TeleportToCoords event
- Support for teleporting to location name with /tp and a default file with locations to use
- Remove 'QBCore:Server:AddItem' event (requires PR to other resources that use it)
- Support for an array of items that do the same thing with QBCore.Functions.CreateUsableItem
- Player exists check before removing or adding permission
- Trigger OnPlayerUnload as a server side event too
- Player.Functions.GetMetaData function
- Added reason to money remove logs
- Set dirt level to 0 on /car vehicles

* Export to Event

* Deprecate instead of remove?

* Player+License verification fix

* Update events.lua

* Export change for qb-management

* [Hotfix] Errors after Merge

* [Change] src to source

* Prevent people using /me to troll

This prevents people using that /me troll with the huge font size and different colors.

* Remove DoorUpdate event

* Update client/events.lua

Co-authored-by: BerkieBb <82737367+BerkieBb@users.noreply.github.com>

* Update server/functions.lua

Co-authored-by: BerkieBb <82737367+BerkieBb@users.noreply.github.com>

* Adjustments for BB

* Linting

* fix(server/functions): use indexed variables

Co-authored-by: David Malchin <malchin459@gmail.com>

* chore(server/events): remove unnecessary _

Co-authored-by: David Malchin <malchin459@gmail.com>

* chore(server/events): remove unnecessary _'s

Co-authored-by: David Malchin <malchin459@gmail.com>

* chore(server/events): language

Co-authored-by: David Malchin <malchin459@gmail.com>

* chore(server/events): language

Co-authored-by: David Malchin <malchin459@gmail.com>

* chore(server/events): language

Co-authored-by: David Malchin <malchin459@gmail.com>

* chore(server/events): language

Co-authored-by: David Malchin <malchin459@gmail.com>

* chore(server/player): indentation

Co-authored-by: David Malchin <malchin459@gmail.com>

* [Chore] Remove Money

Removed repetitive code that made zero sense

* Update en.lua

* Update player.lua

* Update player.lua

* Update functions.lua

Co-authored-by: ItsANoBrainer <itsanobrainergg@protonmail.com>
Co-authored-by: Scullyy <51968381+Scullyy@users.noreply.github.com>
Co-authored-by: Idris Dev <IdrisDose@users.noreply.github.com>
Co-authored-by: Idris <idrisdev@gmail.com>
Co-authored-by: BerkieBb <82737367+BerkieBb@users.noreply.github.com>
Co-authored-by: David Malchin <malchin459@gmail.com>
Co-authored-by: Chris Usiak <christopher.usiak@oakland.k12.mi.us>
2022-08-19 11:48:39 -05:00
BerkieBb d88e51ee4f Remove inventory code from the core (#784)
* tweak(config): remove inventory code

* tweak(client/functions): remove inventory code

* cleanup(server/commands): remove inventory command

* cleanup(server/events): remove hasitem callback

* cleanup(server/functions): remove inventory code

* cleanup(server/player): remove inventory code

* feat(server/player): QBCore:Player:SetPlayerData server side

Removed QBCore:Server:PlayerLoaded for PR that will be merged before me that adds it

* feat(server/player): QBCore:Server:OnGangUpdate

* fix(shared/items): remove duplicate snowball

* fix(server/events): warn for exploitable event

* fix(server/functions): startup error

* feat(server/player): some backwards compatibility

* fix(server/events): warn for exploitable event

* feat(server/player): Player.Functions.AddField

* feat(server/exports): SetField and AddField

* fix(server/player): inventory state check
2022-08-19 11:33:38 -05:00
David Malchin 7fab401ed2 Fix Styling (#758)
* style: ensure consistent indentation

* style: add spacing

* style: add newlines

* style: simplify html

* fix: update javascript indent size in contribution guidelines
2022-07-18 23:45:46 +03:00
ItsANoBrainer 7daf9f121a Merge branch 'main' into ClientCallbacks 2022-06-15 21:56:46 -04:00
nzkfc a48e11de86 Forces cars to spawn clean
Will ensure cars spawn cleaned instead of random levels of dirt.
2022-06-10 22:10:44 +12:00
ItsANoBrainer 46ba99291c [Feature] Client Callbacks
Creates support for utilization of Client Callbacks.
2022-05-04 21:18:38 -04:00
TheiLLeniumStudios db11c7dcec Fix linting issues 2022-05-04 08:08:29 +00:00
Mycroft d295fdc2ac Merge branch 'main' into main 2022-04-06 19:02:19 +01:00
FekyDEV 9ca5196c24 Deletes the vehicle if the user is already in it 2022-03-24 17:32:47 +01:00
Kakarot 52ac1b3b33 Pull #550 2022-03-22 22:59:53 -05:00
Kakarot 9c818ecd02 Update natives 2022-03-22 22:52:27 -05:00
BerkieBb d1e20143b1 Merge branch 'dev' into dev 2022-03-01 20:08:59 +01:00
BerkieBb 1319c57009 chore(client/events): pvp naming 2022-03-01 19:43:16 +01:00
Idris Dev a76a651379 feat (vehicles): Updated Missing Vehicle Properties
[Update] Missing Vehicle Properties
2022-03-01 18:20:48 +11:00
BerkieBb f50136802f fix(client/events): shared update multiple not updating string keys 2022-02-26 16:23:12 +01:00
Mycroft c787ba66f4 Feat(events): Better TPM Event 2022-02-24 01:27:22 +00:00
ItsANoBrainer dec696a843 Use SetVehicleFuelLevel Native
Use SetVehicleFuelLevel on  QBCore:Command:SpawnVehicle Event
2022-02-19 13:11:28 -05:00
ItsANoBrainer 6ed74c6392 Remove LegacyFuel usage 2022-02-19 12:56:01 -05:00
BerkieBb c615159c28 style(events): indentation 2022-02-18 10:13:08 +01:00
Idris ae29c94a40 feat (Shared): Added the ability to dynamically update the shared jobs, items and gangs. 2022-02-13 20:45:49 +11:00
ItsANoBrainer f7ef019d26 [Update] Missing Vehicle Properties
Added proper support for missing or unfinished vehicle property saving/getting:

- neons enabled/disabled
- tire health
- tire burst state
- tire burst completely
- oil level
- wheel size
- wheel width
- headlight color
- interior color
- modkit 17, 19, 21, 47, 49
- livery roof
- tankHealth

- Set LegacyFuel on setting fuel level
2022-01-27 14:32:14 -05:00
Mitroxs acc435a46a Typo 2021-12-02 23:06:33 +01:00
Mitroxs 6ee16d2262 Introduces PvP toggle: ft command 2021-12-02 23:02:30 +01:00
Mitroxs 8f0e4438b6 Introduces toggle option for PVP 2021-12-01 20:04:07 +01:00
Kakarot 7f4b3ecd9f New plate function 2021-11-08 18:00:58 -06:00
Kakarot 8a19f0163d Fix /ooc & add /me 2021-11-01 00:44:38 -06:00
Taso a5ebf4b9ce chore(styling): ensure consistent indentation & define editorconfig 2021-10-13 21:54:57 -04:00
Kakarot 923f3d3a31 ⚠️ Major Update ⚠️
- Major cleanup of all files including reformatting & notations
- Added an optional export to add to scripts as an alternative to import.lua
- Added player state to OnPlayerLoaded so no more need for isLoggedIn inside scripts
- Updated all events to the new RegisterNetEvent and got rid of unneeded handlers
- Added the ability for ACE permissions with commands
- Added two new config options for player update interval and status update
- Changed players table to use citizenid column as primary key <-- very important
- Overall sloppy code cleanup, removal of unused code, got rid of nil checks
2021-09-24 22:46:20 -06:00
BerkieBb 1279c941d4 Remove unused event 2021-08-13 23:33:47 +02:00
GhzGarage 4d4feeed04 Change coord grabbing back to client 2021-07-07 17:59:44 -05:00