For the complete documentation index, see llms.txt. This page is also available as Markdown.

Exports

You can interact with ak47_multicharacter from your other server-side scripts using the provided exports. This is highly useful for creating custom admin menus, penalty scripts, or sleep/logout systems.

Logout

Forces a specific player to log out of their current active character, saves their data, and sends them back to the sky-camera character selection screen.

Export:

exports['ak47_multicharacter']:Logout(source)

Parameters:

  • source (number) - The server ID of the player you wish to log out.

Example Usage:

-- Example: A custom bed script where sleeping logs the player out
RegisterNetEvent('my_custom_script:GoToSleep', function()
    local src = source
    -- Perform your save logic here...
    
    -- Send player back to character selection
    exports['ak47_multicharacter']:Logout(src)
end)

Last updated