Git Product home page Git Product logo

fivem-appearance's Introduction

Hi ๐Ÿ‘‹

My name is Pedro.

I'm a generalist game programmer, currently building multiplayer team-thinking games.

I'm experienced working in Live Ops games with multi-disciplinary teams and in fast-paced environments. I like contributing to open-source projects, building tools to empower other developers, and everything related to game development.

Languages: TypeScript, Lua, C#, and C++.

You may also know me for my contributions to the Cfx / FiveM community.

Reach me at:

๐ŸŒ

fivem-appearance's People

Contributors

cyntaax avatar dolutattoo avatar enz0z avatar franfdezmorales avatar joeriaben avatar mahanmoulaei avatar morpheause avatar n-fire avatar nevos08 avatar pedr0fontoura avatar snakewiz avatar spalenybramborak avatar thelindat avatar yisusondev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fivem-appearance's Issues

prettier errors

Hello :D

If I compile the script, I always get some errors from prettier, saying he cant replace or insert something. Could you please remove prettier or fix these issues? i really want to use this ui but I need to do some changes

add hair variation two

On my server I use modified hairstyles and sometimes the original hair overlaps.

example:
image

and it should actually look like this.
image

I can give you more information if you need it, the main problem is that component number two seems to activate the original hairstyle.

Thank you for your time and for your excellent work!

Issue

Hi how can i use setPedComponent ? I have this code:

local playerPed = PlayerPedId()
local cos1 = '[{"drawable":6,"component_id":4,"texture":0}]'
local cos = exports['fivem-appearance']:setPedComponent(playerPed, cos1)

exports['fivem-appearance']:setPedComponent(playerPed, cos1 )
print(cos)

and I am getting print saying nil

also how can I update my version with lua files ?

Default Characters at char select screen

After logging in, making your character, saving them, logging out, and logging back in, at the char select screen, they're just the basic template users. the console is giving an error:
Script:qb-multicharacter SCRIPT ERROR: @qb-multicharacter/client/main/lua:137: No such export setPedAppearance in resource fivem-appearance

Any ideas?

Makeup secondary colors

Females have noticed the secondary makeup colors are not customizable in this menu. They say it appears the secondary color is defaulting to some shade of pink. Please consider adding secondary color to makeup options.

Health reset

its health will be reset after you close menu ?
or just for me ?

Unable to set -1 as min value for components

I'd like to be able to change the min/max values so that I can have -1 for components meaning I can do a topless guy for example. It seems that changing the values in settings.ts doesn't work as the min value I can enter is still 0 for the components.

This is my components section from the settings.ts:

components: [
{ component_id: 0, drawable: { min: -1, max: 255 }, texture: { min: 0, max: 255 } },
{ component_id: 1, drawable: { min: -1, max: 255 }, texture: { min: 0, max: 255 } },
{ component_id: 2, drawable: { min: -1, max: 255 }, texture: { min: 0, max: 255 } },
{ component_id: 3, drawable: { min: -1, max: 255 }, texture: { min: 0, max: 255 } },
{ component_id: 4, drawable: { min: -1, max: 255 }, texture: { min: 0, max: 255 } },
{ component_id: 5, drawable: { min: -1, max: 255 }, texture: { min: 0, max: 255 } },
{ component_id: 6, drawable: { min: -1, max: 255 }, texture: { min: 0, max: 255 } },
{ component_id: 7, drawable: { min: -1, max: 255 }, texture: { min: 0, max: 255 } },
{ component_id: 8, drawable: { min: -1, max: 255 }, texture: { min: 0, max: 255 } },
{ component_id: 9, drawable: { min: -1, max: 255 }, texture: { min: 0, max: 255 } },
{ component_id: 10, drawable: { min: -1, max: 255 }, texture: { min: 0, max: 255 } },
{ component_id: 11, drawable: { min: -1, max: 255 }, texture: { min: 0, max: 255 } },
],

before someone asks me... yes I did make sure I rebuild the whole thing after these changes :)

undefined outfit save

