> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fenixstudios.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Fnx PVP Killfeed

> Complete installation, configuration, payload, event, and theme reference for fnx-pvp-killfeed.

> Complete installation, configuration, payload, event, and theme reference for fnx-pvp-killfeed.

`fnx-pvp-killfeed` displays kill notifications submitted by another resource. It does not detect kills or save data by itself.

## First installation

```cfg theme={null}
ensure community_bridge
ensure fnx-pvp-panel
ensure fnx-pvp-killfeed
```

This resource does not use a database. You do not need to import an SQL file.

Start gameplay resources after the killfeed.

## First setup

Edit `settings/public/client/cfg.lua`, restart the resource, then submit a test entry with the `Add` export described below.

## Client configuration

| Key                           | Type    | Default       | Explanation                                                                                |
| ----------------------------- | ------- | ------------- | ------------------------------------------------------------------------------------------ |
| `ClientCfg.Feed.position`     | string  | `"top-right"` | Screen anchor used by the feed: `top-left`, `top-right`, `bottom-left`, or `bottom-right`. |
| `ClientCfg.Feed.offset.x`     | number  | `24`          | Horizontal offset in pixels from the selected anchor.                                      |
| `ClientCfg.Feed.offset.y`     | number  | `96`          | Vertical offset in pixels from the selected anchor.                                        |
| `ClientCfg.Feed.maxItems`     | number  | `5`           | Maximum entries visible at once. Old entries are removed as this limit is exceeded.        |
| `ClientCfg.Feed.duration`     | number  | `5500`        | Entry lifetime in milliseconds; `5500` equals 5.5 seconds.                                 |
| `ClientCfg.Feed.showWeapon`   | boolean | `true`        | Displays the submitted weapon label.                                                       |
| `ClientCfg.Feed.showHeadshot` | boolean | `true`        | Displays a headshot indicator when the payload reports one.                                |
| `ClientCfg.Feed.maskNames`    | boolean | `true`        | Enables name masking. Panel streamer mode can also request masking.                        |

## Server configuration

There is no public server cfg. Validate kills inside the authoritative gameplay resource. Never grant rewards from an untrusted client submission.

## Shared files

Private shared code initializes internal bridge and utility values. It has no customer-facing keys.

## Theme system

Colors are CSS strings; radii are pixel values; fonts are CSS font-family lists.

| Key                                    | Default                  | Explanation                                               |
| -------------------------------------- | ------------------------ | --------------------------------------------------------- |
| `ClientCfg.Theme.colors.panelBg`       | `#0b0b10`                | Main feed background.                                     |
| `ClientCfg.Theme.colors.panelBgStrong` | `#070709`                | Darker background variant.                                |
| `ClientCfg.Theme.colors.accent`        | `#f97316`                | Primary highlight.                                        |
| `ClientCfg.Theme.colors.accentStrong`  | `#fb923c`                | Strong active highlight.                                  |
| `ClientCfg.Theme.colors.text`          | `#f5f5f5`                | Primary text.                                             |
| `ClientCfg.Theme.colors.mutedText`     | `rgba(245,245,245,0.62)` | Secondary text.                                           |
| `ClientCfg.Theme.colors.surface`       | `rgba(23,23,23,0.62)`    | Normal entry surface.                                     |
| `ClientCfg.Theme.colors.surfaceStrong` | `rgba(10,10,10,0.94)`    | Strong entry surface.                                     |
| `ClientCfg.Theme.colors.border`        | `rgba(255,255,255,0.10)` | Borders and separators.                                   |
| `ClientCfg.Theme.colors.overlay`       | `rgba(0,0,0,0.72)`       | Dark overlay.                                             |
| `ClientCfg.Theme.colors.success`       | `#4ade80`                | Positive-state foreground.                                |
| `ClientCfg.Theme.colors.successBg`     | `rgba(34,197,94,0.16)`   | Positive-state background.                                |
| `ClientCfg.Theme.colors.danger`        | `#f87171`                | Danger/kill foreground.                                   |
| `ClientCfg.Theme.colors.dangerBg`      | `rgba(239,68,68,0.16)`   | Danger/kill background.                                   |
| `ClientCfg.Theme.colors.warning`       | `#fbbf24`                | Warning foreground.                                       |
| `ClientCfg.Theme.colors.warningBg`     | `rgba(245,158,11,0.16)`  | Warning background.                                       |
| `ClientCfg.Theme.colors.info`          | `#60a5fa`                | Information foreground.                                   |
| `ClientCfg.Theme.colors.infoBg`        | `rgba(59,130,246,0.16)`  | Information background.                                   |
| `ClientCfg.Theme.radii.panel`          | `12`                     | Feed panel radius in pixels.                              |
| `ClientCfg.Theme.radii.card`           | `8`                      | Kill-entry radius in pixels.                              |
| `ClientCfg.Theme.radii.control`        | `8`                      | Control radius in pixels.                                 |
| `ClientCfg.Theme.radii.pill`           | `999`                    | Fully rounded badge radius.                               |
| `ClientCfg.Theme.effects`              | `{}`                     | Reserved effects table with no current public child keys. |
| `ClientCfg.Theme.fonts.body`           | `Space Grotesk...`       | Normal-text font stack.                                   |
| `ClientCfg.Theme.fonts.display`        | `Bebas Neue...`          | Heading font stack.                                       |

