Jogos

FiveM

Como conectar FiveM ao valkyr: instale a bridge, configure e veja quais eventos e ações ela suporta.

Método
Server resource (Lua)
Status
exemplo não testado
Eventos
frame shot spawn
Ações
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.

Os nomes de jogos e plataformas pertencem aos seus donos e são usados apenas para descrever compatibilidade. O valkyr não tem vínculo com eles.

Editar esta página no GitHub