Games

FiveM

How to connect FiveM to valkyr: install the bridge, configure it and see which events and actions it supports.

Method
Server resource (Lua)
Status
untested example
Events
frame shot spawn
Actions
kick restrict ban

Status: untested example. Not run (no FiveM server was available).

Scope

A server side resource for the operator's own FiveM server (OneSync required). fxmanifest.lua declares only a server_script, so nothing is sent to or run on players' machines. It reads entity state the server already has and sends it to a valkyr-server the operator runs. Server operators must follow the platform's rules for server operators.

What it does

  • 10 times per second: a frame per player from the server side ped (position, heading; pitch is unknown on the server and sent as 0);
  • playerJoining, and exports.valkyr:Spawned(source) from your own spawn or teleport code: spawn;
  • weaponDamageEvent: a shot with the victim as target when it is a player;
  • batches to POST /v1/matches/{match_id}/events with PerformHttpRequest, polls GET /v1/actions and drops players for kick, restrict and ban; ends the match when the resource stops.

Player ids are the first 15 hex digits of the license identifier (a 60 bit integer in Lua 5.4), so they stay stable across joins.

Units: GTA V is meters and Z up, heading 0 faces +Y and grows counterclockwise. valkyr (x, y, z) = (X, Z, Y) and valkyr yaw = -heading.

Install

Copy the valkyr folder into your server's resources/ and add to server.cfg:

TextText
set valkyr_url "http://127.0.0.1:7420"set valkyr_key "replace-with-an-ingest-key"set valkyr_prefix "fivem-server1"ensure valkyr

To verify for your server build: the weaponDamageEvent payload fields (weaponType, hitGlobalId), and that ped velocity is a usable stand in for the ground state in your game mode.

Game and platform names belong to their owners and are used only to describe compatibility. valkyr is not affiliated with them.

Edit this page on GitHub