From 7076d4f4aab834d845d79821ff7d51efb3909515 Mon Sep 17 00:00:00 2001 From: Grav <75702884+Gravxd@users.noreply.github.com> Date: Tue, 25 Jun 2024 12:49:28 +0100 Subject: [PATCH 1/2] fix(client/spectating) caching original routing bucket --- client/admin_client.lua | 4 +++- client/gui_c.lua | 4 ++++ server/admin_server.lua | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/client/admin_client.lua b/client/admin_client.lua index 19180471..8329374f 100644 --- a/client/admin_client.lua +++ b/client/admin_client.lua @@ -183,7 +183,9 @@ RegisterNetEvent("EasyAdmin:requestSpectate", function(playerServerId, playerDat if playerData.selfbucket then -- cache old bucket to restore at end of spectate - MyBucket = playerData.selfbucket + if not IsSpectating then + MyBucket = playerData.selfbucket + end end local tgtCoords = playerData.coords diff --git a/client/gui_c.lua b/client/gui_c.lua index df0306a2..f493bfe6 100644 --- a/client/gui_c.lua +++ b/client/gui_c.lua @@ -185,10 +185,13 @@ Citizen.CreateThread(function() end end) +IsSpectating = false + function DrawPlayerInfo(target) drawTarget = target drawServerId = GetPlayerServerId(target) drawInfo = true + IsSpectating = true DrawPlayerInfoLoop() end @@ -196,6 +199,7 @@ function StopDrawPlayerInfo() drawInfo = false drawTarget = 0 drawServerId = 0 + IsSpectating = false end local banlistPage = 1 diff --git a/server/admin_server.lua b/server/admin_server.lua index 3b5a8ea2..8f7722f9 100644 --- a/server/admin_server.lua +++ b/server/admin_server.lua @@ -327,7 +327,7 @@ Citizen.CreateThread(function() local playerBucket = GetPlayerRoutingBucket(playerId) local sourceBucket = GetPlayerRoutingBucket(source) if sourceBucket ~= playerBucket then - -- upon spectate request, the admin needs to be set to the target player + -- upon spectate request, the admin needs to be set to the target player's bucket if not already SetPlayerRoutingBucket(source, playerBucket) end local playerData = { coords = tgtCoords, selfbucket = sourceBucket } From aadcbdaef084b90e1edf5c664006af1d160521c2 Mon Sep 17 00:00:00 2001 From: Grav <75702884+Gravxd@users.noreply.github.com> Date: Tue, 25 Jun 2024 13:05:34 +0100 Subject: [PATCH 2/2] update readme to include ban screen updates from previous PR/Version --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 2658ab8f..da691a9a 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ EasyAdmin is an Administration Suite for FiveM and RedM Servers, EasyAdmin is fe - Actively Supported & Updated since 2017 - Plugin Support - Fully integrated Discord Bot, including Discord ACE Permissions, Chat Bridge, Commands and Logs +- Configurable ban screens allowing server owners to modify to their colours/logo etc via our [easy to use convars](https://easyadmin.readthedocs.io/en/latest/config/#ban-screen-configuration) ![image](https://user-images.githubusercontent.com/13604413/126916981-1680e5ac-e024-467b-aad3-a5a9658449e0.png) @@ -25,6 +26,8 @@ EasyAdmin is an Administration Suite for FiveM and RedM Servers, EasyAdmin is fe ![image](https://user-images.githubusercontent.com/13604413/126916989-f78d7b16-d20a-49ba-a559-6c3b56e98de5.png) +![image](https://github.com/Gravxd/EasyAdmin/assets/75702884/8a4e4694-5ff5-429a-986c-ab43148929a8) + ### Dependencies EasyAdmin requires FiveM's default `yarn` resource, this is included in [cfx-server-data](https://github.com/citizenfx/cfx-server-data) when installing the server.