bad skull Posted July 18, 2020 Posted July 18, 2020 estou com um pouco de dúvida em algumas funçoes por ex: como funciona o getTickCount como funciona o math.min e como funciona o sistema de "cordenadas" do interpolate between entendi mais ou menos como ele funciona mais ainda tenho umas duvidas eis aqui um exemplo de script q usa os 3 citados acima!, é uma simples janela em dx q abre em efeito de fade, ( me mandaram esse script a alguns dias ) local screenH, screenW = guiGetScreenSize() local x,y = (screenH/1366),(screenW/768) local effect = { alpha = 0, tick = getTickCount(), state = false } function pdx() local progress = math.min((getTickCount()-effect.tick)/3000,1) if effect.state then effect.alpha = interpolateBetween(effect.alpha,0,0,1,0,0,progress,"Linear") else effect.alpha = interpolateBetween(effect.alpha,0,0,0,0,0,progress,"Linear") if progress >= 0.9 then removeEventHandler("onClientRender",root,pdx) end end dxDrawRectangle(x*300,y*221,x*323,y*248,tocolor(0,0,0,255*effect.alpha)) end function abrirdx() effect.state = not effect.state effect.tick = getTickCount() showCursor(effect.state) if effect.state then removeEventHandler("onClientRender",root,pdx) addEventHandler("onClientRender",root,pdx) end end bindKey("x","down",abrirdx) se alguém puder me ajudar vou ficar muito agradecido!, e desculpe tanto post é que aq é o unico lugar q consigo tirar minhas duvidas obs: ja li tudo na wiki! , entendo ela mais ou menos mais n sei ler bem a wiki
ber Posted July 18, 2020 Posted July 18, 2020 Também adoraria saber como funcionam essas funções, to me matando pra criar uma progress bar pra um script de assalto a banco...
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