A simple and minimalistic player ID HUD for FiveM servers.
- Displays the player's server ID in a small, unobtrusive container.
- Allows toggling the visibility of the HUD.
- Supports moving the HUD horizontally across the screen.
- Saves and loads the display state and position using localStorage.
- Fades in and out smoothly when toggled.
- Resets the position of the HUD with a keybind.
- Download the latest version of the resource.
- Place the
sg-pid
folder in your server'sresources
directory. - Add
ensure sg-pid
to yourserver.cfg
file. - Configure the keybinds in the
client.lua
file if desired. - Customize the styling of the HUD in the
style.css
file if needed. - Restart your server.
- The player ID HUD is enabled by default when a player connects to the server.
- Players can toggle the visibility of the HUD by pressing the designated keybind (default:
F9
). - Players can move the HUD horizontally by holding the
SHIFT
key and pressing the designated keybind (default:F9
).- While moving the HUD, players can click to position it or press
ESCAPE
to stop moving.
- While moving the HUD, players can click to position it or press
- The display state and position of the HUD are automatically saved and loaded using localStorage.
-- Toggles the visibility of the HUD
exports['sg-pid']:ToggleHud(bool)
- bool: true to show the HUD, false to hide the HUD.
- This export can be used to programmatically toggle the visibility of the HUD if needed.
exports['sg-pid']:isHudActive()
- Returns the current display state of the HUD
- Returns true if the HUD is currently visible, false otherwise.
- This export can be used to check the current display state of the HUD.
- Created by: Nicky
- SG Scripts Discord