ABoHussin Posted October 8, 2016 Share Posted October 8, 2016 (edited) السلام عليكم ابي شرح لفكشن getRealTime() لاني ابي اسوي مود مثلا الساعة 8 الصباح يشغل اذكار الصباح يعني انا شفت الويكي بس ابي كود مثلا يتاكد انو الريل تايم = 8 صباح عشان يشغل الدعاء وبس Edited October 8, 2016 by ABoHussin Link to comment
SycroX Posted October 8, 2016 Share Posted October 8, 2016 time = getRealTime() sec , min, hour = time.second, time.minute, time.hour setTimer(function() if hour == 8 then outputChatBox("الأذكار", root, 255, 255, 0, true) end end) لو تباها 8 بليل يبقا تتحقق ان الساعة 20 و هيك Link to comment
ABoHussin Posted October 8, 2016 Author Share Posted October 8, 2016 5 hours ago, x1AhMeD,-09 said: time = getRealTime() sec , min, hour = time.second, time.minute, time.hour setTimer(function() if hour == 8 then outputChatBox("الأذكار", root, 255, 255, 0, true) end end) لو تباها 8 بليل يبقا تتحقق ان الساعة 20 و هيك شكرا اخوي بس عادي استخدم and min == 30 ? Link to comment
ABoHussin Posted October 8, 2016 Author Share Posted October 8, 2016 4 minutes ago, x1AhMeD,-09 said: يب تقدر شكرا اخوي تعبتك بس طلب اخير تقدر تجيني سكايب استفسار بس .. ali.alyasre Link to comment
SycroX Posted October 8, 2016 Share Posted October 8, 2016 ما بقيت استخدم سكايب تبي شي قولي هنا Link to comment
ABoHussin Posted October 8, 2016 Author Share Posted October 8, 2016 الكود غلط اخوي ..! الديبوق يقرا ..! [2016-10-08 17:27:01] WARNING: adan\get.lua:3: Bad argument @ 'setTimer' [Expected number at argument 2, got none] Link to comment
iPrestege Posted October 8, 2016 Share Posted October 8, 2016 (edited) Client : function aCallAzkar ( ) local aTime = getRealTime ( ) local aHour = aTime.hour local aMinute = aTime.minute if ( aHour == 08 and aMinute == 30 ) then removeEventHandler ( 'onClientRender',root,aCallAzkar ) playSound( string soundPath, [ bool looped = false ] ) end end addEventHandler ( 'onClientRender',root,aCallAzkar ); Edited October 8, 2016 by FaHaD Mistake 2 Link to comment
ABoHussin Posted October 8, 2016 Author Share Posted October 8, 2016 2 hours ago, FaHaD said: Client : function aCallAzkar ( ) local aTime = getRealTime ( ) local aHour = aTime.hour local aMinute = aTime.minute if ( aHour == 08 and aMinute == 30 ) then removeEventHandler ( 'onClientRender',root,aCallAzkar ) playSound( string soundPath, [ bool looped = false ] ) end end addEventHandler ( 'onClientRender',root,aCallAzkar ); Thanks ,, تسلم يالامير ،، <3 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