DirkScripts Logo

Login With FiveM

Login

Exports

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).

registerLifestyle

Register a Lua-side lifestyle at runtime. Useful when an external resource wants to surface its own lifestyle entries without admins manually adding them to the configurator.

lua
exports.dirk_multichar:registerLifestyle('mylifestyle', {
  label = 'My Lifestyle',
  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 Lifestyles tab
})
ArgumentTypePurpose
idstringUnique key for the lifestyle. Used internally to reference the entry.
datatableLifestyle definition matching the configurator's data shape.

Registered lifestyles appear in the player's lifestyle 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.

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.