Szerző Téma: Bajom akadt a playSound-al! Segítsetek!  (Megtekintve 1237 alkalommal)

Bajom akadt a playSound-al! Segítsetek!
« Dátum: 2017. Május 06. - 16:57:05 »
0
Sziasztok! A playSound belassítja a zenéket. Linkeletem róla egy videót. Kérlek segítsetek megoldani (Bocsi, hogy fejtetőn van a kép, de ugyis a hang a lényeg!)
 


   

 
 

Bajom akadt a playSound-al! Segítsetek!
« Válasz #1 Dátum: 2017. Május 06. - 17:05:07 »
0
Szia, a script-et mellékelnéd?

Bajom akadt a playSound-al! Segítsetek!
« Válasz #2 Dátum: 2017. Május 06. - 17:06:59 »
0
function dashboard()
    if show == true then
    local x,y = guiGetScreenSize()
    local oX,oY = 1920, 1080
    local sound = playSound(\'zene.mp3\')
        setSoundVolume(sound, 1)
        dxDrawImage (0/oX*x, 0/oY*y, 1920/oX*x, 1080/oY*y, \'kep.png\', 0, -120 )
        dxDrawRectangle(260/oX*x, 340/oY*y, 1400/oX*x, 100/oY*y, 0x7F000000)
        dxDrawRectangle(260/oX*x, 340/oY*y, 1400/oX*x, 100/oY*y, 0x7F000000)
        dxDrawText(\"World\",  260, 240, 280, 30, tocolor(0, 222, 255, 188), 4, \"pricedown\")
        dxDrawText(\"Life\",  540, 260, 280, 30, tocolor(255, 255, 255, 255), 3, \"pricedown\")
        
        dxDrawRectangle(335/oX*x, 465/oY*y, 228/oX*x, 100/oY*y, 0x7F000000)
        dxDrawRectangle(335/oX*x, 465/oY*y, 228/oX*x, 100/oY*y, 0x7F000000)
        
        dxDrawRectangle(588/oX*x, 465/oY*y, 228/oX*x, 100/oY*y, 0x7F000000)
        dxDrawRectangle(588/oX*x, 465/oY*y, 228/oX*x, 100/oY*y, 0x7F000000)
        
        dxDrawRectangle(841/oX*x, 465/oY*y, 228/oX*x, 100/oY*y, 0x7F000000)
        dxDrawRectangle(841/oX*x, 465/oY*y, 228/oX*x, 100/oY*y, 0x7F000000)
        
        dxDrawRectangle(1094/oX*x, 465/oY*y, 228/oX*x, 100/oY*y, 0x7F000000)
        dxDrawRectangle(1094/oX*x, 465/oY*y, 228/oX*x, 100/oY*y, 0x7F000000)
        
        dxDrawRectangle(1357/oX*x, 465/oY*y, 228/oX*x, 100/oY*y, 0x7F000000)
        dxDrawRectangle(1357/oX*x, 465/oY*y, 228/oX*x, 100/oY*y, 0x7F000000)
end
end
addEventHandler(\"onClientRender\", root, dashboard)
 
local openedTime = 0
function MutatDashboard()
        if getTickCount()-openedTime <= 5 and not show then
            outputChatBox(\"Csak 5 másodpercenként nyithatod meg a dashboardot.\", 2)
            return
        else
            openedTime = getTickCount()
        end
 
        setElementData(localPlayer, \"toggle-->All\", show)
 
        if show then
            show = false
            showChat(true)
            setTimer(function()
                toggleControl(\"change_camera\",true)
            end, 500, 1)
            
        else            
            show = true
            showChat(false)
        end
    end
bindKey(\"o\",\"down\",MutatDashboard)
 
 
 
Zene része:
 
    local sound = playSound(\'zene.mp3\')
        setSoundVolume(sound, 1)

Nem elérhető Enigma

  • 391
    • Profil megtekintése
Bajom akadt a playSound-al! Segítsetek!
« Válasz #3 Dátum: 2017. Május 06. - 17:44:41 »
0
onClientRenderbe nemigazán kéne hangot lejátszani.

Nem elérhető Xenius

  • 668
    • Profil megtekintése
Bajom akadt a playSound-al! Segítsetek!
« Válasz #4 Dátum: 2017. Május 06. - 18:14:08 »
0
Mielőtt elindítod a zenét ellenőrizd hogy már létezik-e és nem lesz ilyen gond.
 
if not isElement(sound) then
 
sound = playSoundCuccos
 
end

Nem elérhető Enigma

  • 391
    • Profil megtekintése
Bajom akadt a playSound-al! Segítsetek!
« Válasz #5 Dátum: 2017. Május 06. - 18:20:15 »
0
Vagy csak belerakja a \"MutatDashboard\" functionba a playSoundot és nem csinál egy felesleges if statementet.

Bajom akadt a playSound-al! Segítsetek!
« Válasz #6 Dátum: 2017. Május 06. - 19:24:21 »
0
Idézetet írta: Zoli1212121212 date=1494082625


   
       A playSound belassítja a zenéket.
   
   
       
   


Amúgy nem belassította, hanem milliárdszor lejátszotta.

Bajom akadt a playSound-al! Segítsetek!
« Válasz #7 Dátum: 2017. Május 07. - 00:31:56 »
0
Köszi a segítségeteket! :) Megoldodott.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal