Skip to content

Usage

How it works

  1. Player joins the server and is placed into character selection (isolated routing bucket).
  2. Existing characters are shown as 3D preview peds with appearance applied through prp-bridge.
  3. Player can create a character, delete one (if enabled), or select an existing character.
  4. After selection, the bus-stop spawn picker opens (DUI on the prop, or NUI fallback).
  5. Choosing a spawn loads the character into the world and fires framework load events.
  6. New characters open the appearance creator after spawn.

Framework behavior

FrameworkCharacter IDSlotsSkin / preview sourceLast location
qbx_corecitizenidConfig.MaxSlotsplayerskinsplayers.position
qb-corecitizenidConfig.MaxSlotsplayerskinsplayers.position
es_extendedcharN:license (Config.Prefix)Config.MaxSlotsusers.skinusers.position
nd_corecharid (nd_characters)Config.MaxSlotsmetadata.clothingmetadata.location
ox_corecharIdox:characterSlots (fallback Config.MaxSlots)playerskins by charIdcharacters x/y/z/heading

Framework notes

  • Qbox / QB-Core — disable built-in multichar; keep only one character resource.
  • ESX — stop esx_multicharacter / esx_identity; provides in the fxmanifest covers those resource names.
  • ND Core — stop ND_Characters / ND_Players. Multi-character is enabled by the adapter via NDCore.enableMultiCharacter(true).
  • ox_core — set setr ox:characterSelect 0 before starting ox_core so it does not auto-select a character. Prefer matching ox:characterSlots with Config.MaxSlots.

Commands

CommandDescription
/logoutLogs the player out and returns them to character selection (configurable via Config.LogoutCommand)

Configuration

Main (configs/main.lua)

OptionDefaultDescription
Config.DebugtrueEnable debug logging
Config.MaxSlots5Maximum character slots (ox_core prefers ox:characterSlots)
Config.EnableDeletetrueAllow character deletion
Config.Prefix"char"Character ID prefix (ESX)
Config.RoutingBucket0World routing bucket after spawn
Config.SelectionRoutingBucketMin / Max1000 / 10000Random bucket range during selection
Config.DefaultPedModelmp_m_freemode_01Fallback male model
Config.DefaultFemalePedModelmp_f_freemode_01Fallback female model
Config.MinAge / Config.MaxAge18 / 100Age limits for creation
Config.LogoutCommand"logout"Logout command name
Config.StarterItemsphone / id / licenseItems given on new character
Config.SpawnInit(see config)Initial camera and ped coords before selection

Spawns (configs/spawns.lua)

OptionDefaultDescription
Config.NewSpawn(see config)Spawn used for brand-new characters
Config.DefaultSpawns(see config)List of selectable spawn points (id, label, location)
Config.LastLocationMinutes15Minutes window used when filtering last-location spawn eligibility

Selections (configs/selections.lua)

Each entry defines a selection scene:

  • Hidden - where the local player ped is parked while selecting
  • Characters[] - ped Location (vec4) and optional lean/idle Animation
  • Cameras[] - camera Location, Rotation and Fov

Bus stops (configs/busstops.lua)

Controls which world bus stops are used for spawn select, model swap targets (prp_prop_busstop_*), camera offsets and DUI texture names.

Open hooks

Editable files in open/ let you extend behavior without touching escrowed code.

Client (open/client.lua)

lua
function SignIn(characterId, spawn)
end

function SignOut()
end

function OpenAppearanceCreator(isNew)
    if bridge and bridge.appearance and bridge.appearance.openCreator then
        bridge.appearance.openCreator(isNew)
    end
end

function FilterSpawnPoints(spawns, characterId)
    return spawns
end

Server (open/server.lua)

lua
function OnCharacterSelected(source, identifier)
end

function OnCharacterCreated(source, identifier, data)
end

function OnCharacterDeleted(source, identifier)
end

function FilterSpawnPointsServer(spawns, source, characterId)
    return spawns
end

Events

EventSideDescription
prp-characters:server:characterSelectedServerFired when a character is selected or created (listen with AddEventHandler)
prp-characters:client:logoutClientReturns the player to character selection

Appearance flow

  • Preview peds use bridge.appearance.setPedAppearance.
  • On spawn, the resource fires QBCore:Client:OnPlayerLoaded / QBCore:Server:OnPlayerLoaded (QB/Qbox compatibility) and applies the saved skin.
  • New characters call OpenAppearanceCreator(true) after spawn.
  • Framework-specific load/unload is handled in frameworks/<framework>/ (for example ND ND:characterLoaded, ox ox:playerLoaded).