Big Smoker Posted August 19, 2019 Share Posted August 19, 2019 Bom dia, Pessoal fiz um painel de informações e com um guiCreateScrollBar para volume so que esta dando quedas de FPS (depois de uns 10 minutos). textStart = guiCreateLabel (100, 241.5, 30, 22,(getElementData(getLocalPlayer(),"dxsoundLoginPlayer")or volumeStart*100).."%",false,tabConfig) guiSetFont (textStart, "default-small") MusicStart = guiCreateScrollBar(10, 240, 200, 18, true, false, tabConfig) guiScrollBarSetScrollPosition (MusicStart, getElementData(getLocalPlayer(),"dxsoundLoginPlayer")or volumeStart*100) addEventHandler("onClientGUIScroll",getRootElement(),function (Scrolled) if source == MusicStart then volumeStart2 = guiScrollBarGetScrollPosition (source) / 100 setElementData(getLocalPlayer(),"soundLoginPlayer",volumeStart2) setElementData(getLocalPlayer(),"dxsoundLoginPlayer",volumeStart2*100) -- manda para o data base guiSetText(textStart,math.floor(getElementData(getLocalPlayer(),"dxsoundLoginPlayer")).." %") end end) ----- Uso nas funções que tem playSound LoginMusic = playSound("sounds/Musics/1.mp3", true) setSoundVolume (LoginMusic, getElementData(localPlayer,"soundLoginPlayer") or 1) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now