FreeScript
fivem
by get-wrecked · version 1.45.3 · updated 2 days ago
No reviews yet
- Downloads
- 0
- Reviews
- 0
- Size
- 251 KB
- Code check
- Checked
- Licence
- GPL-3.0
- Released
- Nov 2026
The Offical Medal FiveM Resource
Medal for FiveM
A FiveM/GTA V server resource that integrates with the Medal.tv desktop client to capture gameplay clips and screenshots. It supports manual capture and optional automatic capture based on ingame events, configurable via an ingame menu.
Features
Auto-Capture Configuration
You can configure automatic capture triggers through the ingame menu. Common examples include:
Building
This resource uses a pnpm workspace to manage builds for both the UI and the SuperSoaker HTTP server.
Prerequisites
Build Steps
From the root of the resource:
This builds:
Release
To create a production-ready release package for deployment to FiveM servers:
To build a fresh release and immediately verify the output in one step, run:
If you only need to run the verification checks against an existing release folder, use:
These commands:
Configuration Highlights
--//=-- Local screenshot as Data URI
exports['medal--fivem-resource']:fillSoaker({ encoding = 'jpg', quality = 0.92 }, function(data)
TriggerEvent('chat:addMess
…
A FiveM/GTA V server resource that integrates with the Medal.tv desktop client to capture gameplay clips and screenshots. It supports manual capture and optional automatic capture based on ingame events, configurable via an ingame menu.
Features
- Auto-Clipping UI: Toggle auto-clipping, configure clip length, and enable/disable specific events.
- Custom Event Signals: Dynamically register your own clipping events at runtime via the
registerSignalexport. - SuperSoaker Screenshots: Drop-in replacement for
screenshot-basic, with both local capture, and HTTP upload. Features automatic fallback from Medal.tv to WebGL, if some unforeseen issue with the Medal connection occurs. Medal availability is monitored continuously (configurable interval), adapting in real-time, if Medal starts, stops, or crashes. - GameVein Data Pipeline: Allows the Medal client to get game context and server info when clipping.
- Framework-Aware: The server detects framework (ESX → QBX → QB → ND → OX → TMC → unknown) and provides safe export helpers to avoid errors, without loading any framework resource files directly.
- FiveM server (FX Server from after 2020-05)
- Medal.tv client installed, and running on the player’s PC (to use the full features)
- Node.js LTS with pnpm installed (just to build the UI, one time, or avoid this with a Github release).
- Place this resource folder into your server's
resources/directory. - In your server's
server.cfg(or whatever config file your server uses to load resources), add the line below (replace with your actual folder name for this resource):
ensure medal--fivem-resource
- Start (or restart) your server.
- Ensure the Medal.tv desktop client is running before joining the server.
- Toggle the Medal UI in-game:
- Chat command:
/medal(fromConfig.Command) - Default keybind:
Page Up(fromConfig.Keybind) - The keybind is shown in the UI using FiveM's current binding for the command (resolved via
GetHashKey+GetControlInstructionalButton), so if a player rebinds the key in FiveM, the UI label follows their current binding. - Send the command again, press the keybind again, press ESC, or click the X button to close the UI. The UI listens for the same key that opened it and closes on key press (keydown).
- In the UI, you can:
- Toggle auto-clipping on/off
- Set clip length
- Enable/disable individual events
Auto-Capture Configuration
You can configure automatic capture triggers through the ingame menu. Common examples include:
- Player deaths/downs
- Kills or headshots
Building
This resource uses a pnpm workspace to manage builds for both the UI and the SuperSoaker HTTP server.
Prerequisites
- Node.js LTS (v18+)
- pnpm installed globally:
npm i -g pnpmBuild Steps
From the root of the resource:
- Install dependencies:
pnpm install
- Build everything:
pnpm buildThis builds:
- UI:
ui/src→ui/dist(Vite build for the NUI) - SuperSoaker Server:
superSoaker/src/server/server.ts→superSoaker/dist/server.js(TypeScript → CommonJS)
pnpm build:server- Build only the SuperSoaker HTTP serverpnpm build:ui- Build only the React UIpnpm dev:ui- Start Vite dev server for UI development
superSoaker/dist/server.js must exist before starting the resource.Release
To create a production-ready release package for deployment to FiveM servers:
pnpm releaseTo build a fresh release and immediately verify the output in one step, run:
pnpm release:verifyIf you only need to run the verification checks against an existing release folder, use:
pnpm verify-releaseThese commands:
- Automatically builds the entire project (UI and TypeScript)
- Creates a
release/medal/directory - Packages only production files (~60 files, ~2.3 MB):
- Core resource files (
fxmanifest.lua,config.lua) - All Lua scripts (client/server/shared)
- Built JavaScript (
superSoaker/dist/server.js) - Built UI (
ui/dist/*) - Documentation (all README files, LICENSE)
- Dynamically excludes files from
.gitignoreand.git/info/exclude - Preserves built
distfolders (overriding gitignore) as they contain production code - Works on Windows, Linux, and macOS
- Verifies the release contents to ensure required files ship and unwanted files stay excluded (
release:verifyorverify-release)
release/medal/ folder can be directly copied to your FiveM server's resources directory.Configuration Highlights
config.luaConfig.CommandandConfig.Keybindcontrol how players open the UI.Config.ClippingEventspre-registers events visible in the Auto-Clipping UI.Config.ScreenshotsMedalPreferred: Prefer Medal.tv for screenshots when available. If Medal is unable to respond (network errors, timeouts, etc.), the resource automatically falls back to WebGL/Three.js capture. Medal availability is checked periodically (default: 3 seconds, configurable viaConfig.Medal.CheckIntervalMs), allowing automatic adaptation if Medal starts, stops, or crashes during gameplay.ScreenshotBasicOverride: Provides compatibility forscreenshot-basicexports.
fillSoaker(options?: SoakerOptions, cb: fun(data:string))- Capture a screenshot and return a Data URI to the callback.
- Example:
--//=-- Local screenshot as Data URI
exports['medal--fivem-resource']:fillSoaker({ encoding = 'jpg', quality = 0.92 }, function(data)
TriggerEvent('chat:addMess
…