SaedAmer Posted May 13, 2016 Posted May 13, 2016 السلام عليكم معي بطن عاوز اخلي البتطن ده يشتغر في توقيتات مثلا الساعة 12 الظهر يشتغل البوطن و يقعد مده قدرها 5 دقائق و بعد كده يشتغر بوطن تاني --------------- التوقيتات مثلا توقيتات / مواعيد الصلاة و هي اذان الفجر 3:23 الشروق 5:02 اذان الظهر 11:51 اذان العصر 3:28 اذان المغرب 6:41 اذان العشاء 8:07
Jupi Posted May 13, 2016 Posted May 13, 2016 getTime setTimer guiSetEnabled اعتقد انه يبي الوقت الحقيقي في العالم لو اعتقادي صح استعمل الجدول اللي يرجع getRealTime()
SaedAmer Posted May 13, 2016 Author Posted May 13, 2016 getTime setTimer guiSetEnabled اعتقد انه يبي الوقت الحقيقي في العالم لو اعتقادي صح استعمل الجدول اللي يرجع getRealTime() ممكن مثال ؟؟
Jupi Posted May 13, 2016 Posted May 13, 2016 addCommandHandler("RealTime", function (Player) local Time = getRealTime() -- نجيب جدول الوقت الحقيقي local hour = Time["hour"] -- نجيب الساعة local minute = Time["minute"] -- نجيب الدقيقة outputChatBox(hour..":"..minute, Player, 255, 0, 255, true)--نطلعهم بلشات end ) الاندكسات حقت الجدول هنا : https://wiki.multitheftauto.com/wiki/GetRealTime
SaedAmer Posted May 14, 2016 Author Posted May 14, 2016 بعرف ان الكود خرطبيتا صح ولا ايه ؟؟ addCommandHandler("RealTime", function (Player) local Time = getRealTime() -- نجيب جدول الوقت الحقيقي local hour = Time["hour"] -- نجيب الساعة local minute = Time["minute"] -- نجيب الدقيقة outputChatBox(hour..":"..minute, Player, 255, 0, 255, true)--نطلعهم بلشات function ChangeMyButtonEnabled ( ) if time [03:23 05:02 11:51 15:29 18:41 20:07] than if ( guiGetEnabled ( GUIEditor.button[3] ) == true ) then guiSetEnabled ( GUIEditor.button[4], false ) Timer = setTimer(function( ) else guiSetEnabled ( GUIEditor.button[4], true ) end end MyButtin 1 = guiCreateWindow(32, 181, 137, 34, "قفل الشات :: الاذان ::", false) MyButton 2 = guiCreateButton(32, 250, 137, 34, "فتح الشات :: الاذان ::",true,) end end, 300000, 0)
nxFairlywell Posted May 14, 2016 Posted May 14, 2016 صراحة انا مافهمت كلمة بطن وضح انت تبي لوحة او سكربت الأذان ولا تبي شي ثاني؟ Discord ID : nxFairlywell#6895
#J2mes Posted May 14, 2016 Posted May 14, 2016 سويت لك فنكشن بسيط .. فقط تحط الساعه و الدقيقة والثانية function isTime ( hour , minute , second ) for i,args in ipairs ( { hour,minute,second } ) do if ( type ( args ) ~= "number" ) then return false end end if ( second == nil or second < 0 ) then second = 0 end local Real = getRealTime() local Hours,Minutes,Seconds = Real["hour"],Real["minute"],Real["second"] if ( Hours == hour and Minutes == minute and Seconds == second ) then return true else return false end end addCommandHandler("checkTime", function ( ) local Real = getRealTime() local Hours,Minutes,Seconds = Real["hour"],Real["minute"],Real["second"] if ( isTime ( 12 , 15 , 15 ) ) then outputChatBox("Yeah Time is : 12:15:15",255,255,255,true) else outputChatBox("Time is "..Hours..":"..Minutes..":"..Seconds.."",255,255,255,true) end end ) Skype : james_rod3
nxFairlywell Posted May 14, 2016 Posted May 14, 2016 -- server local prrTimes={ ["fajr"]={h=4, m=0}, ["duhr"]={h=12, m=0}, ["asr"]={h=3, m=30}, ["maghrib"]={h=5, m=25}, ["isha"]={h=7, m=15}, } -- h = ساعة الاذان , m = دقيقة الاذان function loadTime() local time=getRealTime() local h=time.hour local m=time.minute for names, times in pairs( prrTimes ) do local hours, minutes = unpack( times ) if hours == h and minutes == m then local prayer = names triggerClientEvent(root, "onPrayerTime", root, prayer, hour, minute) killTimer( timer ) setTimer( function () setTimer( function() loadTime() end, 50, 0 ) end, 1000*60*10, 1) end end end timer=setTimer( function () loadTime() end , 50, 0 ) -- client window=guiCreateWindow( ... ) label=guiCreateLabel( ... ) addEvent("onPrayerTime", true) function createPrayerWindow() if prayer == "fajr" then guiSetText( label, "حان الآن موعد أذان الفجر" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "duhr" then guiSetText( label, "حان الآن موعد أذان الظهر" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "asr" then guiSetText( label, "حان الآن موعد أذان العصر" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "maghrib" then guiSetText( label, "حان الآن موعد أذان المغرب" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "isha" then guiSetText( label, "حان الآن موعد أذان العشاء" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) end end addEventHandler("onPrayerTime", root, createPrayerWindow) Discord ID : nxFairlywell#6895
SaedAmer Posted May 14, 2016 Author Posted May 14, 2016 -- server local prrTimes={ ["fajr"]={h=4, m=0}, ["duhr"]={h=12, m=0}, ["asr"]={h=3, m=30}, ["maghrib"]={h=5, m=25}, ["isha"]={h=7, m=15}, } -- h = ساعة الاذان , m = دقيقة الاذان function loadTime() local time=getRealTime() local h=time.hour local m=time.minute for names, times in pairs( prrTimes ) do local hours, minutes = unpack( times ) if hours == h and minutes == m then local prayer = names triggerClientEvent(root, "onPrayerTime", root, prayer, hour, minute) killTimer( timer ) setTimer( function () setTimer( function() loadTime() end, 50, 0 ) end, 1000*60*10, 1) end end end timer=setTimer( function () loadTime() end , 50, 0 ) -- client window=guiCreateWindow( ... ) label=guiCreateLabel( ... ) addEvent("onPrayerTime", true) function createPrayerWindow() if prayer == "fajr" then guiSetText( label, "حان الآن موعد أذان الفجر" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "duhr" then guiSetText( label, "حان الآن موعد أذان الظهر" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "asr" then guiSetText( label, "حان الآن موعد أذان العصر" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "maghrib" then guiSetText( label, "حان الآن موعد أذان المغرب" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "isha" then guiSetText( label, "حان الآن موعد أذان العشاء" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) end end addEventHandler("onPrayerTime", root, createPrayerWindow) تمام طيب انا دلوقتي عامل لوحة تقفل الشات و تفتحو الوحة شغالة تمام بس ازاي اضيف الكود اخليه يشغل بطن 3 الي هو قفل الشات للاذان و لما يخلص الوقت المحدد يفتح بطن 4 الي هو فتح الشات للاذان صورة الوحة http://store2.up-00.com/2016-05/1463221704141.png
nxFairlywell Posted May 14, 2016 Posted May 14, 2016 مافهمتك والله انت تبي لوحة تفتح الشات وتقفله؟ Discord ID : nxFairlywell#6895
SaedAmer Posted May 14, 2016 Author Posted May 14, 2016 انا صانع لوحة تفتح الشات و تقفل شوف الصورة بس عاوز اوقات الاذا الي انت عطتهوني كود الكود الي انت ادتهوني عاوزو يشتغل علي زر قفل شات الاذان يعني لما تصير الساعة 12 يشغل بطن 3 الي هو قفل شات الاذان و يكت الي في الكود الي هو حان الان اذان الظهر فهمت ؟ #
#J2mes Posted May 14, 2016 Posted May 14, 2016 اذا تبي تقفل الشات وتفتحه استخدم setElementData getElementData Skype : james_rod3
SaedAmer Posted May 14, 2016 Author Posted May 14, 2016 حد يفهم عليه انا عامل مود قفل الشات و المود شغال بيقفل و كل شئ تمام بس انا عامل زرين 2 بطن و احد يقفل الشات تبع الاذان و التاني يفتحو كيف اضيف الكود الي فوق للزر الاول بتاع قفل الشات لللاذان ؟؟
Mostafa MohammeD Posted May 14, 2016 Posted May 14, 2016 حد يفهم عليه انا عامل مود قفل الشات و المود شغال بيقفل و كل شئ تمام بس انا عامل زرين 2 بطن و احد يقفل الشات تبع الاذان و التاني يفتحو كيف اضيف الكود الي فوق للزر الاول بتاع قفل الشات لللاذان ؟؟ استعمل الداتا مثل ما قالك #J2mes setElementData getElementData مستواي في البرمجة 20% Skype = mr_m.o.s.t.a.f.a youtube = https://www.youtube.com/channel/UCEwOQx793Uxq5wazYDi-6mQ
SaedAmer Posted May 14, 2016 Author Posted May 14, 2016 -- server local prrTimes={ ["fajr"]={h=4, m=0}, ["duhr"]={h=12, m=0}, ["asr"]={h=3, m=30}, ["maghrib"]={h=5, m=25}, ["isha"]={h=7, m=15}, } -- h = ساعة الاذان , m = دقيقة الاذان function loadTime() local time=getRealTime() local h=time.hour local m=time.minute for names, times in pairs( prrTimes ) do local hours, minutes = unpack( times ) if hours == h and minutes == m then local prayer = names triggerClientEvent(root, "onPrayerTime", root, prayer, hour, minute) killTimer( timer ) setTimer( function () setTimer( function() loadTime() end, 50, 0 ) end, 1000*60*10, 1) end end end timer=setTimer( function () loadTime() end , 50, 0 ) -- client window=guiCreateWindow( ... ) label=guiCreateLabel( ... ) addEvent("onPrayerTime", true) function createPrayerWindow() if prayer == "fajr" then guiSetText( label, "حان الآن موعد أذان الفجر" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "duhr" then guiSetText( label, "حان الآن موعد أذان الظهر" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "asr" then guiSetText( label, "حان الآن موعد أذان العصر" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "maghrib" then guiSetText( label, "حان الآن موعد أذان المغرب" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "isha" then guiSetText( label, "حان الآن موعد أذان العشاء" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) end end addEventHandler("onPrayerTime", root, createPrayerWindow) كل الي اقدر اقولو دلوقتي عاوز الكود الي فوق لما يشتغل يقفل الشات يخلي الكونسول بس هو الي يتكلم و لما تخلص المدة المحددة في المود يفتح الشات تانني
SaedAmer Posted May 15, 2016 Author Posted May 15, 2016 مساعده ## اوز الكود ده اول ما اشغل المود يشتغل + يقفل الشات -- server local prrTimes={ ["fajr"]={h=4, m=0}, ["duhr"]={h=12, m=0}, ["asr"]={h=3, m=30}, ["maghrib"]={h=5, m=25}, ["isha"]={h=7, m=15}, } -- h = ساعة الاذان , m = دقيقة الاذان function loadTime() local time=getRealTime() local h=time.hour local m=time.minute for names, times in pairs( prrTimes ) do local hours, minutes = unpack( times ) if hours == h and minutes == m then local prayer = names triggerClientEvent(root, "onPrayerTime", root, prayer, hour, minute) killTimer( timer ) setTimer( function () setTimer( function() loadTime() end, 50, 0 ) end, 1000*60*10, 1) end end end timer=setTimer( function () loadTime() end , 50, 0 ) -- client window=guiCreateWindow( ... ) label=guiCreateLabel( ... ) addEvent("onPrayerTime", true) function createPrayerWindow() if prayer == "fajr" then guiSetText( label, "حان الآن موعد أذان الفجر" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "duhr" then guiSetText( label, "حان الآن موعد أذان الظهر" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "asr" then guiSetText( label, "حان الآن موعد أذان العصر" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "maghrib" then guiSetText( label, "حان الآن موعد أذان المغرب" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) elseif prayer == "isha" then guiSetText( label, "حان الآن موعد أذان العشاء" ) guiSetVisible( window, true ) setTimer(guiSetVisible, 1000*60*5, 1, window, false) end end addEventHandler("onPrayerTime", root, createPrayerWindow)
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