ゲーム
FiveM
FiveM を valkyr に接続する方法: ブリッジをインストールして設定し、対応するイベントとアクションを確認します。
- 方式
- Server resource (Lua)
- 状態
- 未テストのサンプル
- イベント
frameshotspawn- アクション
kickrestrictban
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_, 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
frameper player from the server side ped (position, heading; pitch is unknown on the server and sent as 0); playerJoining, andexports.from your own spawn or teleport code:valkyr:Spawned(source) spawn;weaponDamageEvent: ashotwith the victim astargetwhen it is a player;- batches to
POST /v1/withmatches/ {match_ id}/ events PerformHttpRequest, pollsGET /v1/and drops players foractions kick,restrictandban; 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:
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.
ゲーム名とプラットフォーム名は各所有者に帰属し、互換性の説明のためにのみ使用しています。valkyr はそれらと提携していません。