# Players

See who's in the city, find any player who ever joined, warn, kick and ban with every punishment's history, use staff commands in game and follow the player and performance charts.

Source: https://fivedash.fivex.gg/docs/en/server/players

On any **Server** page, the sidebar on the right shows who's in the city. **Server → Console** has the **Charts** (with everyone who ever joined) and the **Punishments**. It's what txAdmin does with players, inside FiveDash.

## Before you start

* **Resource:** the `fivedash` resource at version **0.9.0** or newer, connected. It updates itself; see [Install the resource](https://fivedash.fivex.gg/docs/en/getting-started/install-resource).
* **Agent (for the performance charts):** the [FiveDash Agent](https://fivedash.fivex.gg/docs/en/server/agent) at version **0.1.7** or newer. Without it, the charts show players only.
* **Access level:** **Players**. **View** shows lists, history and charts; **Manage** also warns, kicks, messages, announces and uses the commands in game; **Configure** also bans, revokes bans, kicks everyone and changes the settings.

## What FiveDash keeps

Each player is kept by their Rockstar **license**, as in txAdmin. With it:

| Data                  | What it is                                                                                                         |
| --------------------- | ------------------------------------------------------------------------------------------------------------------ |
| Name                  | The last one they joined with, without color codes                                                                 |
| Identifiers           | `license`, `license2`, `discord`, `steam`, `fivem`, `xbl` and `live` seen with that license. The IP is never kept. |
| Hardware tokens       | The PC tokens FiveM gives, for bans that catch another account on the same PC                                      |
| Playtime and sessions | Every join and leave, with why they left                                                                           |
| First and last time   | When they first joined and when they were last seen                                                                |
| Notes                 | What the staff wrote about them                                                                                    |

Sessions are kept 180 days, and the charts' points 30 days.

## In the city and players

**In the city**, in the sidebar on the right, shows who's playing now: their name, their Discord name and photo (read by the city's bot), their server ID, how long this session has lasted and their total playtime. Click someone to open their profile. Under the list are **Announce** and **Kick everyone**: hover an icon to see its name.

In **Console → Charts**, the list at the end of the page searches everyone who ever joined: by name, notes or an identifier. For identifiers, you can paste just the Discord number or the license's 40 characters. Filter by who's online, banned or has a note, and sort by last time, first time or playtime.

## The player's profile

| Tab             | What it shows                                                                         |
| --------------- | ------------------------------------------------------------------------------------- |
| **Info**        | First and last time, playtime, sessions, the active ban (if any) and the notes        |
| **History**     | Everything the staff did to them: warnings, kicks, messages and bans, with who did it |
| **Sessions**    | Their last 20 stays: when, how long and why they left                                 |
| **Identifiers** | The identifiers and tokens seen, to copy or remove from the profile                   |

Removing an identifier or a token helps with, for example, a token from a PC the player no longer uses. If they join with it again, it comes back. The player's license never goes.

## Punishments

| Action               | What happens                                                                                                                                                                                              |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Warn**             | Goes in the history with a code (`W…`). If the player is in the city, the warning shows on their screen until they hold **SPACE** for 10 seconds. If not, it shows when they come back and start walking. |
| **Kick**             | Takes the player out of the city with the reason. Online players only.                                                                                                                                    |
| **Message**          | A private message on their screen and chat. Online players only.                                                                                                                                          |
| **Ban**              | Gets a code (`B…`) and holds against every identifier and token seen with the player. Someone in the city leaves at once.                                                                                 |
| **Ban identifiers**  | A ban on identifiers pasted by hand, for someone who never joined. It's in the **Punishments** menu.                                                                                                      |
| **Announce**         | A notice on everyone's screen in the city                                                                                                                                                                 |
| **Kick everyone**    | Takes everyone out of the city, for example before maintenance                                                                                                                                            |
| **Unban**            | Undoes a ban, several picked at once, or every one made in a period (the last hour, the last day or whatever you choose). Needs the **Configure** level.                                                  |
| **Revoke a warning** | Undoes a warning, from the history in the player's profile                                                                                                                                                |

A ban lasts 2 hours, 8 hours, 1 day, 2 days, 1 week, 2 weeks, a number of hours, days, weeks or months (a month is 30 days), or forever. The ban templates in the settings fill in the reason and the duration.

Someone banned who tries to join sees the code, the reason, when it ends, who banned (unless the city hides its staff) and the city's message. The resource keeps the bans on the server itself, so they hold even if FiveDash is down.

**Punishments** shows who's banned, searchable by name, code, reason or identifier and filtered by active, expired and revoked, with the numbers, the bans per day, the reasons and who bans most. Each player's warnings, kicks and messages are in their profile's **History**.

## Staff commands in game

Whoever has the **Manage** level on **Players** and signs in to FiveDash with Discord can use `/fd` in game. The game recognizes them by the Discord they play with. Use `/fd help` to see the commands.

| Command                                           | What it does                                                               |
| ------------------------------------------------- | -------------------------------------------------------------------------- |
| `/fd noclip` and `/fd god`                        | Fly without collision and become invincible (toggle)                       |
| `/fd tpm`, `/fd tp x y z`, `/fd back`             | Go to the map marker, to coordinates, and back to where you were           |
| `/fd goto id` and `/fd bring id`                  | Go to a player or bring them                                               |
| `/fd heal [id\|all]`                              | Heal yourself, a player or everyone                                        |
| `/fd spectate id` and `/fd freeze id`             | Watch a player and freeze them (toggle)                                    |
| `/fd car model`, `/fd fix`, `/fd boost`, `/fd dv` | Spawn, fix, upgrade and delete vehicles                                    |
| `/fd clear radius`                                | Clear the area around you (up to 300 m)                                    |
| `/fd ids`                                         | Show the IDs of players nearby                                             |
| `/fd announce text` and `/fd dm id text`          | Announce to everyone and send a private message                            |
| `/fd kick id reason` and `/fd warn id reason`     | Kick and warn                                                              |
| `/fd ban id duration reason`                      | Ban (**Configure** level); duration like `2h`, `1d`, `1w`, `30d` or `perm` |

Kicks, warnings and bans made in game go in the history under the name of who made them.

## Charts

Pick **24 h**, **7 days** or **30 days**.

| Chart                      | What it shows                                                                                                                     |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| Players                    | How many were in the city, with the slot limit                                                                                    |
| Machine                    | The machine's processor, memory and disk now, what uses the memory (FXServer, MySQL/MariaDB, agent) and the network (agent 0.1.8) |
| CPU                        | FXServer's use as % of the whole machine: the average and the peak, or beside the machine (agent)                                 |
| Memory                     | What FXServer has in RAM, or beside the machine (agent)                                                                           |
| Network                    | The machine's traffic per second (agent 0.1.8)                                                                                    |
| FiveDash Agent             | What the agent costs the machine, how long each sync takes and how many fail (agent 0.1.8)                                        |
| Performance                | The main thread's tick time: the average, the worst of 95% and the share above 50 ms (agent)                                      |
| Ticks by range             | How the last 5 minutes' ticks spread, per thread (svMain, svNetwork, svSync), as in txAdmin                                       |
| Leaves                     | Why players left: by the player, by a resource, connection lost, game crashed, security or other                                  |
| Crashes and resource kicks | The crash reasons and the resources that kicked the most                                                                          |
| New and unique per day     | How many joined for the first time and how many played each day                                                                   |
| Peak hours                 | The average players by weekday and hour                                                                                           |

Restarts and deploys show as lines on the charts. The machine's and the agent's readings only show to who sees the Console or the Agent. MySQL only shows when Windows lets the agent read its process.

Leaves the server caused by shutting down aren't counted.

## Settings

| Option                                        | What it does                                                                                                   |
| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| **Keep out a banned player's other accounts** | How many hardware tokens matching a ban are enough to keep another account out (default 1; it can also be off) |
| **Ban message**                               | Added to what a banned player sees, for example how to appeal                                                  |
| **Maintenance mode**                          | Only the staff gets in. Everyone else sees the city is under maintenance.                                      |
| **Hide who acts**                             | Players see "the staff" instead of who punished or messaged them                                               |
| **txAdmin events**                            | Also fires the `txAdmin:events:*` events for scripts made for txAdmin                                          |
| **Ban templates**                             | Ready reasons and durations for the ban form                                                                   |

## Events for scripts

The resource fires, on the server, `fivedash:events:<name>` with txAdmin's payloads: `announcement`, `playerKicked`, `playerWarned`, `playerBanned`, `playerDirectMessage`, `actionRevoked`, `playerHealed`, `scheduledRestart` and `serverShuttingDown`. With **txAdmin events** on (and txAdmin not running), it also fires `txAdmin:events:<name>`, so scripts that save data before a txAdmin restart keep working.

```lua
AddEventHandler("fivedash:events:scheduledRestart", function(data)
  if data.secondsRemaining == 60 then
    -- save what you need before the restart
  end
end)
```

## Frequently asked questions

### The list is empty, but people are playing

The resource needs version 0.9.0 or newer. It sends the list when it connects and then every minute; whoever joined before the update shows up within a minute.

### The banned player came back with another account

If they used the same PC, the hardware tokens catch them. With **Keep out a banned player's other accounts** off, only identifiers count. If it's another PC, ban the new identifiers or use **Ban identifiers**.

### The performance charts are empty

They come from agent 0.1.7 or newer, which reads FXServer's `/perf/` every minute. The agent updates itself at the server's next restart.

## Next steps

[Console, resources and players](https://fivedash.fivex.gg/docs/en/server/console-and-players)Start, restart and follow the city.
[Artifacts and configuration](https://fivedash.fivex.gg/docs/en/server/artifacts-and-config)Scheduled restarts, in-game warnings and the .cfg.
