Usage
How it works
- Player joins the server and is placed into character selection (isolated routing bucket).
- Existing characters are shown as 3D preview peds with appearance applied through
prp-bridge. - Player can create a character, delete one (if enabled), or select an existing character.
- After selection, the bus-stop spawn picker opens (DUI on the prop, or NUI fallback).
- Choosing a spawn loads the character into the world and fires framework load events.
- New characters open the appearance creator after spawn.
Framework behavior
| Framework | Character ID | Slots | Skin / preview source | Last location |
|---|---|---|---|---|
qbx_core | citizenid | Config.MaxSlots | playerskins | players.position |
qb-core | citizenid | Config.MaxSlots | playerskins | players.position |
es_extended | charN:license (Config.Prefix) | Config.MaxSlots | users.skin | users.position |
nd_core | charid (nd_characters) | Config.MaxSlots | metadata.clothing | metadata.location |
ox_core | charId | ox:characterSlots (fallback Config.MaxSlots) | playerskins by charId | characters x/y/z/heading |
Framework notes
- Qbox / QB-Core — disable built-in multichar; keep only one character resource.
- ESX — stop
esx_multicharacter/esx_identity;providesin the fxmanifest covers those resource names. - ND Core — stop
ND_Characters/ND_Players. Multi-character is enabled by the adapter viaNDCore.enableMultiCharacter(true). - ox_core — set
setr ox:characterSelect 0before starting ox_core so it does not auto-select a character. Prefer matchingox:characterSlotswithConfig.MaxSlots.
Commands
| Command | Description |
|---|---|
/logout | Logs the player out and returns them to character selection (configurable via Config.LogoutCommand) |
Configuration
Main (configs/main.lua)
| Option | Default | Description |
|---|---|---|
Config.Debug | true | Enable debug logging |
Config.MaxSlots | 5 | Maximum character slots (ox_core prefers ox:characterSlots) |
Config.EnableDelete | true | Allow character deletion |
Config.Prefix | "char" | Character ID prefix (ESX) |
Config.RoutingBucket | 0 | World routing bucket after spawn |
Config.SelectionRoutingBucketMin / Max | 1000 / 10000 | Random bucket range during selection |
Config.DefaultPedModel | mp_m_freemode_01 | Fallback male model |
Config.DefaultFemalePedModel | mp_f_freemode_01 | Fallback female model |
Config.MinAge / Config.MaxAge | 18 / 100 | Age limits for creation |
Config.LogoutCommand | "logout" | Logout command name |
Config.StarterItems | phone / id / license | Items given on new character |
Config.SpawnInit | (see config) | Initial camera and ped coords before selection |
Spawns (configs/spawns.lua)
| Option | Default | Description |
|---|---|---|
Config.NewSpawn | (see config) | Spawn used for brand-new characters |
Config.DefaultSpawns | (see config) | List of selectable spawn points (id, label, location) |
Config.LastLocationMinutes | 15 | Minutes 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 selectingCharacters[]- pedLocation(vec4) and optional lean/idleAnimationCameras[]- cameraLocation,RotationandFov
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
endServer (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
endEvents
| Event | Side | Description |
|---|---|---|
prp-characters:server:characterSelected | Server | Fired when a character is selected or created (listen with AddEventHandler) |
prp-characters:client:logout | Client | Returns 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 NDND:characterLoaded, oxox:playerLoaded).