Yang Posted October 12, 2018 Share Posted October 12, 2018 Ayuda, ¿como hago para cambiar la posicion de un jugador pero manteniendo el valor se su Z?, el tema es que quiero hacer un muro al fianal del mapa que teletrasporte al otro fianal del mapa, pero quiero que la z se mantenga, para que cuando un avion pase no sea teletransportado tocando el mar local Down_up1 = createMarker(0, -3450, -0.55000, 'checkpoint', 40.0, 255, 0, 0, 150) local Up_Down1 = createMarker(0, 3450, -0.55000, 'checkpoint', 40.0, 255, 0, 0, 150) function Up (source ) setElementPosition ( source, 0, 3400, player.z) end function Down (source ) setElementPosition ( source, 0, -3400, player.z) end addEventHandler( "onMarkerHit", Down_up1, Up ) addEventHandler( "onMarkerHit", Up_Down1, Down ) Link to comment
#Dv^ Posted October 12, 2018 Share Posted October 12, 2018 (edited) local Down_up1 = createMarker(0, -3450, -0.55000, 'checkpoint', 40.0, 255, 0, 0, 150) local Up_Down1 = createMarker(0, 3450, -0.55000, 'checkpoint', 40.0, 255, 0, 0, 150) function Up (source ) local x, y, z = getElementPosition(source) setElementPosition ( source, 0, 3400, z) end function Down (source ) local x, y, z = getElementPosition(source) setElementPosition ( source, 0, -3400, z) end addEventHandler( "onMarkerHit", Down_up1, Up ) addEventHandler( "onMarkerHit", Up_Down1, Down ) Prueba así. Edited October 12, 2018 by #Dv^ 1 Link to comment
Yang Posted October 12, 2018 Author Share Posted October 12, 2018 Hooo viejo, estube 4 horas con este lio, soy nuevo, muchas gracias, me lo solucionaste 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