Commit Graph

140 Commits

Author SHA1 Message Date
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
GR-Scripts 9d6143c7a9 Set job duty status at player login 2025-12-15 05:13:21 +01:00
Cocodrulo e288b742c8 Add function to retrieve player's full name from character data 2025-01-08 13:25:07 +01:00
Mustache Dom 304a6f42a0 Update player.lua 2024-11-07 20:47:22 -08:00
Mustache Dom 1ce5dd831b Update player.lua 2024-11-07 20:22:12 -08:00
Mustache Dom 080556c425 checks to see if RemoveMoney has enough
removes exploit to allow bank to be -99999999999
2024-10-22 15:07:23 -07:00
Zerio 5d2ee040b3 feat: add same validation for gangs as for job 2024-05-26 07:55:38 +02:00
Zerio 3d6760b402 fix: what should happen for non existant jobs? 2024-05-26 07:55:11 +02:00
Zerio ffc67e0347 fix: validate job info upon player login 2024-05-26 00:21:29 +02:00
Kakarot d479831d0d server functions 2024-05-23 02:39:29 -05:00
Toretto 8a9849b803 Merge branch 'main' into main 2024-05-21 00:16:35 +01:00
Kakarot 435c5335a3 Inventory Update 2024-05-20 05:28:38 -05:00
t0retto 07099e64a5 fix: annoying typo 2024-05-18 22:29:51 +01:00
Kakarot 7a0d4830cc Merge branch 'main' into optimizations 2024-05-11 19:12:32 -04:00
Kakarot 1ac602bbcc Merge branch 'main' into patch-1 2024-05-11 18:58:10 -04:00
Kakarot c068817f17 Merge branch 'main' into optimizations 2024-05-11 18:57:53 -04:00
Joel 20fe7e471c Fix: Set job boss value to grade value
Updates the job table's `isboss` value based on the grade
2024-05-05 09:25:03 +01:00
Kakarot 06f92b657c Update player data format & queries 2024-05-01 02:25:54 -05:00
EinS4ckZwiebeln 868600197d Optimizations 2024-03-28 12:56:32 +01:00
AdrianCeku 7bdcfccac8 Fixed bug where player.Functions.HasItem would execute QBCore.Functions.HasItem but not return the value 2024-02-27 20:34:45 +01: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 4149582c44 Remove unused metadata 2023-11-08 02:22:37 -06:00
Kakarot a73e878487 Weapon attachment rework 2023-11-03 09:40:35 -05:00
Kakarot 4a0993591b Merge branch 'main' into main 2023-09-23 15:12:10 -05:00
Cocodrulo 1769fbe8b0 Update player.lua
A more comprehensive way of notifying a player and checking if a player has items from the server side.
2023-08-18 14:49:08 +01:00
Daniel GP 5998d92a9b Fix bad implemention with SQL Function 2023-06-02 22:09:52 +02:00
Daniel GP 4b1acec5d1 Update query function 2023-06-01 21:23:00 +02:00
Daniel GP b156f5c658 Add GetPlayerByLicense function 2023-05-15 22:26:06 +02:00
mmoftah 0255c37a2d Have SetJobDuty also trigger job updates 2022-09-21 16:38:10 -04:00
Anton Stjernquist 7aefc17c2b feat: send reason with event 2022-09-07 22:43:58 +02:00
Linden 1cd8503ee1 fix(server/player): don't refresh commands when updating PlayerData 2022-09-01 07:31:54 +10:00
Zerio ad703290fd Update server/player.lua
Co-authored-by: David Malchin <malchin459@gmail.com>
2022-08-29 21:05:20 +02:00
Zerio 6b5ddc2c61 Add force deletion of characters 2022-08-27 16:38:07 +02:00
BerkieBb d563a89891 fix(server/player): add forgotten variable for setmoney 2022-08-24 15:06:40 +02:00
BerkieBb 59ae47fa92 feat(server/player): hud update on SetMoney 2022-08-24 15:05:12 +02:00
Kakarot e01399f799 Merge pull request #804 from BerkieBb/main
fix(server/player): cap for thirst and hunger
2022-08-21 18:44:27 -07:00
BerkieBb 4412ef29ca fix(server/player): cap for thirst and hunger 2022-08-22 01:32:51 +02:00
David Malchin ce216ad676 🎨 Rename locales and remove notify translation type 2022-08-21 23:48:45 +03:00
ChatDisabled a1d80b8481 server/player.lua 2022-08-21 18:37:45 +02:00
ChatDisabled 89f1bc0440 Sigh 2022-08-20 23:52:25 +02:00
BerkieBb 3bb0547548 feat(server/player): money change listeners 2022-08-20 13:39:14 +02: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
Gürkan 0e07fea92d update player.lua - To fix number check
"GetPlayerByPhone" fixes some players' phone number not matching
2022-08-18 03:10:04 +03:00
BerkieBb c52e501588 fix(server/player): wrong type 2022-08-10 17:37:29 +02:00
BerkieBb b1e1c11788 fix(server/player): example 2022-08-10 16:14:10 +02:00
BerkieBb 177925f126 feat(server/player): AddPlayerMethod 2022-08-10 15:05:24 +02:00
BerkieBb 827819d002 Fix optin toggle and add SetPlayerData function to player object (#757)
* feat(server/player): SetPlayerData

* fix(server/functions): toggling optin
2022-07-27 11:07:04 +03: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