Jump to content

Recommended Posts

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
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 by Victor Script
  • Like 1
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...