Jump to content

main

Members
  • Posts

    112
  • Joined

  • Days Won

    1

Everything posted by main

  1. Maybe it helps you: https://wiki.multitheftauto.com/wiki/GetElementsInDimension
  2. Pelo visto você não entendeu e nem testou a função, uma vez que a ré é ativada ela mantém quando o carro para, o @Lord Henry fez uma verificação para que isso não aconteça.
  3. Enfim, eu apenas disse que a função que você mostrou também seria útil mas teria que fazer umas modificações como foi feita na função isVehicleReversing pelo @Lord Henry. Sendo assim vai dar no mesmo.
  4. Seria útil também, mas teria que fazer umas modificações, pra por exemplo quando o carro estiver parado não detectar a ré.
  5. O que você procura está aqui: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3526
  6. Eu tinha visto essa função há um tempo atrás em algum resource disponível na internet, mas não estou lembrado qual resource/site que eu vi. Como andei estudando essa função, sei de có.
  7. function detect() local theVehicle = getPedOccupiedVehicle(localPlayer) if theVehicle then local getMatrix = getElementMatrix(theVehicle) local getVelocity = Vector3(getElementVelocity(theVehicle)) local getVectorDirection = (getVelocity.x * getMatrix[2][1]) + (getVelocity.y * getMatrix[2][2]) + (getVelocity.z * getMatrix[2][3]) if (getVectorDirection == 0 or getVectorDirection > 0) then return end if (getVectorDirection < 0) then print(getVectorDirection) outputChatBox("Ré") end end end setTimer(detect, 1000, 0) Tenta isso.
  8. Talvez isso te ajude. https://forum.multitheftauto.com/topic/88782-wip-vehicle-brake-light-system/ ou tente usar isto: function detect() local theVehicle = getPedOccupiedVehicle(localPlayer) if theVehicle then local getMatrix = getElementMatrix(theVehicle) local getVelocity = Vector3(getElementVelocity(theVehicle)) local getVectorDirection = (getVelocity.x * getMatrix[2][1]) + (getVelocity.y * getMatrix[2][2]) + (getVelocity.z * getMatrix[2][3]) if (getVectorDirection < 0) then outputChatBox("Ré") end end end setTimer(detect, 1000, 0)
×
×
  • Create New...