When you press "save outfit" and hit esc, then go to your saved outfits, theres an option thats "undefined"
image

No client export works, only setPlayerAppearance.

Hi there, I was having a problem since two days or more. The problem start when I try to execute a client exports function, for example the setPedComponents and the getPedComponents well saved in the SQL. When I start the command it throw me this console error, Gyazo Error .
If anyones knows the error tell me please my head is going to explode, I'm using right now the no build 1.2.0 version.

Extended configuration options

Really like the customisation configuration that can be passed through but it would be handy to extend this to also include:

  • The ability to remove the 'x' option, for example for a character creation where its mandatory?
  • The ability to filter just the hair options rather than all the facial assets
  • The ability to disable individually the camera options so we can disable for example, camera rotation but still permit the camera zooms to head, torso and feet

feature request: ped drop down selector to have selection focus

If I am choose a model, when I reopen the drop down it is scrolled all the way to the top with nothing selected. It would be really nice to have the current model selected and it scrolled to that spot so if you are looking for a model you don't have to scroll down and try to find where the last one was.

unable to add new tattoos

when i try to add new tattoos using the same

{
    "name": "hair-32-4",
    "label": "hair-32-4",
    "hashMale": "MP_Security_Hair_000_M",
    "hashFemale": "MP_Security_Hair_000_F",
    "zone": "ZONE_HAIR",
    "collection": "mpSecurity_overlays"
}

but change it for one of the tats i have from GTA5-mods.com

{
    "name": "Yakuza Tat 1",
    "label": "Yakuza Tat 1",
    "hashMale": "sp_fr_tat_000",
    "hashFemale": "sp_fr_tat_000",
    "zone": "ZONE_TORSO",
    "collection": "mpSecurity_overlays"
}

it doesn't work where did i go wrong?

new zip release

could a new release be put out in .zip format?

txadmin cannot process .rar files so I can't use it in a recipe

presumably this will work with the new workflow stuff

payment system when using the store

Hello, I would like to know if there is any way to make fivem-appearance use a system of charging players when entering the change of clothes, is it possible?

pd clothes

Hello how to remove this pd locker room
image

Tattoo data structure broken?

So I grabbed the output from the editor with something in every option. I used that structure that the editor put out and tried to set the character appearance with that and it throws an error relating to tattoos. Something is wrong with the tattoo data structure between output and input. Is this a known issue?

setPlayerAppearance export with kvs

Hi there!

I'm trying to use the setPlayerAppearance export with FiveM's internal kvs. Saving to the database is fine but trying to set the player appearance after spawn isn't proving effective..

Event to save the skin:

RegisterNetEvent('updatecharacterclothes')
AddEventHandler('updatecharacterclothes', function(appearance)
    local identifier = GetIdentifier(source)
        SetResourceKvp(('users:%s:outfit_current'):format(identifier), json.encode(appearance))
        print('outfit saved to db')
end)

Function to retrieve the skin:

function GetCharSkin(source)
	local source = source
    local identifier = GetIdentifier(source)
    local appearance =  GetResourceKvpString(('users:%s:outfit_current'):format(identifier))
    local charappearance = json.decode(appearance)

	return charappearance
end

I'm using this handler:

