Supported by CRC
Spawns a fresh character, or uses existing pos
to spawn the player.
- CRC DB
- Login Plugin (Choose 1)
- CRC Select Character
- CRC Create Character
- CRC Appearance
Highly recommended to get the extension, for better event handling.
-
Create a folder in your
src
folder calledcrc-spawn
. -
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-spawn
.
resources = [
...
'crc-spawn'
...
]
Your resource structure may vary
Spawning will auto synchronize a character to allow for crc
to have data set against the character.
This means you can use the crc.data.setValue
methods to update database data with any key / value pair.
Called when a pos
in the document has never been set; and has been set for the first time.
alt.on('crc-spawn-new-spawn', (player: alt.Player) => {})
Called for all spawn instances. Called immediately after a character has been spawned and synchronized.
alt.on('crc-spawn-spawned', (player: alt.Player) => {})