Maruchan Posted September 11, 2018 Share Posted September 11, 2018 Es una función de desmontar la tent del dayz, queria saber como hacer para que al demontar la tienda el "objeto" quede en la posición del usuario y no en donde se desmonto... ¿me explico?... function removeTent(object) local x, y, z = getElementPosition(getElementData(object, "parent")) local item, itemString = getItemTablePosition("Tienda de Campaña") local itemPickup = createItemPickup(item, x, y, z + 1, itemString) destroyElement(getElementData(object, "parent")) destroyElement(object) end addEvent("removeTent", true) addEventHandler("removeTent", getRootElement(), removeTent) Link to comment
-Rex- Posted September 15, 2018 Share Posted September 15, 2018 function removeTent(object) // local x, y, z = getElementPosition(source) local item, itemString = getItemTablePosition("Tienda de Campaña") local itemPickup = createItemPickup(item, x, y, z + 1, itemString) destroyElement(getElementData(object, "parent")) destroyElement(object) end addEvent("removeTent", true) addEventHandler("removeTent", getRootElement(), removeTent) Link to comment
Maruchan Posted September 16, 2018 Author Share Posted September 16, 2018 15 hours ago, -Rex- said: function removeTent(object) // local x, y, z = getElementPosition(source) local item, itemString = getItemTablePosition("Tienda de Campaña") local itemPickup = createItemPickup(item, x, y, z + 1, itemString) destroyElement(getElementData(object, "parent")) destroyElement(object) end addEvent("removeTent", true) addEventHandler("removeTent", getRootElement(), removeTent) Muchas gracias... Sabes que la tent al removerla queda muy alta a la posicion del jugador, deberia cambiar el 1 por un 0? 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