Character Selection for QB (px_chars) | Spawn picker, playtime indicator & more


What is px_chars?

This is a character selection and spawn picker for QBCore servers, acting as a replacement for qb-multicharacter. It has been converted from the Phynix framework and offers expanded functionality previously not found in legacy resources.

Why px_chars?

:rocket: First impressions of your server matter, and can easily decide whether a new player chooses to stick around. Leave a mark by introducing them with this beautiful, modern and advanced character selection menu!

  • Spawn point selection integrated with apartments, housing, jail and configurable locations. Toggle spawning at last location.

  • Prevent new characters from being deleted for configurable duration, and ensure dead characters cannot be used.

  • You can swap characters at designated locations using the /swap command, including houses and apartments.

  • Fully optimised with 0 percent client processor usage when idling, offering enhanced configuration including display colours and language.

  • Configurable and advanced input validation. Ensure names contain vowels, no bad words, start capitalized and of valid length. Birth dates must fall within a certain time period.

  • Create & delete characters with an adjustable maximum character limit, and a play-time indicator.

  • All of our Escrow-protected resources come with language/translation files - allowing you to customize text prompts and notifications directly from a single file where the code isn’t accessible.


Showcase & Preview

Below is a sneak peek of what we have to offer. If you have any specific questions about the resource, feel free to leave a comment below!

Preview Video

:camera: Direct Link: Phynix Project | Character Selection on YouTube

Image Gallery

You can find an image gallery containing some of the features and functionality on Imgur.

:framed_picture: Direct Link: Character Selection Gallery on Imgur

Showcase Server

We also offer a showcase server to try out our framework for free. You can connect using the Cfx.re join link below, or by typing connect showcase.phynix.gg directly into your F8 client console.

:joystick: Direct Link: Connect to Phynix Project Showcase

The server can also be found by searching for “Phynix Project Showcase” on the FiveM server list.

Some features may be hidden or inaccessible, due to a different framework in use.

Exemplar Configuration Files

We have provided the configuration files for this resource, allowing you to confidently ensure the customization that you desire.

:spiral_notepad: Direct Link: Phynix | px_chars/shared/config.lua - Pastebin.com
:spiral_notepad: Direct Link: Phynix | px_chars/server/config.lua - Pastebin.com
:spiral_notepad: Direct Link: Phynix | px_chars/locale/en_US_.lang - Pastebin.com


Purchase

This resource is provided as a single purchase from our webstore.
You can also find it included in the Base Framework for Phynix.

:triangular_flag_on_post: Buy Now

Click on the link below now to acquire this resource.
:fire: We currently have a limited 15% discount offer for the resource. This offer expires in a week, so make sure to check it out quick!

:shopping_cart: Direct Link: Character Selection on the Phynix Project Webstore

For any issues with your purchase, please contact us. There is information on how to reach us at our webstore, but you can also email us.

:mailbox: Email Us: support@phynix.gg

Code is accessible Configuration only
Subscription-based No
Lines (approximately) 2,000+
Requirements px_forms, qb-core
Support Yes (see store)
Languages Lua, JavaScript, JSON

Dependencies

:warning: This resource requires a dependency.

You will require our standalone Forms Manager resource, for which the direct link may be found below.

:shopping_cart: Direct Link: Form Manager on the Phynix Project Webstore

This resource has been produced for the QBCore framework, and its associated base resources.

Installation

This resource replaces qb-multicharacter. Ensure that it is disabled before starting your server.

Simply drag-and-drop px_chars into your resources folder, and ensure it in your server.cfg file.

All installation instructions, including any dependencies you may require, will be provided to you by email with your purchase through a README.pdf file.

For any problems with your installation, please get in touch with us by the email address above.


Changelog

Version Date Notes
1.0.0 22/06/2023 Initial Release
1.1.0 22/06/2023 Increased width of forms, improved readability and added additional suggested configuration options.
1.1.1 25/06/2023 Fixed bugs where players cannot swap characters or logout at apartments
1.1.3 18/07/2023 Added configuration to support alternative clothing resources
1.1.11 13/01/2024 Numerous bug fixes, changes and updates over the last few months

Please post any questions below. Be nice :slightly_smiling_face: . Enjoy!

7 Likes

Character creation dialogue could be wider a bit, disclaimer at the bottom feels too tight. Other than that, its perfect.

1 Like

so the script connect with qb housing and jail script?

1 Like

