Exports

Multicharacter
Updated 6 months ago · v1.5.0

setCharacterState

Apply one of the configured Character States to a specific character.

lua
exports.dirk_multichar:setCharacterState(charId, stateName, payload?)
ArgumentTypePurpose
charIdstringThe internal character ID.
stateNamestringMust match one of the states configured in the States tab of the Live Script Configurator.
payloadtable?Optional extra data shown to the player alongside the state (e.g. { endsAt = os.time() + 900 } for a timed state).

registerBackstory

Register a Lua-side backstory at runtime (2.0). registerLifestyle is the older name for the same export: use it on earlier versions; it keeps working on 2.0. Useful when an external resource wants to surface its own lifestyle entries without admins manually adding them to the configurator.

lua
exports.dirk_multichar:registerBackstory('mybackstory', {
  label = 'My Backstory',
  description = 'A short description for the player.',
  items = {
    { name = 'phone', amount = 1 },
    { name = 'wallet', amount = 1 },
  },
  -- additional fields mirror what's in the configurator's Backstories tab
})
ArgumentTypePurpose
idstringUnique key for the backstory. Used internally to reference the entry.
datatableBackstory definition matching the configurator's data shape.

Registered backstories appear in the player's backstory picker alongside admin-configured ones.


The scriptConfig system itself is read from external code via lib.scriptConfig.get('section') and lib.scriptConfig.on('section', cb). See dirk_lib's scriptConfig docs for the full API.

Was this page helpful?
This page was last updated on 19 September 2026
DIRKSCRIPTS
All you need for your FiveM server.10% off your first order

Unsubscribe any time.

Copyright © 2026 DirkScripts. Not affiliated with or endorsed by Rockstar North or Take-Two Interactive.