andrex123 Posted January 2, 2012 Posted January 2, 2012 ptaxi = createObject ( 968, 1811.3994140625, -1886.7998046875, 13.10000038147, 0, 270, 90)} function ptaxi () setElementRotation ( ptaxi, 0, 0, 90) setTimer (setElementRotation, 8000, 1, 0, 270, 90) end addCommandHandler ("ptaxi", ptaxi) la idea es que cuendo el jugador escriba /ptaxi se abra un porton de los taxista y luego se cierre
Castillo Posted January 2, 2012 Posted January 2, 2012 porton = createObject ( 968, 1811.3994140625, -1886.7998046875, 13.10000038147, 0, 270, 90) function ptaxi () local rx, ry, rz = getElementRotation(porton) if (math.floor(ry) == 270 and math.floor(rz) == 90) then moveObject(porton, 3000, 1811.3994140625, -1886.7998046875, 13.10000038147, 0, 90, 0) setTimer(moveObject, 7000, 1, porton, 3000, 1811.3994140625, -1886.7998046875, 13.10000038147, 0, -90, 0) end end addCommandHandler ("ptaxi", ptaxi)
andrex123 Posted January 2, 2012 Author Posted January 2, 2012 pero que estaba mal? explicame detalladamente
Otto Posted January 2, 2012 Posted January 2, 2012 El titulo, "Que ahi de malo aka?" seria "Que hay de malo acá?".
Castillo Posted January 2, 2012 Posted January 2, 2012 pero que estaba mal? explicame detalladamente Primero: Habias llamado tu funcion igual que la puerta, nunca iva a funcionar. Segundo: No estabas moviendo la puerta, si no cambiandole la rotacion y la posicion (y ensima mal). Tercero: Tenias esto "}" al final de createObject, eso no deberia estar ahi. P.D: Soy muy malo explicando cosas .
andrex123 Posted January 2, 2012 Author Posted January 2, 2012 gracias men pero tu depues le agregaste mas lineas, guiones
Castillo Posted January 2, 2012 Posted January 2, 2012 Te mejore el script un poco, asi la puerta no se bugeaba al intentar abrirla cuando ya lo esta.
Recommended Posts