152 Commits

Author SHA1 Message Date
Kakarot 02397cfc5a Refactor player system and API
Large refactor of server/player.lua to modernize the player system and public API. Introduces a Player metatable with cleaner Player.Functions interface, offline player support, and centralized data validation/merge logic (CheckPlayerData, applyDynamicDefaults, merge/prune helpers). Adds unique ID generators, improved money logging/notifications, and safer save/delete flows (including ForceDeleteCharacter). Replaces old Login/Logout/CreatePlayer flows, exposes exports (GetPlayer, GetPlayerByCitizenId, GetOfflinePlayerByCitizenId, GetPlayerByLicense, GetOfflinePlayerByLicense, AddPlayerMethod, AddPlayerField) for runtime integration, and improves inventory and job/gang handling. Overall aims: clearer runtime API, offline lookups, and more maintainable player persistence and event synchronization.
2026-05-12 23:40:29 -05:00
Kakarot 7536889ccc new method exp 2025-07-06 16:00:23 -05:00
Kakarot 6d09c49fe2 return on improper usage 2025-07-06 13:25:48 -05:00
Kakarot 446b984da4 backwards compat testing 2025-07-06 13:01:01 -05:00
Kakarot 33c6dc8ac8 more testing 2025-06-22 13:35:42 -05:00
Kakarot 8f883ccd2a add more returns for validation 2025-06-01 15:19:33 -05:00
Kakarot 670ab320c7 cleanup file 2025-06-01 15:08:42 -05:00
Kakarot 669ce782dd combine functions 2025-06-01 13:57:24 -05:00
Kakarot 521327494c metatable testing 2025-06-01 13:43:44 -05:00
Kakarot eb4a573411 move paychecks 2025-06-01 13:14:11 -05:00
Kakarot d88d91b9e3 updates 2025-05-11 19:05:51 -05:00
Kakarot a437265c68 reset branch 2025-05-10 09:29:59 -05:00
Kakarot 11052e2aac wip player creation with state and backward compat 2025-03-11 23:32:11 -05:00
Kakarot e1024cd061 Remove old server files 2025-03-11 23:08:14 -05: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