Adictos_WebLogs includes a built-in ScreenRecord module: it captures the client’s screen via NUI (WebGL/MediaRecorder), sends the video to the server and uploads it to Discord through the panel proxy. Ideal for anticheat, staff reports or evidence in logs.
Requirements
- ScreenRecord webhook under My servers → Web logs (active + Discord URL). The
screenrecordcategory is fixed and is no longer edited under Categories. - Correct
Config.WebsiteURL(the server uploads the video viascreenrecord-upload.php).
recordPlayerScreen export
Records a WebM video of the player’s screen and returns the Discord URL in the callback:
exports['Adictos_WebLogs']:recordPlayerScreen(source, durationMs, function(success, urlOrError)
if success then
print('Video subido: ' .. urlOrError)
-- urlOrError = URL del attachment en Discord
else
print('Error: ' .. tostring(urlOrError))
end
end, 'Motivo de la grabación')
-- durationMs: por defecto Config.ScreenRecord.DefaultDuration (10000)
-- Máximo: Config.ScreenRecord.MaxDuration (30000)capturePlayerSnapshot export
Captures an instant JPEG image (lighter than a video):
exports['Adictos_WebLogs']:capturePlayerSnapshot(source, function(success, urlOrError)
if success then
print('Snapshot: ' .. urlOrError)
end
end, 'Evidencia anticheat')Other useful exports
| Export | Use |
|---|---|
isScreenRecordReady() | true if there is a webhook and it is active |
getScreenRecordStatus() | ready, reason (message if not ready) |
stopPlayerRecording(src) | Stops a recording in progress |
isPlayerBeingRecorded(src) | Returns whether the player is being recorded |
spectatePlayer(adminSrc, targetSrc) | Live spectate (relay to the web panel) |
stopSpectating(adminSrc) | Stops spectating |
Console / staff commands
/record <player_id> [duracion_seg] [motivo]
/spectate <admin_id> <target_id>
/spectate <admin_id> stopUse in logs
If you include the video field (duration in milliseconds) together with the player’s server_id when logging, WebLogs automatically records their screen before sending the log to the panel. There is no need to call recordPlayerScreen separately.
exports['Adictos_WebLogs']:Log('anticheat', 'detection', {
license = licenseClean,
playerName = name,
server_id = source, -- obligatorio para saber a quién grabar
video = 10000, -- duración en ms (10 segundos)
reason = 'Noclip detectado',
}, true)The internal flow is as follows:
- 1WebLogs detects
videoand starts recording the player given inserver_id. - 2The client captures the screen and sends the video to the FiveM server.
- 3FiveM uploads it to Discord through the Web logs ScreenRecord webhook (panel proxy:
screenrecord-upload.php). - 4Discord returns the attachment URL (Discord CDN).
- 5That URL is stored in
video_urland the log is sent to the panel with the link to the video.
video_url).Configuration
Adjust resolution, FPS, maximum duration and quality in config.lua → Config.ScreenRecord. The client uses client/config_client.lua only for spectate visual settings.
[ScreenRecord]) and that the category webhook is configured.