Repository navigation
feat(nui): add live players map to the in-game menu - #1151
Open
someone005 wants to merge 1 commit into
Open
someone005 wants to merge 1 commit into
someone005 wants to merge 1 commit into
Conversation
Signed-off-by: someone <98275381+someone005@users.noreply.github.com>
someone005
force-pushed
the
feat/players-map
branch
from
October 13, 2026 14:14
22a132d to
ba1dffd
Compare
ASTROWwwW
pushed a commit
to ASTROWwwW/better-txAdmin
that referenced
this pull request
Oct 29, 2026
Imported from citizenfx#1151, taking only its feature commit (ba1dffd), which sits on top of unrelated wip commits in that PR. Adapted on import: the 15 MB satellite image is downscaled to 3000x4076 (1.7 MB) because nui/** is downloaded by every player joining the server, and the maximum zoom goes from 32 to 8 to match the image resolution. The origin and the usage rights of the satellite image are not verified. Signed-off-by: someone <98275381+someone005@users.noreply.github.com> Claude-Session: https://claude.ai/code/session_01UkEUa9SLFwKVZvxaBcVkm5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The in-game Players tab currently tells an admin only one thing about a player's location: their distance in meters. That number has no direction, so it doesn't help answer the questions admins actually have during moderation. When a report comes in about a fight, a griefer or a player stuck somewhere, the admin has to either teleport to the player blindly or spectate players one by one to understand what is going on. The list also can't show relations between players, so there is no quick way to notice that ten people have gathered in one spot, that someone is far outside the area where a roleplay scene takes place, or that a player is moving across the map in a way that doesn't look legitimate. On busy servers this costs time with every report, and it is exactly the kind of overview that a list of names cannot give.
Change
This PR adds a live map to the in-game Players tab. A new round button with a pin icon in the bottom-right corner switches the tab from the list to a satellite map of GTA V, where every player is shown as a circle with their server ID. When players are so close that their circles overlap by at least 20%, the circles merge into one placed between them, showing the number of players (or
9+for ten or more), so crowded areas stay readable instead of turning into a pile of overlapping markers.Clicking a single player opens the same player modal as clicking them in the list, so all existing actions are one click away. Clicking a merged circle opens a side list of the players in it, and each of them can be clicked as well. The map can be zoomed with the mouse wheel and moved by dragging, and it can't be dragged past its edges. It respects the current search and filter, and while it is open, positions refresh every 2.5 seconds instead of the list's usual 5.
Notes
The feature requires OneSync. The server was already collecting player coordinates for the distance column, so the only change on the Lua side is that the client now passes them to the NUI. The map button is hidden on RedM, since the map is GTA V only.
The map image (
nui/public/images/map-satellite.jpg, 5944x8075, about 15MB) is kept at full resolution on purpose, because a smaller image became visibly pixelated when zoomed in. Coordinates were calibrated against 12 known in-game landmarks, and the error is at most around 7 game units, which is smaller than a player marker.For now this is only in the in-game menu. If there is a need or request for it, it can also be added to the web panel, either in this PR or in a follow-up one.
Previews