Get skin from player ped

So I’m creating a “Create a character” menu and I have clothes etc. working only I don’t really know how to get the skin of the ‘GetPlayerPed(-1)’

I need to json encode it to the database so final result should be:

{"model": "mp_m_freemode_01","ears_2":0,"arms":4,"beard_1":18,"bags_1":0,"makeup_4":0,"lipstick_3":0,"shoes_2":4,"hair_color_2":21,"beard_3":0,"helmet_2":0,"bags_2":0,"beard_4":0,"torso_2":0,"decals_2":0,"helmet_1":50,"makeup_2":0,"skin":8,"face":44,"chain_1":0,"bproof_2":0,"eyebrows_1":0,"hair_color_1":1,"decals_1":0,"shoes":35,"tshirt_1":15,"lipstick_4":0,"beard_2":10,"torso_1":125,"lipstick_2":0,"eyebrows_4":0,"glasses_1":3,"sex":0,"tshirt_2":0,"pants_1":4,"shoes_1":9,"lipstick_1":0,"makeup_1":0,"bproof_1":0,"eyebrows_2":10,"chain_2":0,"age_2":0,"makeup_3":0,"pants_2":0,"hair_2":0,"mask_1":0,"eyebrows_3":2,"hair_1":12,"glasses_2":0,"age_1":1,"ears_1":0,"mask_2":0}

Something like that.

EDIT: I’m not using ESX, I use my own framework

Hope anyone can help

2 Likes
model = GetEntityModel(PlayerPedId())

https://runtime.fivem.net/doc/reference.html#_0x9F47B058362C84B5

That only returns the model though, i knew that. :stuck_out_tongue: But I need the whole skin of a ped

By skin you mean each part of the outfit of your player ? You will have to use different natives

GET_PED_PROP_INDEX(Ped ped, int componentId)
GET_PED_PROP_TEXTURE_INDEX(Ped ped, int componentId)
GET_PED_DRAWABLE_VARIATION(Ped ped, int componentId)
GET_PED_TEXTURE_VARIATION(Ped ped, int componentId)

You may find this link helpful : https://wiki.■■■■■.net/index.php?title=Character_Components (that’s for GTMP so they don’t code the same way but you can find every component and prop id)

Thanks for the reply! I think this is what I need

How to use Json format? Please tell me

Have you any updated link?

Ooooooooh my god! You are god!!! :heart: Thank you!