LOAM Posted April 11, 2017 Share Posted April 11, 2017 السلام عليكم شباب ازاى اعمل رقم يعد لحد صفر مثلا بس بخط كبير Link to comment
' A F . Posted April 11, 2017 Share Posted April 11, 2017 بـ المتغيرات dxDrawText or guiCreateLabel 1 Link to comment
#Soking Posted April 12, 2017 Share Posted April 12, 2017 aScreen_ , aVarB = { guiGetScreenSize ( ) } , true function StartCounter ( ) if ( aVarB == true ) then aVarB , aNumber , aBoolean , aRender = false , 20 , true , function ( ) if ( aNumber > 0 ) then if ( aBoolean == true ) then aNumber , aBoolean = ( aNumber - 1 ) , false setTimer ( function ( ) aBoolean = true end , 1000 , 1 ) end else removeEventHandler ( 'onClientPreRender' , root , aRender ) aVarB = true end dxDrawText ( aNumber , ( aScreen_ [ 1 ] - 19 ) / 2 , ( aScreen_ [ 2 ] - 32 ) / 2 , ( ( aScreen_ [ 1 ] - 19 ) / 2 ) + 19 , ( ( aScreen_ [ 2 ] - 32 ) / 2 ) + 32 , tocolor ( 255 , 255 , 255 , 255 ), 1.00, 'pricedown' , 'left' , 'top', false, false, false, false, false) end addEventHandler ( 'onClientPreRender' , root , aRender ) end end 1 Link to comment
#BrosS Posted April 12, 2017 Share Posted April 12, 2017 14 hours ago, #Soking said: aScreen_ , aVarB = { guiGetScreenSize ( ) } , true function StartCounter ( ) if ( aVarB == true ) then aVarB , aNumber , aBoolean , aRender = false , 20 , true , function ( ) if ( aNumber > 0 ) then if ( aBoolean == true ) then aNumber , aBoolean = ( aNumber - 1 ) , false setTimer ( function ( ) aBoolean = true end , 1000 , 1 ) end else removeEventHandler ( 'onClientPreRender' , root , aRender ) aVarB = true end dxDrawText ( aNumber , ( aScreen_ [ 1 ] - 19 ) / 2 , ( aScreen_ [ 2 ] - 32 ) / 2 , ( ( aScreen_ [ 1 ] - 19 ) / 2 ) + 19 , ( ( aScreen_ [ 2 ] - 32 ) / 2 ) + 32 , tocolor ( 255 , 255 , 255 , 255 ), 1.00, 'pricedown' , 'left' , 'top', false, false, false, false, false) end addEventHandler ( 'onClientPreRender' , root , aRender ) end end معلش أعرف ان الإفادة تمت بس أعطي طريقة ثانية TimeToFinish = getTickCount() + 5000 inCounting = true function StartCount() if inCounting then counting = math.ceil( (TimeToFinish - getTickCount()) /1000 ) dxDrawText(counting, ..............) if counting == 0 then inCounting = false TimeToFinish = getTickCount() end end end addEventHandler("onClientRender", root, StartCount) حط المتغيرات بالسطرين الأول تحت مكان تبي الوقت يبدا يمكن تضغط زر أو مدري رح يعد من 5 الى 0 أي خطأ نبهوني لأني جوال 1 Link to comment
LOAM Posted April 12, 2017 Author Share Posted April 12, 2017 42 minutes ago, #BrosS said: معلش أعرف ان الإفادة تمت بس أعطي طريقة ثانية TimeToFinish = getTickCount() + 5000 inCounting = true function StartCount() if inCounting then counting = math.ceil( (TimeToFinish - getTickCount()) /1000 ) dxDrawText(counting, ..............) if counting == 0 then inCounting = false TimeToFinish = getTickCount() end end end addEventHandler("onClientRender", root, StartCount) حط المتغيرات بالسطرين الأول تحت مكان تبي الوقت يبدا يمكن تضغط زر أو مدري رح يعد من 5 الى 0 أي خطأ نبهوني لأني جوال شكرا جدا 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