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:
- Name - a descriptive label (max 120 characters)
- URL - the webhook endpoint that receives matched events
- Enabled - toggle the drain on or off without deleting it
- Event Types - comma-separated list of event types to match (e.g.,
weaponDamage, explosionEvent). Leave empty to match all types - 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 type | Description | Position | Target |
|---|---|---|---|
entityCreating | Entity (ped, vehicle, object) spawned on the server | yes | no |
ptFxEvent | Particle effect started | no | no |
givePedScriptedTaskEvent | Scripted task given to a ped | no | no |
weaponDamage | Weapon damage dealt to another player or entity | no | yes |
fireEvent | Fire started | no | no |
explosionEvent | Explosion occurred | yes | no |
giveWeaponEvent | Weapon given to a player | no | no |
removeWeaponEvent | Weapon removed from a player | no | no |
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
| Operator | Description | Example |
|---|---|---|
: | Exact match (default) | type:weaponDamage |
= | Exact match | data.entityType=2 |
!= | Not equal | type!=entityCreating |
~ | Contains (case-insensitive) | data.script~menu |
> | Greater than (numeric) | data.weaponDamage>50 |
< | Less than (numeric) | data.weaponDamage<100 |
>= | Greater than or equal | data.hitComponent>=20 |
<= | Less than or equal | position.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.
| Field | Description |
|---|---|
type / event_type | Event type name |
player_name | Sender name and server ID, e.g. Alpha/30 |
player_id | Sender 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_z | Position 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:vMenuMatch events near a map location:
position.x>100 && position.x<500 && position.y>200 && position.y<600Match any event involving a specific player:
sender.discord:123456789012345678 || target.discord:123456789012345678Webhook 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:
{
"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:
{
"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
| Field | Type | Description |
|---|---|---|
version | number | Payload schema version (currently 1) |
generated_at | string | ISO 8601 timestamp when the payload was generated |
server_id | number | Server that produced the events |
drain.id | string | Drain identifier |
drain.name | string | Drain name |
match.event_types | string[] | Event type filter configured on the drain |
match.filter_query | string | null | Filter query configured on the drain |
matched_count | number | Number of events in this delivery |
events | object[] | Array of matched event objects |
Event Object
Each event in the events array contains:
| Field | Type | Description |
|---|---|---|
event_time | string | Event time as YYYY-MM-DD HH:MM:SS in UTC (no T or timezone suffix) |
server_id | number | Server ID |
type | string | Event type name |
player_name | string | Sender name and server ID as Name/ID |
player_id | number | Sender server ID |
target_name | string | Target name and server ID as Name/ID. weaponDamage only |
target_id | number | Target server ID. weaponDamage only |
owner | number | Owning player's server ID. entityCreating only |
sender_identifiers | object | Sender identifiers: name, license, license2, discord, fivem, ip, and xbl/live when known. Licenses are bare 40-character hex strings |
target_identifiers | object | null | Target identifiers with the same keys. Only populated on weaponDamage |
pos | number[] | Position as [x, y, z]. Only present on entityCreating and explosionEvent |
data | object | array | Event-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:
| Header | Value |
|---|---|
Content-Type | application/json |
User-Agent | fini-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:
| Permission | Access |
|---|---|
WEBHOOKS.VIEW | View event drains |
WEBHOOKS.WRITE | Create, update, and delete event drains |