Skip to content

Event Drains Enterprise ​

Event drains let you forward real-time server events to external services via webhooks. Unlike triggers, which are for FiniAC events, such as player connections and detections, event drains operate on server events, such as entity creation, weapon damage, particle effects, explosions, etc.

Each drain can filter by event type and use field-level filter queries to match only the events you care about. Matched events are delivered as JSON payloads to your configured webhook URL.

Enterprise

Event drains are an Enterprise feature, contact support for more information.

Creating a Drain ​

Each event drain consists of:

  1. Name - a descriptive label (max 120 characters)
  2. URL - the webhook endpoint that receives matched events
  3. Enabled - toggle the drain on or off without deleting it
  4. Event Types - comma-separated list of event types to match (e.g., weaponDamage, explosionEvent). Leave empty to match all types
  5. Filter Query - optional USQL field expression for fine-grained matching against event data

Event Types ​

Event types correspond to the server-side events processed by FiniAC. Matching is case-insensitive. These are all of them, most frequent first:

Event typeDescriptionPositionTarget
entityCreatingEntity (ped, vehicle, object) spawned on the serveryesno
ptFxEventParticle effect startednono
givePedScriptedTaskEventScripted task given to a pednono
weaponDamageWeapon damage dealt to another player or entitynoyes
fireEventFire startednono
explosionEventExplosion occurredyesno
giveWeaponEventWeapon given to a playernono
removeWeaponEventWeapon removed from a playernono

Always set event types

entityCreating alone accounts for over 95% of all server events. A typical server produces around half a million events per day and busy servers several million. A drain with no event type filter forwards all of it to your endpoint, so pick the types you need.

Filter Queries ​

Filter queries use an extended USQL syntax with field-level expressions. This lets you target specific fields in the event data without matching against every field.

Operators ​

OperatorDescriptionExample
:Exact match (default)type:weaponDamage
=Exact matchdata.entityType=2
!=Not equaltype!=entityCreating
~Contains (case-insensitive)data.script~menu
>Greater than (numeric)data.weaponDamage>50
<Less than (numeric)data.weaponDamage<100
>=Greater than or equaldata.hitComponent>=20
<=Less than or equalposition.z<=0

Wrap a weapon or model name in backticks to match its hash: data.weaponType:`weapon_pistol`. See hash literals.

Boolean Logic ​

Combine expressions with AND/OR (&&/||), negate with ! or -, and group with parentheses:

type:weaponDamage && sender.discord:123456789012345678
data.weaponDamage>50 || data.willKill:true
!(type:entityCreating)

Available Fields ​

Events are flattened to dot-notation paths for filtering. Payload keys are case-sensitive.

FieldDescription
type / event_typeEvent type name
player_nameSender name and server ID, e.g. Alpha/30
player_idSender server ID
sender.*Sender identifiers - sender.discord, sender.license, sender.name, sender.fivem, sender.ip
target.*Target identifiers, weaponDamage only - target.discord, target.license, target.name, etc.
data.* / payload.*Event data - data.weaponType, data.willKill, data.model, data.script, etc.
position.* / pos_x / pos_y / pos_zPosition coordinates, entityCreating and explosionEvent only

The full list of payload keys per event type is in the USQL reference.

Examples ​

Match pistol damage from a specific player:

type:weaponDamage && sender.discord:123456789012345678 && data.weaponType:`weapon_pistol`

Match killing blows and heavy hits:

type:weaponDamage && (data.willKill:true || data.weaponDamage>100)

Match vehicles spawned by a specific resource:

type:entityCreating && data.entityType:2 && data.script:vMenu

Match events near a map location:

position.x>100 && position.x<500 && position.y>200 && position.y<600

Match any event involving a specific player:

sender.discord:123456789012345678 || target.discord:123456789012345678

Webhook Payload ​

When events match a drain, a POST request is sent to the configured URL. The request includes a JSON body with the following structure:

json
{
  "version": 1,
  "generated_at": "2026-09-02T16:17:58.412Z",
  "server_id": 1626,
  "drain": {
    "id": "abc123def456",
    "name": "Weapon damage to Discord"
  },
  "match": {
    "event_types": ["weaponDamage"],
    "filter_query": "data.willKill:true"
  },
  "matched_count": 1,
  "events": [
    {
      "event_time": "2026-09-02 16:17:57",
      "server_id": 1626,
      "type": "weaponDamage",
      "player_name": "Alpha/30",
      "player_id": 30,
      "target_name": "Bravo/14",
      "target_id": 14,
      "sender_identifiers": {
        "name": "Alpha",
        "license": "0123456789abcdef0123456789abcdef01234567",
        "license2": "0123456789abcdef0123456789abcdef01234567",
        "discord": "123456789012345678",
        "fivem": "1234567",
        "ip": "203.0.113.10"
      },
      "target_identifiers": {
        "name": "Bravo",
        "license": "fedcba9876543210fedcba9876543210fedcba98",
        "license2": "abcdef0123456789abcdef0123456789abcdef01",
        "discord": "876543210987654321",
        "fivem": "7654321",
        "ip": "203.0.113.20"
      },
      "data": {
        "weaponType": 453432689,
        "weaponDamage": 26,
        "damageType": 3,
        "hitComponent": 10,
        "willKill": true,
        "silenced": false,
        "overrideDefaultDamage": true,
        "damageFlags": 513,
        "hitGlobalId": 14
      }
    }
  ]
}

An entityCreating event looks like this instead. It has a position and no target:

json
{
  "event_time": "2026-09-02 16:20:45",
  "server_id": 1626,
  "type": "entityCreating",
  "player_name": "Alpha/30",
  "player_id": 30,
  "owner": 30,
  "sender_identifiers": {
    "name": "Alpha",
    "license": "0123456789abcdef0123456789abcdef01234567",
    "discord": "123456789012345678"
  },
  "target_identifiers": null,
  "pos": [-853.49, 4088.52, 223.39],
  "data": {
    "entityId": 143111,
    "netId": 75,
    "model": -1216765807,
    "entityPopType": 7,
    "entityType": 2,
    "vehicleType": "automobile",
    "script": "vMenu",
    "driver": 0,
    "velocity": [0, 0, 0]
  }
}

Payload Fields ​

FieldTypeDescription
versionnumberPayload schema version (currently 1)
generated_atstringISO 8601 timestamp when the payload was generated
server_idnumberServer that produced the events
drain.idstringDrain identifier
drain.namestringDrain name
match.event_typesstring[]Event type filter configured on the drain
match.filter_querystring | nullFilter query configured on the drain
matched_countnumberNumber of events in this delivery
eventsobject[]Array of matched event objects

Event Object ​

Each event in the events array contains:

FieldTypeDescription
event_timestringEvent time as YYYY-MM-DD HH:MM:SS in UTC (no T or timezone suffix)
server_idnumberServer ID
typestringEvent type name
player_namestringSender name and server ID as Name/ID
player_idnumberSender server ID
target_namestringTarget name and server ID as Name/ID. weaponDamage only
target_idnumberTarget server ID. weaponDamage only
ownernumberOwning player's server ID. entityCreating only
sender_identifiersobjectSender identifiers: name, license, license2, discord, fivem, ip, and xbl/live when known. Licenses are bare 40-character hex strings
target_identifiersobject | nullTarget identifiers with the same keys. Only populated on weaponDamage
posnumber[]Position as [x, y, z]. Only present on entityCreating and explosionEvent
dataobject | arrayEvent-specific payload, see payload keys. fireEvent delivers an array

Hashes in data (weaponType, model, effectHash, assetHash) are joaat values. Some are delivered signed and some unsigned, depending on the event; treat them as 32-bit values when comparing.

Headers ​

Webhook requests include the following headers:

HeaderValue
Content-Typeapplication/json
User-Agentfini-log-ingest-event-drain/1.0

Limits ​

  • Webhook endpoints must respond within 4 seconds
  • URLs cannot point to localhost or private addresses
  • Filter query maximum length: 2048 characters
  • Drain name maximum length: 120 characters
  • Maximum number of drains per server is determined by your subscription plan
  • Changes to a drain can take up to 15 minutes to become active

Permissions ​

Managing event drains requires the following panel permissions:

PermissionAccess
WEBHOOKS.VIEWView event drains
WEBHOOKS.WRITECreate, update, and delete event drains