Commit Graph

186 Commits

Author SHA1 Message Date
Linden 5dad65298c Merge branch 'main' into async/master 2021-06-25 06:08:20 +10:00
Linden c44fdf0e64 Merge remote-tracking branch 'esx_basicneeds/master' 2021-06-25 06:04:07 +10:00
Linden 27781811b2 Merge remote-tracking branch 'esx_status/master' 2021-06-25 06:03:56 +10:00
Linden bd21330485 Merge remote-tracking branch 'esx_accessories/master' 2021-06-25 06:01:32 +10:00
Linden 28d4ed59d0 Merge remote-tracking branch 'cron/master' 2021-06-25 05:54:23 +10:00
Linden 2c1eb8ceb9 Async 2021-06-25 05:54:19 +10:00
Linden 5878f71a0e Revert "Setup repository"
This reverts commit b656ed6a43.
2021-06-25 05:34:42 +10:00
Linden b656ed6a43 Setup repository 2021-06-25 04:00:05 +10:00
ESXCrackhead 92a9779f93 Merge pull request #59 from thelindat/patch-2
fix(client/main): Fix nil tables after dying; resolve server hitch from update event
2021-06-23 08:06:39 -05:00
ESXCrackhead f034e2b95f Merge pull request #53 from thelindat/patch-1
improvement(client/main): Minor optimisation - use the esx_status:onTick event
2021-06-23 08:04:53 -05:00
Linden 4aa9525fcf fix(client/main): Remove update triggerserverevent when modifying statuses (it only needed to trigger with the interval) 2021-06-14 17:49:00 +10:00
Linden 0087ace534 refactor(client/main): Use pairs loop 2021-06-13 09:04:56 +10:00
Linden 5aa50f5ac7 improvement(client/main): Minor optimisation - use the esx_status:onTick event
The event was added to esx_status late 2018 but never utilised anywhere; using it here drops ms to 0.0 at all times.

