Witam. Chcia? bym zrobic skrypt do muzyki aby sz?o w gui robic g?o?niej i ciszej muzyke. Problem polega w tym ze nie wiem jak zrobic Volume 0d 0 do 100.
Prosz? o pomoc
function nazwa ()
local get = getSoundVolume(song)
if (source == glo) then
setSoundVolume(song, -0.25)
end
end
addEventHandler ("onClientGUIClick", glo, nazwa)
function onGuiClick (button, state, absoluteX, absoluteY)
if (source == wyjdz) then
guiSetVisible(okno,false)
showCursor(false)
end
end
addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick)
addCommandHandler("music",
function ()
guiSetVisible(gui_okno[1], false)
showCursor(true)
end)
song = playSound("music.mp3",true)
function nazwa ()
local get = getSoundVolume(song)
if (source == gui_butt[2]) then
setSoundVolume(song, get-0.25)
end
end
addEventHandler ("onClientGUIClick", gui_butt[2], nazwa)
function nazwa2 ()
local get = getSoundVolume(song)
if (source == gui_butt[1]) then
setSoundVolume(song, get+0.25)
end
end
addEventHandler ("onClientGUIClick", gui_butt[1], nazwa2)
function onGuiClick ()
if (source == gui_butt[3]) then
guiSetVisible(gui_okno[1], false)
showCursor(false)
end
end
addEventHandler ("onClientGUIClick", gui_butt[3], onGuiClick)
addCommandHandler("music",
function ()
guiSetVisible(gui_okno[1], true)
showCursor(true)
end)
song = playSound("music.mp3",true)
function nazwa ()
local get = getSoundVolume(song)
if (source == gui_butt[2]) then
setSoundVolume(song, get-0.25)
end
end
addEventHandler ("onClientGUIClick", gui_butt[2], nazwa)
function nazwa2 ()
local get = getSoundVolume(song)
if (source == gui_butt[1]) then
setSoundVolume(song, get+0.25)
end
end
addEventHandler ("onClientGUIClick", gui_butt[1], nazwa2)
function onGuiClick ()
if (source == gui_butt[3]) then
guiSetVisible(gui_okno[1], false)
showCursor(false)
end
end
addEventHandler ("onClientGUIClick", gui_butt[3], onGuiClick)
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach