DirkScripts Logo

Login With FiveM

Login

🀼 Multicharacter
β€Ί
Features
β€Ί

Character States

Character States

Character 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:

FieldPurpose
IconFontAwesome icon shown next to the character on the selector.
ColourTint applied to the icon + status pill.
MessageShort text shown to the player ("Currently in hospital β€” back in 15 minutes").
Disabled toggleWhen 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):

lua
exports.dirk_multichar:setCharacterState(charId, 'in_hospital', {
  -- optional payload, e.g. timer / extra data shown to the player
  endsAt = os.time() + 900,
})

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.

Copyright Β© 2026 DirkScripts.

Not affiliated with or endorsed by Rockstar North, Take-Two Interactive, or any other rights holders. FiveM is a copyright and registered trademark of Take-Two Interactive Software, Inc.
Our checkout system is provided by Tebex Limited, who manage payment processing, product delivery, and billing support. Prices shown in currencies other than GBP are approximate conversions updated daily. All purchases are processed in GBP, so the final amount charged may vary depending on your bank or payment provider’s exchange rate.