VictorScripting Posted December 9, 2019 Share Posted December 9, 2019 Olá comunidade tudo bem?. Estou com um problema pois estou usando um script client que usar o object_preview, eu desejo que ao criar o ped adicione a roupa que eu estou usando no meu CJ a função que faz o ped é essa: function creatPedProjection() if panelState then if (getElementData(localPlayer, "Tab") == false) then x1, y1, z1 = getCameraMatrix() myElement = createPed (getElementModel(localPlayer), x1, y1, z1) myObject = exports.object_preview:createObjectPreview(myElement, 5, 5, 0, x*250, y*150, x*330, y*410, false, true, true) exports.object_preview:setRotation(myObject,-0, 0, 160) setElementData(localPlayer, "Tab", true) end end end function resetPedProjection () exports.object_preview:destroyObjectPreview(myObject) myElement = nil myObject = nil end ja tentei várias formas mais n muda a roupa dele. Link to comment
Other Languages Moderators Lord Henry Posted December 9, 2019 Other Languages Moderators Share Posted December 9, 2019 Já tentou usar addPedClothes no myObject? Link to comment
DNL291 Posted December 9, 2019 Share Posted December 9, 2019 Faça um loop com getPedClothes, percorrendo do 0 ao 17 para obter as roupas do cliente. Irá retornar textura e modelo se tiver com a roupa, então você adiciona ao ped com addPedClothes. Link to comment
VictorScripting Posted December 9, 2019 Author Share Posted December 9, 2019 4 hours ago, Lord Henry said: Já tentou usar addPedClothes no myObject? ja fiz com addPedClothes mais não funcionou estou com duvidas sobre ele e eu não sei fazer loop Link to comment
DNL291 Posted December 10, 2019 Share Posted December 10, 2019 Tá aqui o loop: for theType=0, 17 do local texture, model = getPedClothes( localPlayer, theType ) if texture then addPedClothes(thePed, texture, model, theType) end end 1 Link to comment
VictorScripting Posted December 10, 2019 Author Share Posted December 10, 2019 (edited) 13 hours ago, DNL291 said: Tá aqui o loop: for theType=0, 17 do local texture, model = getPedClothes( localPlayer, theType ) if texture then addPedClothes(thePed, texture, model, theType) endend nossa mt obg danilin cara to mt feliz sério msm e para o pessoal que precisa da função ta aqui pra vcs !! function creatPedProjection() if panelState then if (getElementData(localPlayer, "Tab") == false) then x1, y1, z1 = getCameraMatrix() myElement = createPed (getElementModel(localPlayer), x1, y1, z1) myObject = exports.object_preview:createObjectPreview(myElement, 5, 5, 0, x*250, y*150, x*330, y*410, false, true, true) exports.object_preview:setRotation(myObject,-0, 0, 160) setElementData(localPlayer, "Tab", true) for theType=0, 17 do local texture, model = getPedClothes( localPlayer, theType ) if texture then addPedClothes(myElement, texture, model, theType) end end end end end function resetPedProjection () exports.object_preview:destroyObjectPreview(myObject) myElement = nil myObject = nil end Edited December 10, 2019 by Victor Script 1 Link to comment
Other Languages Moderators Lord Henry Posted December 11, 2019 Other Languages Moderators Share Posted December 11, 2019 4 hours ago, Victor Script said: nossa mt obg danilin Cuidado ae cara. Ele não é o Danilin. A não ser que vc conheça ele na RL e tenha dado esse apelido pra ele. 1 2 Link to comment
DNL291 Posted December 12, 2019 Share Posted December 12, 2019 On 10/12/2019 at 20:14, Victor Script said: nossa mt obg danilin Deve ter confundido com este Danilin Ou me deu um apelido novo? ¯\_(ツ)_/¯ 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now