Prodigy0178

Ayuda con la rotación de una mochila en DayZ

Recommended Posts

Necesito ayuda, cuando me coloco la mochila sale acostada. Solo son 2 mochilas, la Czech y Combate(una que agregue). 

Son la de 80 y 42 espacios.

Esta es la linea de las cosas:

 

local elementBackpack = {} 
function backPackBack (dataName,oldValue) 
    if getElementType(source) == "player" and dataName =="MAX_Slots" then
        local newValue = getElementData(source,dataName)
        if elementBackpack[source] then
            detachElementFromBone(elementBackpack[source])
            destroyElement(elementBackpack[source])
            elementBackpack[source] = false
        end
        local x,y,z = getElementPosition(source)
        local rx,ry,rz = getElementRotation(source)
        if newValue == 12 then
            elementBackpack[source] = createObject(3026,x,y,z)
            triggerClientEvent("onRollMessageStart", source, "Te Has Puesto La Mochila Alice",22,255,0) 
        elseif newValue == 18 then
            elementBackpack[source] = createObject(1248,x,y,z)
            triggerClientEvent("onRollMessageStart", source, "Te Has Puesto La Mochila de Asalto",22,255,0)
        elseif newValue == 22 then
            elementBackpack[source] = createObject(14888,x,y,z)
            triggerClientEvent("onRollMessageStart", source, "Te Has Puesto La Mochila Ghillie",22,255,0) 
        elseif newValue == 28 then
            elementBackpack[source] = createObject(2733,x,y,z)
            triggerClientEvent("onRollMessageStart", source, "Te Has Puesto La Mochila Drybag",22,255,0)     
        elseif newValue == 32 then
            elementBackpack[source] = createObject(1818,x,y,z)
            triggerClientEvent("onRollMessageStart", source, "Te Has Puesto La Mochila Vintage",22,255,0)                 
        elseif newValue == 38 then
            elementBackpack[source] = createObject(2303,x,y,z)
            triggerClientEvent("onRollMessageStart", source, "Te Has Puesto La Mochila de Montaña",22,255,0) 
        elseif newValue == 42 then
            elementBackpack[source] = createObject(1575,x,y,z)
            triggerClientEvent("onRollMessageStart", source, "Te Has Puesto La Mochila Czech",22,255,0) 
        elseif newValue == 50 then
            elementBackpack[source] = createObject(1252,x,y,z)
            triggerClientEvent("onRollMessageStart", source, "Te Has Puesto La Mochila Coyote",22,255,0) 
        elseif newValue == 58 then
            elementBackpack[source] = createObject(2866,x,y,z)
            triggerClientEvent("onRollMessageStart", source, "Te Has Puesto La Mochila CMRA",22,255,0)        
        elseif newValue == 66 then
            elementBackpack[source] = createObject(2020,x,y,z)
            triggerClientEvent("onRollMessageStart", source, "Te Has Puesto La Mochila Militar",22,255,0)     
        elseif newValue == 80 then
            elementBackpack[source] = createObject(2000,x,y,z)
            triggerClientEvent("onRollMessageStart", source, "Te Has Puesto La Mochila de Combate",22,255,0)                 
        elseif newValue == 150 then
            elementBackpack[source] = createObject(2405,x,y,z)
            triggerClientEvent("onRollMessageStart", source, "Te Has Puesto La Mochila Hero Z",22,255,0) 
        elseif newValue == 250 then
            elementBackpack[source] = createObject(2189,x,y,z)
            triggerClientEvent("onRollMessageStart", source, "Te Has Puesto La Mochila de Navidad",22,255,0) 
        elseif newValue == 300 then
            elementBackpack[source] = createObject(2095,x,y,z)
            triggerClientEvent("onRollMessageStart", source, "Te Has Puesto La Mochila Teddy",22,255,0) 
        elseif newValue == 8 then
            return
        end
        if newValue == 46 then
            attachElementToBone(elementBackpack[source],source,3,0,-0.16,0.05,270,0,180)
        else
            attachElementToBone(elementBackpack[source],source,3,0,-0.225,0.05,90,0,0)
        end
    end   

 

De ante mano, gracias

Share this post


Link to post

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.