Character States
v1.5.0Character states are admin-defined flags attached to a character. They can be purely visual (a status icon + message on the multichar selector) or fully blocking (disable the character entirely so the player can't pick it).
Common use cases: Coma, In Hospital, Detained, Banned, AFK — anything where you want to show or restrict a character's availability.
Defining a State
In the configurator's States tab, each state has:
| Field | Purpose |
|---|---|
| Icon | FontAwesome icon shown next to the character on the selector. |
| Colour | Tint applied to the icon + status pill. |
| Message | Short text shown to the player ("Currently in hospital — back in 15 minutes"). |
| Disabled toggle | When on, the character can't be selected. The slot greys out. |
Applying a State to a Character
Two ways:
1. From the configurator (admin)
The States tab has an Online Players sub-panel. Search any online character → pick a state from the dropdown → apply. Useful for moderation actions (Detained, Coma).
2. From a Lua resource (programmatic)
Use the setCharacterState export. Useful for jobs / scripts (e.g. ambulance script applying "In Hospital" automatically):
State Visibility
States are visible to the player when they next open the multichar selector — they see exactly why a character is unavailable and the configured message. No cryptic "you can't play this character right now".
Live Editing
lib.scriptConfig.on('characterStates', ...) keeps Lua-side and React-side in sync. The React copy reads from useScriptConfig.characterStates directly (no parallel hardcoded store) so admin saves propagate everywhere live.