Big Smoker Posted February 28, 2022 Share Posted February 28, 2022 (edited) Estou fazendo uma função que preciso que pegue do 200 ate 600 so que na barra de rolagem. E to com dificuldade para fazer ele so contar do 200 ate 600. local volume1 = guiScrollBarGetScrollPosition (source)*10 guiSetText(distH,tostring(volume1)) esta função pega de 0 ~ 1000. Quero que ele conte de 200 ate 600 quando passo a rolagem Edited February 28, 2022 by Big Smoker Link to comment
Other Languages Moderators Lord Henry Posted February 28, 2022 Other Languages Moderators Share Posted February 28, 2022 local scrollPos = guiScrollBarGetScrollPosition (source) -- Vai de 0 até 100 local volume1 = (scrollPos*4) + 200 -- Vai de 200 até 600 --[[ Se scrollPos for igual a 0: (0*4) + 200 (0) + 200 200 Se scrollPos for igual a 100: (100*4) + 200 (400) + 200 600 ]] guiSetText(distH,tostring(volume1)) 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