AstroShield does not need a framework. It works the same on a standalone server, and it adapts to the common ones when they are present.
What it does with a framework#
| Area | Behavior |
|---|---|
| Spawn detection | Checks wait until a player has really loaded in, so character selection and spawning do not look like teleporting or godmode. AstroShield listens to the load events of the common frameworks. |
| Player status | The dashboard's Status tab reads health, armor, hunger, thirst, job, money and inventory. |
| Weapon checks | Weapon spawner reports that need confirmation are checked against the player's inventory first. |
Supported frameworks#
| Framework | Resource detected | Spawn events recognized |
|---|---|---|
| ESX | es_extended | esx:playerLoaded, esx:onPlayerSpawn, esx_multicharacter:onCharacterSelect, esx_multicharacter:characterLoaded |
| QBCore | qb-core | QBCore:Client:OnPlayerLoaded, QBCore:Client:OnPlayerSpawn, qb-multicharacter:client:loadUserSkin, qb-multicharacter:client:chooseChar |
| Qbox | qbx_core | qbx_core:client:playerLoaded, qbx_core:client:playerCharacterLoaded |
| ox_core | ox_core | ox:playerLoaded |
| ND Core | not detected for status | ND:characterLoaded |
| vRP | not detected for status | vRP:playerSpawn |
| Any | playerSpawned |
The player status needs the framework to be started on the server. AstroShield checks them in the order ESX, Qbox, QBCore, ox_core. Hunger and thirst are read from the player's metadata, or from esx_status on ESX servers that use it. If none is running, only health and armor are available.
A spawn event only gives a short grace period when a spawn really happened, for example a first spawn, a new ped or a recent death. Triggering these events by hand does not switch the checks off.
Inventories#
Weapon-related detections can raise a report that says "verify this against the inventory". For those, AstroShield asks the inventory what the player owns:
- If the inventory knows the weapon, nothing happens.
- If the server has no supported inventory, nothing happens either. These reports are never punished without a way to verify them.
Supported inventories include ox_inventory and the inventories built into ESX, QBCore and Qbox. A custom inventory is simply not consulted. To avoid false positives with one, tell AstroShield about weapons it hands out, see Allowances and the recipes.
Standalone and other frameworks#
On a server without any of these frameworks, or with a custom one, AstroShield still protects the server. The difference is:
- the dashboard's Status tab only shows health and armor,
- spawn detection falls back on
playerSpawned, and on noticing that the player has control of their ped with no loading screen, menu or script camera in the way, - your scripts should announce legitimate teleports, heals and spawns. See Allowances.
Script events that AstroShield treats specially#
A few popular ESX events get a lower rate limit in the event protection because they are abused often: esx_policejob:handcuff, esx-qalle-hunting:reward and esx:giveInventoryItem.