Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Stuyk/rebar-character-creator
A character creator plugin for the Rebar Framework
https://github.com/Stuyk/rebar-character-creator
Last synced: about 22 hours ago
JSON representation
A character creator plugin for the Rebar Framework
- Host: GitHub
- URL: https://github.com/Stuyk/rebar-character-creator
- Owner: Stuyk
- Created: 2024-05-10T20:54:45.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-12T16:18:36.000Z (7 months ago)
- Last Synced: 2024-12-22T07:34:59.630Z (about 22 hours ago)
- Language: Vue
- Homepage:
- Size: 34.2 KB
- Stars: 3
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Character Creator for Rebar Framework
This plugin allows for players to customize their character after creating it.
Any character with `No Appearance` will be shown a dialogue to build an appearance.
This is strictly only for `appearance` and **not clothing**.
![GTA5_ExgWVBBkM4](https://github.com/Stuyk/rebar-character-creator/assets/21284100/fc345949-634e-451a-97ff-a74cff8855d5)
## Requires
You must have these plugins installed to use this plugin.
- [Rebar Auth](https://github.com/Stuyk/rebar-auth)
- [Rebar Character Select](https://github.com/Stuyk/rebar-character-select)## Features
- Face Blending
- Hair Blending
- Hair Overlays
- Facial Hair
- Eyebrows
- Eyes
- Face Structure / Micro Morphs
- Head Overlays (Makeup, Lipstick, Sun Damage, Freckles, etc.)
- Save on Finish## API
If you need to listen for when a player has created a character appearance or skipped the appearance creator you can use the `character-creator-api`.
```ts
import * as alt from 'alt-server';
import { useRebar } from '@Server/index.js';const Rebar = useRebar();
const api = Rebar.useApi();function handleCharacterCreated(player: alt.Player) {
// Do something with the player after they've created their appearance
// You'll likely want to spawn them
}function handleCharacterCreateSkip(player: alt.Player) {
// Do something with players who already have an appearance
// You'll likely want to spawn them
}async function init() {
// Wait for the API to be ready
await alt.Utils.waitFor(() => api.isReady('character-creator-api'), 30000);// Get the API
const charSelectApi = api.get('character-creator-api');// Hook in your event
charSelectApi.onCreate(handleCharacterCreated);
charSelectApi.onSkipCreate(handleCharacterCreateSkip);
}init();
```## Installation
From the main directory of your `Rebar` framework.
```
git clone https://github.com/Stuyk/rebar-character-creator src/plugins/character-creator
```That's it.
If you wish to save the plugin in your own repository, go to the `src/plugins/character-creator` folder and delete the `.git` folder.