Thanks for your feedback. We’ve taken it on-board and will improve our resource in an upcoming update.

  • The form width will soon be adjustable within px_forms.
  • We will improve the readability of element descriptions.

We are also working on an ESX version which will soon be available!

Yes, the script is fully integrated with qb-houses and qb-apartments. It offers all the spawn options available within qb-spawn and more (accounting for house keyholders).

px_chars ensures that all secondary interfaces (such as clothing creation menu) don’t load until you have fully spawned in.

You can also set a jail spawn location when the player has a jail sentence, meaning they will be unable to choose a different location.

If you have any further questions, or are not satisfied with your purchase - we will be happy to assist you and make it right.

i have last question before purchase can new player after create character auto skip this apartments choose options? cause on my server only have 1 apartment so no need to let player choose.

This option only shows when selecting a new character for the first time. We will definitely add a configuration option to skip this screen when only a single spawn location exists.

Thanks for the feedback!

1 Like

Version 1.1.0


Description

A new version has been released, with the following changes:

  • Increased form width (ensure to update px_forms to version 1.1.0 as well)
  • Improved readability of smaller text
  • Added configuration allowing player to skip spawn selection if only one location exists
  • Added configuration to disable the spawn selection offered by px_chars, and use legacy selection with direct functional access
  • Added configuration to edit spawn selection options with direct functional access

Configuration Changes

The options below have been added to existing configuration.

shared/config.lua

Sh_Config = {
  ...,

  -- if only one spawn location exists, skip the selection screen
  skipSingleSpawn = false,

  --[[=============================================================
    Completely disable px_chars spawn location selection.
    This means that the default qb-spawn and qb-multicharacter
    settings are used.

    Below you can adjust exactly how you want the character to
    spawn in.
  ]]
  useLegacySpawnSelection = false,
  legacySpawnRoutine = function(charData)
    local QBCore = exports["qb-core"]:GetCoreObject();

    if charData.init and not Apartments.Starting then
      -- new character and doesn't have apartment using legacy spawn,
      -- just put them at the QB default location
      Chars:SpawnRoutine({
        coords = vector3(QBCore.Config.DefaultSpawn),
        firstJoin = true,
        legacySpawn = true
      });
    else
      -- let apartments handle spawn UI for qb-spawn, like in qb-multicharacter
      TriggerEvent("apartments:client:setupSpawnUI", charData);
    end
  end,
  --[[=============================================================]]

  forms = {
    create = {
      width = "20vw"
    },
    delete = {
      width = "20vw"
    }
  }
}

server/config.lua

Config = {
  ...,

  -- this function will compute available spawn locations for the player
  spawnCompute = function(src, Player, firstJoin, isJailed)
    local spawnLocations = {};

    if not isJailed then
			if not firstJoin then
				spawnLocations = Utils:CopyTable(Config.baseSpawnLocations);
			elseif not Apartments.Starting then
				spawnLocations = Utils:CopyTable(Config.baseSpawnLocations);
			end

      -- prevent players from spawning at these locations by commenting them
			spawnLocations = Chars:GetApartmentLocations(Player, spawnLocations, firstJoin);
			spawnLocations = Chars:GetHousingLocations(Player, spawnLocations);
			spawnLocations = Chars:GetLastLocation(Player, spawnLocations, firstJoin);
		else
			table.insert(spawnLocations, {
				name = Config.jailSpawn.name,
				coords = Config.jailSpawn.coords,
				isJailed = true
			});
		end

    return spawnLocations;
  end
}
1 Like

if want to buy also need to buying the px_forms right?

Yup, it’s an investmest for the future since our upcoming resources will also rely on px_forms.

It also allows you to create your own forms really easily which look can contain anything, and even look like the photo below. We will be posting a separate release for those soon as well.

We also have an entire documentation on how to use px_forms here: Forms | Phynix Project. Just note that the docs use exports.px_hud for the export, but you should use exports.px_forms.

Version 1.1.1


Description

This update is composed of bug fixes:

  • Fixed an issue where player is unable to swap characters
  • Fixed an issue where player is unable to logout from their apartment

Quality work and constant updates! Thank you.

1 Like

Version 1.1.3


Description

This update provides additional configuration options to support alternative clothing resources.

Version 1.1.4


Description

Resolved issues with deletion form, some logs and a niche case where characters were not appearing properly.

If you liked px_chars but run ESX Legacy as the framework for your server, check out our other release below!