## Developer info

### `Add(payload)`

```lua theme={null}
exports["fnx-pvp-killfeed"]:Add({
    id = "match-42-kill-8",
    killer = "Player One",
    victim = "Player Two",
    weapon = "Pistol MK2",
    killerId = 12,
    victimId = 27,
    distance = 42.5,
    headshot = true,
    suicide = false,
    streamerMode = false
})
```

| Payload key    | Type          | Explanation                                                            |
| -------------- | ------------- | ---------------------------------------------------------------------- |
| `id`           | any           | Optional entry identifier forwarded to the UI.                         |
| `killer`       | string        | Killer display name; whitespace is trimmed.                            |
| `victim`       | string        | Victim display name; whitespace is trimmed.                            |
| `weapon`       | string        | Human-readable weapon label.                                           |
| `killerId`     | number/string | Killer server ID. `hitterId` is accepted as a fallback alias.          |
| `victimId`     | number/string | Victim server ID. `hittedId` is accepted as a fallback alias.          |
| `distance`     | number        | Kill distance, normalized with `tonumber`.                             |
| `headshot`     | boolean       | Marks the entry as a headshot.                                         |
| `suicide`      | boolean       | Marks the entry as a suicide.                                          |
| `streamerMode` | boolean       | Explicit masking state. When omitted, the local panel setting is used. |

### Other exports

| Export              | Explanation                                                         |
| ------------------- | ------------------------------------------------------------------- |
| `Clear()`           | Removes every current entry.                                        |
| `SetVisible(value)` | Shows or hides the feed. Entries received while hidden are ignored. |

### Client events

| Event                        | Arguments | Explanation                                     |
| ---------------------------- | --------- | ----------------------------------------------- |
| `pvp-killfeed:client:add`    | `payload` | Adds one entry using the same payload as `Add`. |
| `pvp-killfeed:client:clear`  | none      | Clears the feed.                                |
| `pvp-killfeed:client:toggle` | `value`   | Changes visibility.                             |

## Common issues

### No entries appear

Another resource must call `Add` or trigger the add event. Also verify that visibility is true.

### Names are masked unexpectedly

Check `maskNames`, `payload.streamerMode`, and the local panel streamer setting.

### Entries disappear too quickly

`duration` uses milliseconds. Ten seconds is `10000`.

### Weapon or headshot details are missing

Enable the matching `show*` key and include the matching payload field.

## Common folders

| Path                             | What it is for                                                                       |
| -------------------------------- | ------------------------------------------------------------------------------------ |
| `fxmanifest.lua`                 | FiveM manifest. It loads the resource files in the correct order.                    |
| `settings/public/client/cfg.lua` | Client settings that server owners are expected to edit.                             |
| `settings/public/server/cfg.lua` | Server settings that server owners are expected to edit.                             |
| `settings/private/**/_cfg.lua`   | Internal/default settings. Do not edit unless you are modifying the resource itself. |
| `client/public/*.lua`            | Public client API files and safe integration files.                                  |
| `client/private/*.lua`           | Internal client runtime code.                                                        |
| `server/public/*.lua`            | Public server API files and exports.                                                 |
| `server/private/*.lua`           | Internal server runtime code.                                                        |
| `shared/public/*.lua`            | Shared public data or integration constants.                                         |
| `shared/private/*.lua`           | Shared internal helpers loaded by the resource.                                      |
| `locales/*.json`                 | Locales for ui and game.                                                             |
| `web/dist/`                      | Built NUI files used in-game. Do not edit these by hand.                             |

```txt theme={null}
fnx-pvp-killfeed/
|-- client/
|   |-- private/
|   |   \-- _main.lua
|   \-- public/
|       \-- main.lua
|-- locales/
|   \-- *.json
|-- settings/
|   |-- private/
|   |   \-- client/
|   |       \-- _cfg.lua
|   \-- public/
|       \-- client/
|           \-- cfg.lua
|-- shared/
|   \-- private/
|       \-- _main.lua
|-- web/
|   \-- dist/
\-- fxmanifest.lua
```
