MrDante Posted February 27, 2016 Share Posted February 27, 2016 (edited) Galera é o seguinte, estou querendo que o dx fique piscando, diminuindo o alpha e aumentando , porem não estou conseguindo , qual é o problema? fadeIn = false textAlpha = 255 font = "bankgothic" function dxchat() dxDrawBorderedText(""..getPlayerName(localPlayer).." Está assaltando a loja", 197, 215, 197, 383, tocolor(255, 255, 255, textAlpha),1.00, font) dxDrawRectangle(168, 203, 468, 62, tocolor(0, 0, 0, 109), false) end function abrirchat() addEventHandler ("onClientRender", root, dxchat) if fadeIn == false then textAlpha = textAlpha - 7 elseif fadeIn == true then textAlpha = textAlpha + 7 end checkAlpha() setTimer(function() removeEventHandler ("onClientRender", root, dxchat) end, 20000, 1 ) end addEvent ("limparchat", true) addEventHandler ("limparchat", root, abrirchat) function checkAlpha() if textAlpha < 130 then fadeIn = true elseif textAlpha >= 247 and textAlpha <= 255 and fadeIn == true then fadeIn = false end end function dxDrawBorderedText(text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI) dxDrawText(text, x - 2, y - 2, w - 2, h - 2, tocolor(0, 0, 0, 255), scale, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x + 2, y - 2, w + 2, h - 2, tocolor(0, 0, 0, 255), scale, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x - 2, y + 2, w - 2, h + 2, tocolor(0, 0, 0, 255), scale, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x + 2, y + 2, w + 2, h + 2, tocolor(0, 0, 0, 255), scale, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x - 1, y, w - 1, h, tocolor(0, 0, 0, 255), scale, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x + 1, y, w + 1, h, tocolor(0, 0, 0, 255), scale, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x, y - 1, w, h - 1, tocolor(0, 0, 0, 255), scale, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x, y + 1, w, h + 1, tocolor(0, 0, 0, 255), scale, font, alignX, alignY, clip, wordBreak, false) dxDrawText(text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI) end Edited February 28, 2016 by Guest Link to comment
n3wage Posted February 27, 2016 Share Posted February 27, 2016 Você tem que por a parte de aumentar/diminuir a opacidade na função dxchat, Ela que está sendo executada a cada frame. Link to comment
MrDante Posted February 27, 2016 Author Share Posted February 27, 2016 Você tem que por a parte de aumentar/diminuir a opacidade na função dxchat, Ela que está sendo executada a cada frame. Nao mudou em nada Link to comment
n3wage Posted February 27, 2016 Share Posted February 27, 2016 function dxchat() dxDrawBorderedText(""..getPlayerName(localPlayer).." Está assaltando a loja", 197, 215, 197, 383, tocolor(255, 255, 255, textAlpha),1.00, font) dxDrawRectangle(168, 203, 468, 62, tocolor(0, 0, 0, 109), false) if fadeIn == false then textAlpha = textAlpha - 7 elseif fadeIn == true then textAlpha = textAlpha + 7 end checkAlpha() end Link to comment
MrDante Posted February 27, 2016 Author Share Posted February 27, 2016 function dxchat() dxDrawBorderedText(""..getPlayerName(localPlayer).." Está assaltando a loja", 197, 215, 197, 383, tocolor(255, 255, 255, textAlpha),1.00, font) dxDrawRectangle(168, 203, 468, 62, tocolor(0, 0, 0, 109), false) if fadeIn == false then textAlpha = textAlpha - 7 elseif fadeIn == true then textAlpha = textAlpha + 7 end checkAlpha() end isso mesmo que eu fiz, nao mudou em nada Link to comment
#RooTs Posted February 28, 2016 Share Posted February 28, 2016 deixa a if do fade fora da render man Link to comment
#RooTs Posted February 28, 2016 Share Posted February 28, 2016 leia atentamente o meu roteiro https://community.multitheftauto.com/in ... ls&id=6561 Link to comment
MrDante Posted February 28, 2016 Author Share Posted February 28, 2016 Então, eu consegui, e acho que foi um erro meu não sei ou não salvei na hora de testa-lo o jeito que o n3wage ajudou , mas dessa forma eu consegui kkkkk, obrigado e desculpa pela minha "lerdeza" Link to comment
#RooTs Posted February 28, 2016 Share Posted February 28, 2016 Então, eu consegui, e acho que foi um erro meu não sei ou não salvei na hora de testa-lo o jeito que o n3wage ajudou , mas dessa forma eu consegui kkkkk, obrigado e desculpa pela minha "lerdeza" kkkkkkk 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