Supported by CRC
Synchronize player, and pedestrian appearance based on a standardized Appearance
interface.
-
Create a folder in your
src
folder calledcrc-appearance
. -
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-appearance
.
resources = [
'crc-db',
'crc-native-menu',
'crc-instructional-buttons',
'crc-discord-login',
'crc-appearance'
'watch-resources'
]
Your resource structure may vary
Appearance events share the same names.
However, you can only apply appearance to pedestrians
on client-side.
Otherwise, use server-side event to apply appearance to actual players.
An event is emit when the appearance data has been applied to a player or ped.
Emit this when you want to synchronize player appearance on server-side.
alt.emit('crc-appearance-apply', somePlayer, someAppearanceData);
Listen to this event to see when a player's appearance has been updated.
alt.on('crc-appearance-updated', (somePlayer, someAppearanceData) => {});
Emit this when you want to synchronize ped appearance on client-side.
alt.emit('crc-appearance-apply', somePed, someAppearanceData);
Listen to this event to see when a player's appearance has been updated.
alt.on('crc-appearance-updated', (somePed, someAppearanceData) => {});