Supported by CRC
A simple character selection menu. Create any number of characters.
- Select a Character
- Delete a Character
- Create a Character
- CRC DB
- CRC Instructional Buttons
- CRC Native Menu
- Login Plugin (Choose 1)
Highly recommended to get the extension, for better event handling.
-
Create a folder in your
src
folder calledcrc-select-character
. -
Add the
TypeScript
files from this resource, to that folder. -
Modify
server.toml
and ensure it loads whatever you named the folder.
In the case of the example above it should be crc-select-character
.
resources = [
'crc-db',
'crc-native-menu',
'crc-instructional-buttons',
'crc-discord-login',
'crc-select-character'
'watch-resources'
]
Your resource structure may vary
- Selection will immediately follow the login plugins.
- A selection event or creation event will be pushed after selection.
This is called when a player has selected an existing character with the appearance
property applied to the document.
alt.on('crc-select-character-finish', (player: alt.Player, _id: string) => {
//
})
This is called when a player has created a character but does not have any appearance
information.
alt.on('crc-select-character-finish-create', (player: alt.Player, _id: string) => {
//
})
This is called when the character selection is opened, and shows a list of all characters.
alt.onServer('crc-select-character-start', (characters: Character[]) => {
//
})
This is called when the character selection is completed. All events are unloaded.
alt.onServer('crc-select-character-finish', () => {
//
})
This is called when a player has picked the character in the menu.
This does not mean they are choosen
to spawn. This is when they're given more options like select
, delete
, etc.
alt.on('crc-select-character-pick', (characters: Character[]) => {
//
})
This is called whenever a player re-renders the menu.
- Occurs when going back a menu or two
alt.on('crc-select-character-back-to-characters', (characters: Character[]) => {
//
})