Commit Graph

48 Commits

Author SHA1 Message Date
Linden b7c521c8e7 feat(server): database optimisations
Limited testing, but works in a fairly clean ESX environment. Sets up foreign keys in the database to allow for easy and optimised character deletion.

Foreign keys will only be set where owner and identifier columns exist, the field cannot be NULL and uses VARCHAR.
2022-02-12 06:03:23 +11:00
Linden 72450dfcd6 refactor: swap to oxmysql
ESX officially uses oxmysql with new syntax, so follow suite.
2022-02-12 05:58:45 +11:00
Linden 874eeef86c fix(server): connection string parser 2021-12-02 01:48:22 +11:00
Linden 150ec165fc fix(server): clone and wipe the playerlist when restarting the resource
Since we're looping through the table, we end up trying to index new values as they are added.
2021-11-21 17:26:29 +11:00
Linden 2635ce9fbb fix(server): added missing symbols 2021-11-11 07:26:37 +11:00
Linden e19f99fdca refactor(server): update deferral messages 2021-11-09 14:12:04 +11:00
Olvidate 8402cf4236 fix(server): fixed error with identifiers
Fixed error when you don't have a identifier, Steam open for example.
2021-11-08 18:55:42 -03:00
Linden a9960ef3f5 refactor: move server settings to config
Added support for sv_lan to allow use with FxDK.
Added support for ESX forks with Config.Identifier
2021-10-29 12:17:04 +11:00
Linden 3fe1f438df chore(server): Update error messages and manifest 2021-10-26 02:26:44 +11:00
Linden e3c7e5ce5c feat(server): Utilise transactions to reduce server load 2021-10-26 00:58:10 +11:00
Linden c9749c0b40 refactor(server): Remove redundant local values and check result size 2021-10-26 00:20:59 +11:00
Linden 8255fa2014 feat(deferrals): Prevent connection when identifier is in use
Only recently came to my attention that this was a concern. Since ESX and identity only check a raw identifier vs a player identifier (which contains a prefix) it doesn't prevent multiple logins.
2021-10-25 15:47:57 +11:00
Linden ebae4354ce fix(server): Correctly resolve database name for URI connection strings
URI-connection strings would incorrectly parse the database name when using additional options as part of the string (i.e. "ESXLegacy?charset=utf8mb4").
Correctly check for these options and match the string accordingly.

Also just better pattern matching in general.
2021-10-23 11:58:18 +11:00
Linden f46277e262 feat(server): Improve GetJobs function
- If using an ESX version with the getter, use it instead for better performance
- General refactor and ensure compatibility with oxmysql
2021-10-16 09:03:31 +11:00
Linden 95e9f2bbe8 feat(server): Parse mysql_connection_string for database 2021-10-16 08:43:51 +11:00
Demetrio 5f5b0138f0 feat(chars): enable or disable a specific character of a player (#43) 2021-08-21 00:56:48 +10:00
Demetrio 52250d0d49 Dynamic slots (#36)
* Removed slots configuration

* feature: dynamic slots

* fixes + improvements

* edited core functionality

* added commands for slots management

* added commands english locale

Co-authored-by: d3rp-jsx <15928886+derp-jsx@users.noreply.github.com>
2021-08-11 03:31:30 +10:00
Linden 9dbe1c5cbe fix: Ensure character is deleted on the server before refreshing client 2021-07-26 21:00:13 +10:00
Linden 861dfcda88 Update main.lua 2021-07-21 13:30:44 +10:00
Linden f3eb335547 refactor(server): Should be using Async here 2021-06-28 18:54:50 +10:00
Linden b081008863 improvements(client): Fix nil value; overhauled most of the character selection and spawning logic 2021-06-28 00:27:34 +10:00
Linden 7acd7bc5a0 feat(server): Set VARCHAR(60) automatically; improvements to SQL.ready functions 2021-06-27 13:29:11 +10:00
Linden 482139aa4a fix(server): Display the correct job/grade for each character 2021-06-26 13:44:56 +10:00
Linden e9885a22f2 improvement(server): Changed method to retrieve ESX.Jobs; do not define grade if unemployed; use ESX import for server 2021-06-26 05:30:57 +10:00
Linden 7ff0efea21 Support for ESX Legacy 1.3.3
* improvement(server/main): Moved registration event handler out of ESX (support for 1.3.3)

* refactor(server/main): Increase allowed length for charid to 2

* Update fxmanifest.lua
2021-06-24 02:12:48 +10:00
Linden 59b5ea85fd chore(server/main): Add a delay before printing about multicharacter being disabled; print twice 2021-06-22 12:46:49 +10:00
Linden 273c333cfe fix(server/main): Check if job/grade exist 2021-06-18 10:37:13 +10:00
Linden 4928da788b refactor(server/main): Include the varchar command by default so people don't misplace it 2021-06-06 07:14:54 +10:00
Linden 5c70b094ef fix(server/main): Remove waits 2021-05-30 10:24:30 +10:00
Linden 46ef7d8094 improvement(server/main): Store the character selection query in advance 2021-05-28 10:16:01 +10:00
Linden b125fa91fc tweak(server/main): Removed leftover print 2021-05-28 05:57:19 +10:00
Linden 8a5cd887ce tweak(server/main): Modify variable names; add warnings when multichar is disabled or not running Legacy; send the identifier prefix to ESX 2021-05-28 05:47:12 +10:00
Linden ceaf32bd80 fix(client): Prevent player from spawning without a model 2021-05-23 23:00:03 +10:00
Linden 651b445f6a improvement(server): Replace relog command to relog with event 2021-05-22 17:45:04 +10:00
Linden b1dade2c47 fix(server): Use the prefix variable when deleting character 2021-05-21 23:02:54 +10:00
Linden 1079eb0b40 fix(server): Try updating ESX.Jobs after the first player joins
Should resolve the issue with slow queries preventing proper setup
2021-05-21 19:35:57 +10:00
Linden 0703767211 refactor(server): Moved character setup into a function so it can be called from server 2021-05-21 07:25:36 +10:00
Linden 5bf41ac579 refactor(rewrite/server): Modified events and data being sent to client 2021-05-20 22:43:57 +10:00
Linden a86774b159 fix(server): Resolve an issue deleting characters 2021-05-20 05:52:29 +10:00
Linden e230c28855 fix+refactor(server): Ensure ESX.Jobs gets updated
Also moved the contents of `GetTables()` out and removed the function
2021-05-18 00:31:08 +10:00
Linden 837fd4e9a5 improvements(client): Conceal the player during character selection; ensure loading screens are disabled 2021-05-17 20:28:09 +10:00
Linden cdfcb1ebe7 feat: Support logging out to character select 2021-05-17 02:04:46 +10:00
Linden 5d3f2884dc Begin rebranding (refactor+rewrite)
- Kashacters events renamed
- Update MySQL.Async queries to modern standards and remove string concatenation
- Rewrote `GetPlayerCharacters` to only use relevant information
2021-05-17 01:21:11 +10:00
Linden f4731ac941 Update main.lua 2021-05-13 05:01:49 +10:00
Linden e0d5e4fa55 Define ESX, then grab ESX.Jobs a second later 2021-05-12 03:02:54 +10:00
Linden 9eafba17d8 Require ESX.GetConfig().Kashacters | Get job and grade data from ESX (don't query db on every login) 2021-05-12 01:36:54 +10:00
Linden b4e5ed6480 Update for ESX Legacy; nuclear disarmament 2021-05-11 19:38:32 +10:00
Linden 07fdc90531 Move files to main directory 2021-05-11 19:30:03 +10:00