Jump to content

Preciso que o som toque nas mesmas coordenadas que o marker


Recommended Posts

Preciso que o playSound3D toque nas mesmas coordenadas do marker, tentei dessa forma porém não deu certo :/
phone = { 
    {1970.5, -1776.5999755859, 12.60000038147},
    {1365.0999755859, -1741.1999511719, 12.60000038147},
}
   
randomPhone = math.random(1, #phone)

function trafVenda ()
    
    outputChatBox("Tabela randomizada, value: "..randomPhone )
    setTimer(function()
        
        local markerphone= createMarker(phone[randomPhone][1], phone[randomPhone][2], phone[randomPhone][3], "cylinder",1.1, 16, 102, 231, 100 )
        local X, Y, Z = getElementPosition (markerphone)
        local som = playSound3D ("Phone/telefone", X, Y, Z, false)
        local blip = createBlipAttachedTo(markerphone, 37, 2)
        outputChatBox("Marker e Blip criados.")
       if isElementWithinMarker (getLocalPlayer(), markerphone) then
         destroyElement(markerphone)
         destroyElement(blip)
         outputChatBox("Teste finalizado.")
         stopSound(som)
       end 
    end, 15000, 1)  
end  
addCommandHandler("teste", trafVenda)

BASS ERROR 2 in LoadMedia  path:D:\MTA San Andreas 1.5\mods\deathmatch\resources\cristal\Phone\telefone  3d:1  loop:1

ACABEI  D PERCEBER QUE N COLOQUEI .MP3 KKKK

 

Edited by function learnLua
  • Haha 1
Link to comment
  • DNL291 locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...