z24d Posted September 24, 2015 Share Posted September 24, 2015 السلام عليكم ابي اخلي كلام دي اكس يسوي مثل الفلشر يطلع ويختفي يطلع ويختفي يطلع ويختفي بس ابيه بالتدريج شلون؟ ترا ادري السالفة فيها تايمر لكن الي اعرفه ان التايمر يسوي الشيء بعد مدة معينة ماهو يسوي شيء بالتدريج وسنكث يو نبي ردود سريعة : ( Link to comment
#CroSs Posted September 24, 2015 Share Posted September 24, 2015 Show = true setTimer( function() Show = not Show end, 100, 0 ) addEventHandler( "onClientRender", root, function() if ( Show ) then dxDrawText.. end end) Link to comment
z24d Posted September 24, 2015 Author Share Posted September 24, 2015 لاهنت يالطيب لكن ابيها بالتدريج Link to comment
#CroSs Posted September 24, 2015 Share Posted September 24, 2015 لاهنت يالطيب لكن ابيها بالتدريج وش قصدك بالتدريج ؟ يعني الشفافية كل شوي تزيد لـ 255 بعدين تنقص لـ 0 وهكذا ؟ Link to comment
#CroSs Posted September 24, 2015 Share Posted September 24, 2015 local Alpha = 255 local AlphaDown = true addEventHandler( "onClientRender", root, function() if ( AlphaDown ) then if ( Alpha >= 255 ) then Alpha = 254 elseif ( Alpha < 255 ) and ( Alpha > 0 ) then Alpha = Alpha - 1 elseif ( Alpha <= 0 ) then Alpha = 1 AlphaDown = not AlphaDown end else if ( Alpha >= 255 ) then Alpha = 254 AlphaDown = not AlphaDown elseif ( Alpha < 255 ) and ( Alpha > 0 ) then Alpha = Alpha + 1 elseif ( Alpha <= 0 ) then Alpha = 1 end end dxDrawText ( "الكلام", left, top, right, bottom, tocolor( 255, 255, 255, Alpha ), 1, "default-bold", "center", "center", false, false, false, true ) end) Link to comment
TAPL Posted September 24, 2015 Share Posted September 24, 2015 local timeToFade = 2000 local fadeStart, fadeEnd = 0, 255 addEventHandler("onClientRender", root, function() if not start then start = getTickCount() end local prog = (getTickCount() - start)/((start + timeToFade) - start) local alpha = interpolateBetween(fadeStart, 0, 0, fadeEnd, 0, 0, prog, "SineCurve") dxDrawText("Hello World", 500, 500, 500, 500, tocolor(255, 255, 255, alpha), 1, "default-bold", "center", "center", false, false, false, true) end) Link to comment
z24d Posted September 24, 2015 Author Share Posted September 24, 2015 لاهنت ياتابل شلون اخلي timeToFade موجودة ب Settings - Admin-panel ? Link to comment
#CroSs Posted September 24, 2015 Share Posted September 24, 2015 local timeToFade = 2000 local fadeStart, fadeEnd = 0, 255 addEventHandler("onClientRender", root, function() if not start then start = getTickCount() end local prog = (getTickCount() - start)/((start + timeToFade) - start) local alpha = interpolateBetween(fadeStart, 0, 0, fadeEnd, 0, 0, prog, "SineCurve") dxDrawText("Hello World", 500, 500, 500, 500, tocolor(255, 255, 255, alpha), 1, "default-bold", "center", "center", false, false, false, true) end) ما جات على بالي interpolateBetween . المهم أن الطريقتين صح Link to comment
TAPL Posted September 24, 2015 Share Posted September 24, 2015 تحتاج تستخدم الفنكشن ذا get و بما ان الفنكشن ذا جانب سيرفر فقط و كود الي يسوي الكلام موجود بالكلينت راح تحتاج تريقر او المنت داتا Link to comment
z24d Posted September 24, 2015 Author Share Posted September 24, 2015 وش فائدتة هذا الفنكش Link to comment
z24d Posted September 24, 2015 Author Share Posted September 24, 2015 خلاص عرفتله يعطيك العافية 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