All Projects → Stuyk → altv-os-character-editor

Stuyk / altv-os-character-editor

Licence: GPL-3.0 License
alt:V Open Source Character Editor / Synchronization

Programming Languages

javascript
184084 projects - #8 most used programming language
Less
1899 projects
HTML
75241 projects

Projects that are alternatives of or similar to altv-os-character-editor

altv-typescript
A Typescript Boilerplate for alt:V with simple setup and usage.
Stars: ✭ 32 (-8.57%)
Mutual labels:  fivem, ragemp, altv
altv-quickstart
The fastest alt:V JS setup on GitHub.
Stars: ✭ 29 (-17.14%)
Mutual labels:  fivem, ragemp, altv
krz personalmenu
🎓 ESX PersonalMenu by Korioz
Stars: ✭ 58 (+65.71%)
Mutual labels:  fivem, esx
natuna-fivem
Typescript/Javascript Bundled FiveM Framework with single module engine that runs on Javascript runtime. Powered with NodeJS.
Stars: ✭ 21 (-40%)
Mutual labels:  fivem, esx
esx advancedbanking
Advanced Banking for FiveM ESX Legacy
Stars: ✭ 18 (-48.57%)
Mutual labels:  fivem, esx
ox inventory
Overextended Inventory for ESX Legacy
Stars: ✭ 149 (+325.71%)
Mutual labels:  fivem, esx
esx menu default
ESX Menu Style for FXSERVER gtaonline style
Stars: ✭ 30 (-14.29%)
Mutual labels:  fivem, esx
esx scoreboard
esx - scoreboard | A user friendly scoreboard for your server ;)
Stars: ✭ 28 (-20%)
Mutual labels:  fivem, esx
esx advancedvehicleshop
Advanced Vehicle Shops for FiveM ESX Legacy
Stars: ✭ 28 (-20%)
Mutual labels:  fivem, esx
zAdmin
Powerfull admin menu that works with ESX.
Stars: ✭ 54 (+54.29%)
Mutual labels:  fivem, esx
esx extraitems
Extra Items for FiveM ESX Legacy
Stars: ✭ 44 (+25.71%)
Mutual labels:  fivem, esx
chat
FiveM Chat System | Works off ESX Framework
Stars: ✭ 32 (-8.57%)
Mutual labels:  fivem, esx
esx advancedweaponshop
Advanced Weapon Shop for FiveM ESX Legacy
Stars: ✭ 16 (-54.29%)
Mutual labels:  fivem, esx
esx repairkit
Simple repairkit script for FiveM ESX servers
Stars: ✭ 36 (+2.86%)
Mutual labels:  fivem, esx
PolyZone
PolyZone is a FiveM mod to define zones of different shapes and test whether a point is inside or outside of the zone
Stars: ✭ 136 (+288.57%)
Mutual labels:  fivem
ZIRIXV2
Base vRPex para FiveM, desenvolvida pela equipe ZIRAFLIX, conjunto a alguns scripts da comunidade.
Stars: ✭ 22 (-37.14%)
Mutual labels:  fivem
FiveM-Paid-Anticheats
Fivem Anticheat's sources, cracks and other shit have fun with it. Remember API > ALL https://discord.gg/stz4nCkhZp
Stars: ✭ 35 (+0%)
Mutual labels:  fivem
pma-voice
An easy drag n' drop resource that gives you a wrapper to use FiveM's built-in mumble voice.
Stars: ✭ 160 (+357.14%)
Mutual labels:  fivem
gb banking
FiveM Extended Banking Script
Stars: ✭ 14 (-60%)
Mutual labels:  fivem
Re-Ignited-Phone
ReIgnited Phone is a continuation and reimagination of the original GCPhone resource
Stars: ✭ 55 (+57.14%)
Mutual labels:  fivem

Open Source - Character Editor - alt:V

❤️ Become a Sponsor of my Open Source Work

⌨️ Learn how to script for alt:V

This repository if you found it useful!


Description

This script allows a player to be sent to a character editor screen. Where they may customize their facial appearances.

Includes presets, makeup, hairstyles, face customization for all features, and overlays.

Also includes the ability to export character code and import it.

Note: This is not a clothing editor.

Installing Dependencies / Installation

I cannot stress this enough. Ensure you have NodeJS 13+ or you will have problems.

  • NodeJS 13+
  • An Existing or New Gamemode
  • General Scripting Knowledge

After simply add the name of this resource to your server.cfg resource section.

altv-os-character-editor

Then simply clone this repository into your main server resources folder.

cd resources
git clone https://github.com/Stuyk/altv-os-character-editor

Ensure your package.json includes this property:

"type": "module"

Usage

Generally speaking what you want to do with this resource is up to you. However, there's a few rules and endpoints you need to use to sync players.

New Character Steps

  1. Show the editor to the player.
  2. Player finishes.
  3. Store the data sent up to server.
  4. Resynchronize the player's face from the server using character:Sync
  5. Done.

Existing Character Steps

  1. Pull Data from Database Somewhere
  2. Send through character:Sync
  3. Done.

Synchronization of Player Data

When a player creates their character you will get data similar to this:

{
    sex: 1,
    faceFather: 44,
    faceMother: 38,
    skinFather: 16,
    skinMother: 23,
    faceMix: 0.5,
    skinMix: 0.1,
    ...
}

What you want to do with this data is store it somewhere. When they rejoin your server you need to take this data and feed it through an alt event.

const someData = {
    sex: 1,
    faceFather: 44,
    faceMother: 38,
    skinFather: 16,
    skinMother: 23,
    faceMix: 0.5,
    skinMix: 0.1,
    ...
}

alt.emit('character:Sync', player, someData);

Toggle Character Editor

The character editor will take whatever location that the player is in currently and use it for their customization pivot point.

All you need to do is call an event with the character's old data if present.

alt.emit('character:Edit', player);

// OR

alt.emit('character:Edit', player, some_Data_Goes_Here);

Completion of Character Editing

After completing their edit the data will be sent up to the server.

Use the data to resync the player.

Store the data or do whatever you want with it.

alt.on('character:Done', (player, data) => {
    alt.emit('character:Sync', player, data);
    player.pos = player.pos; // This is used to prevent interior bugs. May require a small delay.
    console.log(data);
});
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].