-
Posts
303 -
Joined
-
Last visited
Everything posted by mouamle
-
function ToggleTimer() DayTimer = setTimer ( function() time = getRealTime() hours = time.hour - 12 hours12 = time.hour minutes = time.minute second = time.second month = time.month day = time.monthday if ( month == 5 ) and ( day == 18 ) then if ( hours12 == 7 ) or ( hours24 = 7 ) then if ( minutes == 45 ) then outputChatBox("حان الأن وقت أذان المغرب") guiSetText(GUIEditor.label[1], "1 رمضان") end end elseif ( month == 5) and ( day == 19 ) then if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 45 ) then outputChatBox("حان الأن وقت أذان المغرب") guiSetText(GUIEditor.label[1], "2 رمضان") end end end end, 1000, 0 ) end يعني زي كذا ؟ بس وقت التايمر مسوية ثانية وحدة على شان أختبر اذا المود شغال افضل شئ تخليها وقت الاذان + guiSetText(GUIEditor.label[1], "2 رمضان") ليه انت حاطتها ومافى ليبل ؟ ذا الكود كامل للي يبة واي يبي يسوي نفس الفكرة الي ببالي تعبت بية قعدت انسخ والصق واغير ارقام gx, gy = guiGetScreenSize() GUIEditor = { label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.label[1] = guiCreateLabel(gx - 50, 0, 144, 50, "رمضان", false) guiSetFont(GUIEditor.label[1], "default-bold-small") guiLabelSetColor(GUIEditor.label[1], 255, 0, 0) guiLabelSetHorizontalAlign(GUIEditor.label[1], "left", true) end ) function ToggleTimer() DayTimer = setTimer ( function() time = getRealTime() hours = time.hour - 12 hours12 = time.hour minutes = time.minute second = time.second month = time.month day = time.monthday if ( month == 5 ) and ( day == 18 ) then guiSetText(GUIEditor.label[1], "") -- 1 Day if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 45 ) then outputChatBox("") end end elseif ( month == 5) and ( day == 19 ) then guiSetText(GUIEditor.label[1], "") -- 2 Day if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 45 ) then outputChatBox("") end end elseif( month == 5 ) and ( day == 20 ) then guiSetText( GUIEditor.label[1], "" ) -- 3 Day if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 45 ) then outputChatBox("") end end elseif( month == 5 ) and ( day == 21 ) then guiSetText( GUIEditor.label[1], "" ) -- 4 Day if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 46 ) then outputChatBox("") end end elseif( month == 5 ) and ( day == 22 ) then guiSetText( GUIEditor.label[1], "" ) -- 5 Day if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 46 ) then outputChatBox("") end end elseif( month == 5 ) and ( day == 23 ) then guiSetText( GUIEditor.label[1], "" ) -- 6 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 46 ) then outputChatBox("") end end elseif( month == 5 ) and ( day == 24 ) then guiSetText( GUIEditor.label[1], "" ) -- 7 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 46 ) then outputChatBox("") end end elseif( month == 5 ) and ( day == 25 ) then guiSetText( GUIEditor.label[1], "" ) -- 8 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 46 ) then outputChatBox("") end end elseif( month == 5 ) and ( day == 26 ) then guiSetText( GUIEditor.label[1], "" ) -- 9 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 46 ) then outputChatBox("") end end elseif( month == 5 ) and ( day == 27 ) then guiSetText( GUIEditor.label[1], "" ) -- 10 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 46 ) then outputChatBox("") end end elseif( month == 5 ) and ( day == 28 ) then guiSetText( GUIEditor.label[1], "" ) -- 11 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 47 ) then outputChatBox("") end end elseif( month == 5 ) and ( day == 29 ) then guiSetText( GUIEditor.label[1], "" ) -- 12 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 47 ) then outputChatBox("") end end elseif( month == 5 ) and ( day == 30 ) then guiSetText( GUIEditor.label[1], "" ) -- 13 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 47 ) then outputChatBox("") end end elseif( month == 6 ) and ( day == 1 ) then guiSetText( GUIEditor.label[1], " " ) -- 14 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 47 ) then outputChatBox("") end end elseif( month == 6 ) and ( day == 2 ) then guiSetText( GUIEditor.label[1], "" ) -- 15 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 47 ) then outputChatBox("") end end elseif( month == 6 ) and ( day == 3 ) then guiSetText( GUIEditor.label[1], "" ) -- 16 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 47 ) then outputChatBox("") end end elseif( month == 6 ) and ( day == 4 ) then guiSetText( GUIEditor.label[1], "" ) -- 17 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 47 ) then outputChatBox("") end end elseif( month == 6 ) and ( day == 5 ) then guiSetText( GUIEditor.label[1], "" ) -- 18 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 46 ) then outputChatBox("") end end elseif( month == 6 ) and ( day == 6 ) then guiSetText( GUIEditor.label[1], "" ) -- 19 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 46 ) then outputChatBox("") end end elseif( month == 6 ) and ( day == 7 ) then guiSetText( GUIEditor.label[1], "" ) -- 20 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 46 ) then outputChatBox("") end end elseif( month == 6 ) and ( day == 8 ) then guiSetText( GUIEditor.label[1], "" ) -- 21 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 46 ) then outputChatBox("") end end elseif( month == 6 ) and ( day == 9 ) then guiSetText( GUIEditor.label[1], "" ) -- 22 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 46 ) then outputChatBox("") end end elseif( month == 6 ) and ( day == 10 ) then guiSetText( GUIEditor.label[1], "" ) -- 23 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 46 ) then outputChatBox("") end end elseif( month == 6 ) and ( day == 11 ) then guiSetText( GUIEditor.label[1], "" ) -- 24 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 46 ) then outputChatBox("") end end elseif( month == 6 ) and ( day == 12 ) then guiSetText( GUIEditor.label[1], "" ) -- 25 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 45 ) then outputChatBox("") end end elseif( month == 6 ) and ( day == 13 ) then guiSetText( GUIEditor.label[1], "" ) -- 26 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 45 ) then outputChatBox("") end end elseif( month == 6 ) and ( day == 14 ) then guiSetText( GUIEditor.label[1], "" ) -- 27 if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 44 ) then outputChatBox("") end end elseif( month == 6 ) and ( day == 15 ) then
-
function ToggleTimer() DayTimer = setTimer ( function() time = getRealTime() hours = time.hour - 12 hours12 = time.hour minutes = time.minute second = time.second month = time.month day = time.monthday if ( month == 5 ) and ( day == 18 ) then if ( hours12 == 7 ) or ( hours24 = 7 ) then if ( minutes == 45 ) then outputChatBox("حان الأن وقت أذان المغرب") guiSetText(GUIEditor.label[1], "1 رمضان") end end elseif ( month == 5) and ( day == 19 ) then if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 45 ) then outputChatBox("حان الأن وقت أذان المغرب") guiSetText(GUIEditor.label[1], "2 رمضان") end end end end, 1000, 0 ) end يعني زي كذا ؟ بس وقت التايمر مسوية ثانية وحدة على شان أختبر اذا المود شغال افضل شئ تخليها وقت الاذان + guiSetText(GUIEditor.label[1], "2 رمضان") ليه انت حاطتها ومافى ليبل ؟ موجودة الليبل بس ما حطيت الكود الكامل لأن احتاج بس ذا الجزء
-
function ToggleTimer() DayTimer = setTimer ( function() time = getRealTime() hours = time.hour - 12 hours12 = time.hour minutes = time.minute second = time.second month = time.month day = time.monthday if ( month == 5 ) and ( day == 18 ) then if ( hours12 == 7 ) or ( hours24 = 7 ) then if ( minutes == 45 ) then outputChatBox("حان الأن وقت أذان المغرب") guiSetText(GUIEditor.label[1], "1 رمضان") end end elseif ( month == 5) and ( day == 19 ) then if ( hours12 == 7 ) or ( hours24 == 7 ) then if ( minutes == 45 ) then outputChatBox("حان الأن وقت أذان المغرب") guiSetText(GUIEditor.label[1], "2 رمضان") end end end end, 1000, 0 ) end يعني زي كذا ؟ بس وقت التايمر مسوية ثانية وحدة على شان أختبر اذا المود شغال
-
في طريقة غيرها تخلي اللعبة تتحقق من الوقت ؟
-
انت فاهم فكرة الكو ؟ يجي يوم 1 رمضان يطلع بالشات يصادف اليوم 1 رمضان يجي يوم 2 رمضان يطلع في الشات يصادف اليوم 2 رمضان وهذكا فهوه اكيد راح يحقق الشرط الأول
-
كيف راح يشتغل كذا هوه لما حقق الشرط الأول راح يسوي removeEventHandler(....) كيف راح يرجع يتحقق مرة ثانية ؟
-
السلام عليكم الصراحة ما اعرف وش اسمي الموضوع بس function ram1() local time = getRealTime() local hours = time.hour local minutes = time.minute local second = time.second local month = time.month + 1 local day = time.monthday if ( month == 5 ) and ( day == 18 ) then outputChatBox("Today is : " .. day ) outputChatBox("المصادف : " .. "1 " .. "رمضان" ) Exit1() end end addEventHandler ( "onClientRender", root, ram1 ) function Exit1() removeEventHandler("onClientRender", root, ram1) end سويت ذا الكود وشغال تمام بس ابي استخدم elseif معاه بس ما اعرف كيف اظبطها لأن ب ال if الأولى راح يسوي removeEventHandler فكيف اخلية يرجع يتحقق مثلا من يوم 2 رمضان ؟
-
[Lua] #3 تحديث 1 || أنواع القيم والمتغيرات
mouamle replied to </Mr.Tn6eL>'s topic in دروس في البرمجة
^ اسف -
[Lua] #3 تحديث 1 || أنواع القيم والمتغيرات
mouamle replied to </Mr.Tn6eL>'s topic in دروس في البرمجة
print بالعربي يعني طباعة وانا استخدمها كمثال ويمديك تجرب المثال هنا http://www.lua.org/demo.html طبعا ماراح تشتغل فنكشنات ام تي اي عليها تشتغل اذا حطيتها Server Side راح يطبع الي تكتبة بالكونسل -
شكرا فهمتها تقريبا كلها
-
السلام عليكم source root getlocalplayer() theplayer الي فوق وش وضيفتهم ^ ؟ الي فهمتة من ال source انو مثلا عندك كود سيرفر وال هوه مثلا outputChatBox(......) تقدر تستخدم ال source حتى تخلي الكتابة تطلع للاعب معين مو للسيرفر كلة والباقيات ؟
-
هوة قصدة انو لما يشغل المود اللوحة تطلع من وحدها وهذا بسبب الحدث onClientResourceStart
-
Add Iraq Flag please
-
السلام عليكم سويت مود بسيط وهوه ماركر تعطي سيارة من لوحة DX المود شغال تمام بس ابي لما اللاعب ياخذ سيارة وينزل منها ويروح ياخذ سيارة ثانية تنمسح السيارة الأولى وشكرا Client Marker1 = createMarker ( MarkerX, MarkerY, MarkerZ - 1, "cylinder", 1.5, 255, 255, 0, 170 ) function HITM() if ( source == Marker1 ) then showChat(false) addEventHandler("onClientRender", root, DXS) bindKey ( "1", "up", function() triggerServerEvent("GiveCar1",getLocalPlayer()) end ) bindKey ( "2", "up", function() triggerServerEvent("GiveCar2",getLocalPlayer()) end ) bindKey ( "3", "up", function() triggerServerEvent("GiveCar3",getLocalPlayer()) end ) bindKey ( "4", "up", function() triggerServerEvent("GiveCar4",getLocalPlayer()) end ) bindKey ( "5", "up", function() triggerServerEvent("GiveCar5",getLocalPlayer()) end ) bindKey ( "6", "up", function() triggerServerEvent("GiveCar6",getLocalPlayer()) end ) bindKey ( "7", "up", function() triggerServerEvent("GiveCar7",getLocalPlayer()) end ) bindKey ( "8", "up", function() triggerServerEvent("GiveCar8",getLocalPlayer()) end ) bindKey ( "9", "up", function() triggerServerEvent("GiveCar9",getLocalPlayer()) end ) end end addEventHandler("onClientMarkerHit", root, HITM) function LEAVEM() removeEventHandler("onClientRender", root, DXS) showChat(true) unbindKey ( "1", "up", function() outputChatBox("XDSADS") end ) unbindKey ( "2", "up", function() triggerServerEvent("GiveCar2",getLocalPlayer()) end ) unbindKey ( "3", "up", function() triggerServerEvent("GiveCar3",getLocalPlayer()) end ) unbindKey ( "4", "up", function() triggerServerEvent("GiveCar4",getLocalPlayer()) end ) unbindKey ( "5", "up", function() triggerServerEvent("GiveCar5",getLocalPlayer()) end ) unbindKey ( "6", "up", function() triggerServerEvent("GiveCar6",getLocalPlayer()) end ) unbindKey ( "7", "up", function() triggerServerEvent("GiveCar7",getLocalPlayer()) end ) unbindKey ( "8", "up", function() triggerServerEvent("GiveCar8",getLocalPlayer()) end ) unbindKey ( "9", "up", function() triggerServerEvent("GiveCar9",getLocalPlayer()) end ) end addEventHandler("onClientMarkerLeave", root, LEAVEM) Server addEvent("GiveCar1",true) addEventHandler("GiveCar1",root, function() Car1 = createVehicle ( CarID, CarX, CarY, CarZ ) warpPedIntoVehicle ( source , Car1 ) setVehicleColor( Car1, 255, 0, 0 ) end ) addEvent("GiveCar2",true) addEventHandler("GiveCar2",root, function() Car2 = createVehicle ( CarID, CarX, CarY, CarZ ) warpPedIntoVehicle ( source , Car2 ) setVehicleColor( Car2, 0, 255, 0 ) end ) addEvent("GiveCar3",true) addEventHandler("GiveCar3",root, function() Car3 = createVehicle ( CarID, CarX, CarY, CarZ ) warpPedIntoVehicle ( source , Car3 ) setVehicleColor( Car3, 0, 0, 255 ) end ) addEvent("GiveCar4",true) addEventHandler("GiveCar4",root, function() Car4 = createVehicle ( CarID, CarX, CarY, CarZ ) warpPedIntoVehicle ( source , Car4 ) setVehicleColor( Car4, 255, 255, 0 ) end ) addEvent("GiveCar5",true) addEventHandler("GiveCar5",root, function() Car5 = createVehicle ( CarID, CarX, CarY, CarZ ) warpPedIntoVehicle ( source , Car5 ) setVehicleColor( Car5, 255, 0, 255 ) end ) addEvent("GiveCar6",true) addEventHandler("GiveCar6",root, function() Car6 = createVehicle ( CarID, CarX, CarY, CarZ ) warpPedIntoVehicle ( source , Car6 ) setVehicleColor( Car6, 0, 255, 255 ) end ) addEvent("GiveCar7",true) addEventHandler("GiveCar7",root, function() Car7 = createVehicle ( CarID, CarX, CarY, CarZ ) warpPedIntoVehicle ( source , Car7 ) setVehicleColor( Car7, 255, 255, 255 ) end ) addEvent("GiveCar8",true) addEventHandler("GiveCar8",root, function() Car8 = createVehicle ( CarID, CarX, CarY, CarZ ) warpPedIntoVehicle ( source , Car8 ) setVehicleColor( Car8, 0, 0, 0 ) end ) addEvent("GiveCar9",true) addEventHandler("GiveCar9",root, function() Car9 = createVehicle ( CarID, CarX, CarY, CarZ ) warpPedIntoVehicle ( source , Car9 ) setVehicleColor( Car9, math.random(255), math.random(255), math.random(255) ) end )
-
تطلب مودات ؟ شوف اسم المنتدى
-
-- Functions Server Side -- فنكشنات سيرفر setTimer() -- يسوي مؤقت outputChatBox() -- يطلع كلام بالشات
-
واللوحة الأصلية تبقة بدون مؤشر
-
[Lua] #3 تحديث 1 || أنواع القيم والمتغيرات
mouamle replied to </Mr.Tn6eL>'s topic in دروس في البرمجة
تقدر عادي local تحط المتغير بدون مثل Client 1 x, y, z = getElementPosition( TheCar ) Client 2 outputChatBox (x, y, z) شكرا