---
title: "Triggers"
description: "Custom automation rules — when something happens on your server, ban, kick, or log without writing code."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.asphyxia.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Triggers

A trigger is a rule you build on the dashboard: **when** an event happens,
**if** its details match your conditions, **then** run your actions. No Lua
required — triggers evaluate on your own server, alongside your other
resources.

## How a rule is built

Every rule has three parts:

1. **Event** — what to watch for, such as a player connecting or an explosion.
2. **Conditions** — which details must match, such as the weapon used or the
   damage dealt. Match *all* of them or *any* of them. No conditions means the
   actions always run.
3. **Actions** — what to do: `ban`, `kick`, `log`, `cancel_event`, or
   `trigger_event` (fire one of your own server events).

## Events you can watch

**Players joining and leaving:**

| Event | What it means |
| :--- | :--- |
| `player_connecting` | Someone is connecting — can still be turned away |
| `player_joining` | Someone finished connecting |
| `player_entered_scope` | Two players came into range of each other |
| `player_left_scope` | Two players moved out of range |

**Resources starting and stopping:**

| Event | What it means |
| :--- | :--- |
| `resource_starting` | A resource is about to start — can still be cancelled |
| `resource_start` / `resource_stop` | A resource started or stopped |
| `server_resource_start` / `server_resource_stop` | The same, server-side only |
| `resource_list_refresh` | The resource list was refreshed |

**Entities, weapons and explosions:**

| Event | What it means |
| :--- | :--- |
| `entity_creating` | An entity is about to be created — can still be cancelled |
| `entity_created` / `entity_removed` | An entity was created or removed |
| `weapon_damage` | Someone damaged someone — can still be cancelled |
| `projectile_created` | A projectile was fired |
| `weapons_removed` | Someone's weapons were removed |
| `particle_fx` | A particle effect started |
| `explosion_event` | An explosion went off — can still be cancelled |

## Conditions

Each condition picks a detail of the event, an operator, and a value to compare
against. Operators are `equals`, `not equals`, `contains`, `not contains`,
`greater than`, `greater or equal`, `less than`, and `less or equal`.
Comparisons use numbers when both sides are numbers, otherwise text.

## Actions

| Action | What it does |
| :--- | :--- |
| `ban` | Bans the player, with your reason |
| `kick` | Kicks the player, with your reason |
| `log` | Writes your message to the audit log |
| `cancel_event` | Stops the event — only on events marked cancellable above |
| `trigger_event` | Fires one of your own server events by name |

Every action is recorded like any other moderation action, so `ban` and `kick`
from a rule look the same on the [Bans page](/website/bans) and in your
[Logs](/website/logs) as if an admin did them.

## Managing rules

Build rules on the dashboard's **Triggers** page: pick an event, add
conditions, add actions, and read the plain-English summary before saving. Each
rule has an on/off toggle, and you can export your rules to share or back up,
then import them again later.

> **Note**
>
> Triggers react to game events the same way your own scripts do. They prove
> something happened, not that it was cheating — keep ban actions for cases with
> no innocent explanation, and use `kick` or `log` where players might just be
> messing around.

Source: https://docs.asphyxia.dev/anticheat/triggers/index.mdx
