Overview¶
Everything below is exposed through a single global table, Asterion, that
is injected into every script you run through the Asterion console. Standard
FiveM natives (PlayerPedId, SetEntityHealth, GetPlayerPed, …) are
available too.
Conventions¶
- Table arguments. Functions like
SendDamagetake a single Lua table. Every field is optional and falls back to the default in the reference — pass only what you need. - Code as strings. The threading and injection functions take Lua (or JS)
as a string, usually written with a
[[ long bracket ]]. That string runs in a different context (a thread, another resource, the isolated runtime), so locals from your outer script are not visible inside it. - Handles vs slots. Combat functions accept either a server player slot
(
player = 3) or an entity handle (entity = GetPlayerPed(3)).
The API at a glance¶
| Function | Group | Purpose |
|---|---|---|
SendDamage |
Combat | Damage one player/entity. |
SendDamageAll |
Combat | Damage everyone in range. |
Thread |
Threads | Start a repeating background loop. |
StopThread |
Threads | Stop one loop, or all. |
Isolated |
Injection | Run code in the FiveM isolated runtime. |
InjectResource |
Injection | Run code inside a resource's environment. |
InjectResource2 |
Injection | Same, directly in the resource _ENV. |
InjectThread |
Injection | Add a Citizen thread to a resource. |
HijackResource |
Injection | Replace a resource's next tick. |
InjectJS |
Injection | Run JavaScript in a resource's NUI. |
Weapon hashes
Anywhere a weapon hash is expected you can pass a raw hash
(0xBFEFFF6D) or compute one at runtime with GetHashKey("WEAPON_PISTOL").