AddEventHandler('playerSpawned', function()

To trigger the server event that gets the saved data and using this event to try load it from the client:

RegisterNetEvent('player:loadcharacterclothes')
AddEventHandler('player:loadcharacterclothes', function(source, charappearance)
  print('and here')
  local appearance = charappearance
  exports["fivem-appearance"]:setPlayerAppearance(appearance)
  print('Loaded clothes')
end)

However, 'Default Dan' is loaded each time. No errors in the console, and the prints show each event running as they should.

Everything is standalone from any framework

Any suggestion?

EDIT: I overlooked the fact the export takes two params, so to anyone reading thism the correct syntax for me was:

exports["fivem-appearance"]:setPlayerAppearance(source, appearance)

setComponets problem

Hi it is me one more time can you help me with this issue ?
exports['fivem-appearance']:setPedAppearance(PlayerPedId(), {texture=0,drawable=0,component_id=0},{texture=0,drawable=0,component_id=1},{texture=0,drawable=0,component_id=2},{texture=0,drawable=15,component_id=3},{texture=0,drawable=14,component_id=4},{texture=0,drawable=0,component_id=5},{texture=0,drawable=5,component_id=6},{texture=0,drawable=0,component_id=7},{texture=0,drawable=15,component_id=8},{texture=0,drawable=0,component_id=9},{texture=0,drawable=0,component_id=10},{texture=0,drawable=91,component_id=11})

I want to use this export but noting is changing with character what can I do ?

1.1.0 version has SyntaxError in build script. Does not show customization screen.

image

Customization screen does not show up in the left.

image

in my server.cfg

setr fivem-appearance:customization 1
ensure fivem-appearance

The code I'm using to call this

function open_clothing_store()

    local config = {
        ped = false,
        headBlend = false,
        faceFeatures = false,
        headOverlays = false,
        components = true,
        props = true
    }

    TriggerEvent("cd_drawtextui:temp_hide_text")
    exports['fivem-appearance']:startPlayerCustomization(function(appearance)

        if appearance then
            exports["em_fw"]:update_skin(json.encode(appearance))
            TriggerEvent("cui_wardrobe:open")
        end
        TriggerEvent("cd_drawtextui:temp_show_text")
        
    end, config)

end

input sanitization

Need to limit the amount of 0's that can be input on range values to prevent resource crashing.

JSON error

This is the console output:
Uncaught (in promise) SyntaxError: Unexpected end of JSON input (@fivem-appearance/ui/build/static/js/main.53ee5267.chunk.js:1)

tattoos

Am I just missing them or at tattoos not in there as of yet?

startPlayerCustomization Export

Hello,

First off I want to say this is an amazing released and to keep up the good work.

Secondly, I do have an issue currently.

When a player connects to the server and Triggers the startPlayerCustomization (Trigged From a Menu after they are loaded in) It sometimes will throw them into NUI Focus (cursor) but no UI will render.

I am running the newest version of the resource (several hours ago).

It seems the only way to get it to work is to restart the fivem-appearance resource once the player has already joined the server.

ui error on load causes menu to not show

Sometimes, (maybe 1 out of 5 times) when the resource is started, it throws an error and the menu will not show. The resource has to be restarted before it will show. see video for demo.

error: Uncaught (in promise) SyntaxError: Unexpected end of JSON input (@fivem-appearance/ui/build/index.html:1)

Joining problem

When players join my server for the first time, they cant create their skin, they're just invisible. Do I need to link it with esx_identity? If so, I would appreciate if someone comments me how to do it.

NPC models and options

I get that NPC models are going to be different than MP models with what options are available. I just spawned in the fat male tourist and I know that he has different hair to choose from but none of the appearance options exist in the editor for him. Are they all disabled because it is not the MP model?

turn around error

getting an error when the turn around button is clicked

SCRIPT ERROR in event `__cfx_nui:appearance_turn_around': TypeError: OpenSequenceTask is not a function or its return value is not iterable
@fivem-appearance/typescript/build/client.js:1
@fivem-appearance/typescript/build/client.js:1

tattoos

Hello, I was wondering when tattoos will be added to fivem-appearence. I've seen it on the to-do list on the cfx.re post for a while now and was curious on when it will be implemented. Would be nice to have all character customizations in one place instead of a different menu just for tattoos.

Thanks.

Menu not coming up

having an issue were clothing mneu isnt apearing at all can give ur self the menu though 911 admin and its just invisable and ur stick in the menu any suggestions would be great

appearance cutoff

When I expand the appearance section it can scroll down to the very top of Moles and Freckles and the rest is cut off. Anyone else have that problem?

Resource optimization

When opening the interface once, even after closing, it continues using cpu, as if it were in a loop. Is it possible to optimize this? Or at least I wanted to understand why stay in a loop when the system is not even being used

Show on dev mode

Hello,
I fork your repo and want to modify it. How can I show the interface on the browser page ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.