pedr0fontoura / fivem-appearance

👀 A flexible player customization script for FiveM.
https://forum.cfx.re/t/release-fivem-appearance/2438537
MIT License
120 stars 72 forks source link

Issue #55

Closed s0u007 closed 2 years ago

s0u007 commented 2 years ago

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 ?

franfdezmorales commented 2 years ago

Hey! You need to pass and object, not an array with a object. The set function is a void so doesnt return anything. If you need to make this code works, try this:

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

I dont understand the question "also how can I update my version with lua files ?", could you explain a bit more? Really ty!

s0u007 commented 2 years ago

That's a lot it is working. Explaing I have and older verios without tattos and stuff. I downlowded it from some with ready lua files and now I want to update this script without making lua part again. I want to get the tattoo option the most

franfdezmorales commented 2 years ago

If you have downloaded from another site, its hard to make it work with current version of this script. I recommend that you download the current version (1.3.1).

s0u007 commented 2 years ago

So waht should I do now, because I don't start again with lua files

franfdezmorales commented 2 years ago

If you want to use this script, you just need to use the exports, dont worry about languages, it will work on lua, ts, js, c# files. If you have other version, you could replace with this. If you want to modify this script, then you will need to download the source, and make your modifications.

s0u007 commented 2 years ago

ok that helps a lot that you very much for support