#### Note: This event can and should also be used in various HUDs to improve performance.  
Many of them use 500ms threaded loops, despite status only updating every 1s by default.  
They also use individual event callbacks to retrieve each status value, while each value is already being sent in the event.
2021-06-09 12:37:33 +10:00
Linden acb264c027 revert(client/main): Go back to table.insert for GetStatusData
Not even sure why I did it as size+1 and not i; but doesn't seem to work with index anyway.
Fixes nil value after dying
2021-06-07 11:14:54 +10:00
ESXCrackhead 6aed226671 Merge pull request #58 from thelindat/patch-1
fix(client/main): Ensure the hud displays initially; get the visibility of statusbars correctly
2021-06-06 17:14:18 -05:00
Linden 97d7e5186b fix(client/main): Ensure the hud displays initially; get the visibility of statusbars correctly 2021-06-07 08:07:10 +10:00
Taso d752235eb4 Merge pull request #57 from thelindat/master
refactor+fix(server/main): Check if using Legacy; use ternary to define xPlayers; fixed incorrect values when defining xPlayer
2021-06-05 18:23:41 -04:00
Linden b3c20e174b fix(server/main): Fix incorrect values (if v is table, xPlayer equals v; else GetPlayerFromId(v)) 2021-06-06 05:57:46 +10:00
Linden 16b1fc3316 refactor(server/main): Cache if ESX.GetExtendedPlayers() exists; use short-circuit evaluation to define xPlayers 2021-06-05 12:35:16 +10:00
Taso bbc848e699 Merge pull request #56 from thelindat/master
(legacy): Resolve server hitches; add support for relogging; (general): improved clientside performance
2021-06-04 21:41:32 -04:00
Linden 16d97ec1e3 chore(config): Define the default value for Display 2021-06-04 13:15:44 +10:00
Linden 20b2319e97 refactor(client/main): Remove unused variable; optimisations
- Status.max was never defined anywhere (always nil) and was not referenced anywhere
- Add a toggle for status bars (Config.Display); setting to false reduces CPU usage
- onTick thread no longer retrieves StatusData twice; receives the minimal data then adds the other variables if Display is enabled
2021-06-04 13:14:56 +10:00
Linden 98687c3b38 fix(nui/js): Use the percent value already being sent by Lua 2021-06-04 12:59:15 +10:00
Linden 5a8e750287 fix(client/main): Disable status bars after relogging 2021-06-04 11:45:22 +10:00
Linden 97289e615b fix(client/main): Prevent multiple onTick threads from running at once after relogging 2021-06-04 11:41:57 +10:00
Linden 0cc776dfc3 refactor(server/main): Removed duplicate code and use type when defining xPlayer 2021-06-03 07:12:09 +10:00
Linden ee3d1d024f improvement(server/main): Use the new xPlayer loop when restarting the resource 2021-05-28 10:29:02 +10:00
Linden d876399bab chore(server/main): Removed leftover debug code 2021-05-28 10:08:26 +10:00
Linden b823e7d557 fix(legacy/multichar): Clear player status when logging out 2021-05-28 09:58:24 +10:00
Linden ae9cde16e8 improvement(server/main): Use the new xPlayer loop when using ESX Legacy 2021-05-28 09:55:32 +10:00
FuraXx f9b73b8c31 Initial commit 2021-05-16 13:53:20 +02:00
LazarusOfTheFallen 3d526522fa Merge pull request #50 from Tinky124/patch-1
Fix server hitch warning
2021-02-02 16:59:02 -06:00
Tinky 74335672ea Fixed losing functionality when restarting script 2021-02-02 19:28:48 -01:00
LazarusOfTheFallen e7b778f0c7 Merge pull request #9 from Yarpii/patch-1
Update
2021-02-01 16:57:22 -06:00
LazarusOfTheFallen dcde286747 Merge pull request #50 from trkyshorty/master
Turkish translation implemented
2021-02-01 14:53:28 -06:00
LazarusOfTheFallen 3f09616dfc Merge pull request #44 from PainedPsyche/master
fix for status values reset on login bug (issue #39)
2021-02-01 14:51:54 -06:00
Tinky ea844e81da Better just to remove this... Too many hitch 2021-01-24 21:17:01 +01:00
Tinky 49f1668b0a Fix server hitch warning 2021-01-23 21:19:32 +01:00
ArkSeyonet ce3fe5465c Merge pull request #49 from steveski/master
Update main.lua
2021-01-11 17:07:46 -06:00
Stephen York a12046120c Update main.lua
Added player count to avoid running script when no players are on
2021-01-07 10:29:05 +11:00
Stephen York 925bd4559e Update main.lua
Replace recursive call to saveData with CreateThread and a timer.
Loop now builds when and where clauses for a set operation update against multiple records with a single mysql execute rather than a single update PER player.
2021-01-04 12:53:56 +11:00
Türkay Tanrıkulu cdf74f0347 Update tr.lua 2020-12-20 06:37:00 +03:00
Türkay Tanrıkulu b12ca873e1 Turkish translation implemented 2020-12-20 06:35:59 +03:00
Christopher Gjelten e812dde63b Merge pull request #36 from HypeLevels/patch-1
Update config.lua
2020-12-08 20:53:21 +01:00
HypeLevels 59bb6e93e3 Update config.lua
Changed default language to english as its the universal language
2020-12-01 21:40:00 +00:00
Christopher Gjelten 9a35c8f53f Merge pull request #49 from tabarra/patch-1
Update esx_basicneeds.sql
2020-12-01 18:00:35 +01:00
tabarra e485868bc8 Update esx_basicneeds.sql 2020-12-01 10:54:20 -03:00
Christopher Gjelten a5fb0ece29 Merge pull request #48 from HypeLevels/patch-1
Update config.lua
2020-12-01 14:47:54 +01:00
Jeffrey Stendert bad3c6770a Update
keep it clean as ```async.lua``` is been shared so it should be a shared script and not server/client
2020-11-30 14:13:21 +01:00
HypeLevels 4f7653abe7 Update config.lua
Changed the default language to be English it is the universal language.
2020-11-28 22:25:52 +00:00