Anis Posted March 4, 2016 Share Posted March 4, 2016 (edited) السلام عليكم كيفكم انشء الله بخير اليوم ابي افعل مهمة انا صممت انا واخي الماب وكل شئ بس البرمجة يود شئ ماعرفتوا ارجوا المساعد ا addEventHandler("onPlayerChat",root, function ( msg ) if msg == "مهمة" then spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) giveWeapon(source,46) end end ) marker = createMarker(3724.6000976563,-385.5,1.6000000238419,"cylinder",4,255,255,255,255) addEventHandler("onMarkerHit", root, function (player) if source == marker then if getElementType(player) == "player" and not isPedInVehicle(player) then givePlayerMoney(player,50000) -- killPed(player) outputChatBox(" #0099ff فاز بمهم, وحصل على 50000"..getPlayerName(player).." اللاعب ",root,255,255,255,true) end end end ) ابي المهم تبدا كل 5 دقائق انا استعملت التايمر بس مصلح Edited March 10, 2016 by Guest Link to comment
[DONE]* Posted March 5, 2016 Share Posted March 5, 2016 السلام عليكمكيفكم انشء الله بخير اليوم ابي افعل مهمة انا صممت انا واخي الماب وكل شئ بس البرمجة يود شئ ماعرفتوا ارجوا المساعد ا addEventHandler("onPlayerChat",root, function ( msg ) if msg == "مهمة" then spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) giveWeapon(source,46) end end ) marker = createMarker(3724.6000976563,-385.5,1.6000000238419,"cylinder",4,255,255,255,255) addEventHandler("onMarkerHit", root, function (player) if source == marker then if getElementType(player) == "player" and not isPedInVehicle(player) then givePlayerMoney(player,50000) -- killPed(player) outputChatBox(" #0099ff فاز بمهم, وحصل على 50000"..getPlayerName(player).." اللاعب ",root,255,255,255,true) end end end ) ابي المهم تبدا كل 5 دقائق انا استعملت التايمر بس مصلح سوي تايمر كل 5 دقائق يصنع الماركر .. ويحذف الي قبلة setTimer isElement destroyElement Link to comment
#Soking Posted March 5, 2016 Share Posted March 5, 2016 addEventHandler("onPlayerChat",root, function ( msg ) if ( msg == 'مهمة' ) then spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) giveWeapon(source,46) end end ) setTimer( function ( ) if isElement(marker) then destroyElement(marker) outputChatBox(' The Mission Was Stat < للذهاب قم بكتابة مهمة في الشات العام ',root,255,255,255,true) marker = createMarker(3724.6000976563,-385.5,1.6000000238419,"cylinder",4,255,255,255,255) end end,50000,0) addEventHandler("onMarkerHit", marker, function (player) if isElement(marker) then destroyElement(marker) if getElementType(player) == "player" and not isPedInVehicle(player) then givePlayerMoney(player,50000) -- killPed(player) outputChatBox(" #0099ff فاز بمهم, وحصل على 50000"..getPlayerName(player).." اللاعب ",root,255,255,255,true) end end end ) مش مجربه + هيك تقصد والا وش انا مش فاهم وش تبيبالزبط Link to comment
Abdul KariM Posted March 5, 2016 Share Posted March 5, 2016 مايحتاج تحذف الماركر سوي داتا للماركر وقيمتها فولس وتأكد ان المهمة بدأت وسوي داتا حقت الماركر ترو وبعد 5 دقايق سووي داتا حقت الماركر فولس حاول وبساعدك فيها وتقدر تسويها عن طريق الجداول بعد Link to comment
Anis Posted March 5, 2016 Author Share Posted March 5, 2016 مايحتاج تحذف الماركر سوي داتا للماركر وقيمتها فولس وتأكد ان المهمة بدأت وسوي داتا حقت الماركر ترو وبعد 5 دقايق سووي داتا حقت الماركر فولس حاول وبساعدك فيها وتقدر تسويها عن طريق الجداول بعد شكرا + تحت التجربة Link to comment
Anis Posted March 5, 2016 Author Share Posted March 5, 2016 السلام عليكمكيفكم انشء الله بخير اليوم ابي افعل مهمة انا صممت انا واخي الماب وكل شئ بس البرمجة يود شئ ماعرفتوا ارجوا المساعد ا addEventHandler("onPlayerChat",root, function ( msg ) if msg == "مهمة" then spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) giveWeapon(source,46) end end ) ممكن مثال marker = createMarker(3724.6000976563,-385.5,1.6000000238419,"cylinder",4,255,255,255,255) addEventHandler("onMarkerHit", root, function (player) if source == marker then if getElementType(player) == "player" and not isPedInVehicle(player) then givePlayerMoney(player,50000) -- killPed(player) outputChatBox(" #0099ff فاز بمهم, وحصل على 50000"..getPlayerName(player).." اللاعب ",root,255,255,255,true) end end end ) ابي المهم تبدا كل 5 دقائق انا استعملت التايمر بس مصلح سوي تايمر كل 5 دقائق يصنع الماركر .. ويحذف الي قبلة setTimer isElement destroyElement Link to comment
Abdul KariM Posted March 5, 2016 Share Posted March 5, 2016 شف الماركر خليه لاتحذفه ولاتقربله سوي تحت كود انشاء الماركر setElementData(marker,"Op_M",false) كذا الماركر صار مقفل الحين انت سوي تايمر وبعد 5 دقايق يفتح الماركر كيف ؟ setTimer isTimer killTimer setElementData(marker,"Op_M",true) -- عشان يقدر يدخل الماركر طيب الحين اول مايكتب مهمة نتحقق ان الداتا موب ترو ونسوي ريتيورن if getElementData(marker,"Op_M") == false then return outputChatBox("لم تبدا المهمة",source) end واذا تبي اول مايخش الماركر تحقق ان الداتا تساوي ترو if getElementData(marker,"Op_M") == true then وبس تنتهي المهمة سوي للماركر setElementData(marker,"Op_M",false) وبسس Link to comment
Mr.R Posted March 6, 2016 Share Posted March 6, 2016 local marker = createMarker ( 3724.6000976563, -385.5, 1.6000000238419, "cylinder", 4, 255, 255, 255, 255 ) setElementData ( marker, "OpenOrClose", false ) function ( ) if ( isTimer ( OpenMarker ) ) then killTimer ( OpenMarker ) end OpenMarker = setTimer ( function ( ) setElementData ( Marker, "OpenOrClose", true ) outputChatBox ( "* بدأت المهمه", source, 255, 255, 255, true ) end end, 50000, 0 ) كود التايمر .. لم تتم التجربه Link to comment
YourMind Posted March 6, 2016 Share Posted March 6, 2016 غير مجرب local marker = createMarker ( 3724.6000976563, -385.5, 1.6000000238419, "cylinder", 4, 255, 255, 255, 255 ) function startMission( ) startTimer = setTimer(function() outputChatBox ("*بدأت المهمة",root,5,255,5) removeElementData (resourceRoot,"MissionNoRep") end,120000,1) checkTimer = setTimer (function() local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* المهمة علي وشك البدأ, ستبدأ بعد دقيقتين",root,5,255,5) setElementData (resourceRoot,"MissionNoRep",true) killTimer (checkTimer) end end,50,0) end startMission () -- بدأ المهمة -- هنا بدل اسمك برقم الثواني بالميلي ثانية -- يعني اختار عدد الثواني لبدأ المهمة كل مرة startMissionRepeat = setTimer (startMission,Mr.MtFcH,0) -- تكرار بدأ المهمة عشان ماتشتغلش مرة واحدة بس addEventHandler("onPlayerChat",root, function ( msg ) if msg == "مهمة" then if isTimer (startTimer) then local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* تم نقلك للمهمة",source,5,255,5) spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) giveWeapon(source,46) else return end else return outputChatBox ("* المهمة لم تبدأ بعد",source,255,5,5) end end end ) addEventHandler("onMarkerHit", root, function (player) if source == marker then if getElementType(player) == "player" and not isPedInVehicle(player) then if not getElementData (resourceRoot,"MissionNoRep") then if not isTimer (startTimer) then givePlayerMoney(player,50000) -- killPed(player) setElementData (resourceRoot,"MissionNoRep",true) outputChatBox(" #0099ff فاز بمهم, وحصل على 50000"..getPlayerName(player).." اللاعب ",root,255,255,255,true) else outputChatBox ("* تم أخذ الجائزة من قبل",player,255,5,5) killPed (player) end else outputChatBox ("* المهمة لم تبدأ بعد",player,255,5,5) end end end end ) Link to comment
Anis Posted March 7, 2016 Author Share Posted March 7, 2016 شف الماركر خليه لاتحذفه ولاتقربله سوي تحت كود انشاء الماركر setElementData(marker,"Op_M",false) كذا الماركر صار مقفل الحين انت سوي تايمر وبعد 5 دقايق يفتح الماركر كيف ؟ setTimer isTimer killTimer setElementData(marker,"Op_M",true) -- عشان يقدر يدخل الماركر ماابي اسوي ماركر ولاشئ ابي زي مهمة الديربي يعني اذا فهمتني طيب الحين اول مايكتب مهمة نتحقق ان الداتا موب ترو ونسوي ريتيورن if getElementData(marker,"Op_M") == false then return outputChatBox("لم تبدا المهمة",source) end واذا تبي اول مايخش الماركر تحقق ان الداتا تساوي ترو if getElementData(marker,"Op_M") == true then وبس تنتهي المهمة سوي للماركر setElementData(marker,"Op_M",false) وبسس Link to comment
Abdul KariM Posted March 7, 2016 Share Posted March 7, 2016 ياليت لو تقتبس شي تكتب تحته لي ساعة ادور وش معدل بالرد + نفس الشي سوي داتا للمهمة واعتبر المهمة ماركر ويوم يكتب الاعب مهمة مثلا نتحقق ان الداتا موب ترو ونسوي ريتيورن مافرقت شي , حط بكود المهمة getElementData -- if ... ~= false Link to comment
Anis Posted March 8, 2016 Author Share Posted March 8, 2016 غير مجرب local marker = createMarker ( 3724.6000976563, -385.5, 1.6000000238419, "cylinder", 4, 255, 255, 255, 255 ) function startMission( ) startTimer = setTimer(function() outputChatBox ("*بدأت المهمة",root,5,255,5) removeElementData (resourceRoot,"MissionNoRep") end,120000,1) checkTimer = setTimer (function() local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* المهمة علي وشك البدأ, ستبدأ بعد دقيقتين",root,5,255,5) setElementData (resourceRoot,"MissionNoRep",true) killTimer (checkTimer) end end,50,0) end startMission () -- بدأ المهمة -- هنا بدل اسمك برقم الثواني بالميلي ثانية -- يعني اختار عدد الثواني لبدأ المهمة كل مرة startMissionRepeat = setTimer (startMission,Mr.MtFcH,0) -- تكرار بدأ المهمة عشان ماتشتغلش مرة واحدة بس addEventHandler("onPlayerChat",root, function ( msg ) if msg == "مهمة" then if isTimer (startTimer) then local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* تم نقلك للمهمة",source,5,255,5) spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) giveWeapon(source,46) else return end else return outputChatBox ("* المهمة لم تبدأ بعد",source,255,5,5) end end end ) addEventHandler("onMarkerHit", root, function (player) if source == marker then if getElementType(player) == "player" and not isPedInVehicle(player) then if not getElementData (resourceRoot,"MissionNoRep") then if not isTimer (startTimer) then givePlayerMoney(player,50000) -- killPed(player) setElementData (resourceRoot,"MissionNoRep",true) outputChatBox(" #0099ff فاز بمهم, وحصل على 50000"..getPlayerName(player).." اللاعب ",root,255,255,255,true) else outputChatBox ("* تم أخذ الجائزة من قبل",player,255,5,5) killPed (player) end else outputChatBox ("* المهمة لم تبدأ بعد",player,255,5,5) end end end end ) يوجد خطا في كودك انظر اذا جرتوا راح يعيد يقول ستبدا المهمة ولن يقول بدات المهمة وانا اكتب مهمة بدخل Link to comment
Anis Posted March 8, 2016 Author Share Posted March 8, 2016 غير مجرب local marker = createMarker ( 3724.6000976563, -385.5, 1.6000000238419, "cylinder", 4, 255, 255, 255, 255 ) function startMission( ) startTimer = setTimer(function() outputChatBox ("*بدأت المهمة",root,5,255,5) removeElementData (resourceRoot,"MissionNoRep") end,120000,1) checkTimer = setTimer (function() local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* المهمة علي وشك البدأ, ستبدأ بعد دقيقتين",root,5,255,5) setElementData (resourceRoot,"MissionNoRep",true) killTimer (checkTimer) end end,50,0) end startMission () -- بدأ المهمة -- هنا بدل اسمك برقم الثواني بالميلي ثانية -- يعني اختار عدد الثواني لبدأ المهمة كل مرة startMissionRepeat = setTimer (startMission,Mr.MtFcH,0) -- تكرار بدأ المهمة عشان ماتشتغلش مرة واحدة بس addEventHandler("onPlayerChat",root, function ( msg ) if msg == "مهمة" then if isTimer (startTimer) then local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* تم نقلك للمهمة",source,5,255,5) spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) giveWeapon(source,46) else return end else return outputChatBox ("* المهمة لم تبدأ بعد",source,255,5,5) end end end ) addEventHandler("onMarkerHit", root, function (player) if source == marker then if getElementType(player) == "player" and not isPedInVehicle(player) then if not getElementData (resourceRoot,"MissionNoRep") then if not isTimer (startTimer) then givePlayerMoney(player,50000) -- killPed(player) setElementData (resourceRoot,"MissionNoRep",true) outputChatBox(" #0099ff فاز بمهم, وحصل على 50000"..getPlayerName(player).." اللاعب ",root,255,255,255,true) else outputChatBox ("* تم أخذ الجائزة من قبل",player,255,5,5) killPed (player) end else outputChatBox ("* المهمة لم تبدأ بعد",player,255,5,5) end end end end ) يوجد خطا في كودك انظر اذا جرتوا راح يعيد يقول ستبدا المهمة ولن يقول بدات المهمة وانا اكتب مهمة بدخل ياجماعة نفترض انا المهمة ديربي كيف ابرمجها ؟ Link to comment
Abdul KariM Posted March 8, 2016 Share Posted March 8, 2016 ياليت لو تقتبس شي تكتب تحته لي ساعة ادور وش معدل بالرد + نفس الشي سوي داتا للمهمة واعتبر المهمة ماركر ويوم يكتب الاعب مهمة مثلا نتحقق ان الداتا موب ترو ونسوي ريتيورن مافرقت شي , حط بكود المهمة getElementData -- if ... ~= false Link to comment
Anis Posted March 8, 2016 Author Share Posted March 8, 2016 ياليت لو تقتبس شي تكتب تحته لي ساعة ادور وش معدل بالرد + نفس الشي سوي داتا للمهمة واعتبر المهمة ماركر ويوم يكتب الاعب مهمة مثلا نتحقق ان الداتا موب ترو ونسوي ريتيورن مافرقت شي , حط بكود المهمة getElementData -- if ... ~= false ممكن مثال Link to comment
Ja[B]er[X]Pro Posted March 8, 2016 Share Posted March 8, 2016 لايوجد حتى رد اف بالاول تسوي ماب بعالم وهمي انت تحدده وعند كتابة الكلمة للانتقال ينتقل الاعب للماب ويتم اعطائه سيارة وسوي لوب لكل الاعبين بالعالم الوهمي اي لاعب بدون سيارة يقتل بعدها سوي عند بدأ الديربي يسوي لوب لكل الاعبين ان كان واحد يقتله ويخرج بالشات كلام ان لا يتوفر لاعبين وان كان فوق ال1 سوي حدث عند موت لاعب بالديربي يسوي لوب لكل الاعبين ان كان العدد 1 يعطيه الفلوس ويقتله وان كان اكتر يكمل Link to comment
Anis Posted March 8, 2016 Author Share Posted March 8, 2016 ياليت لو تقتبس شي تكتب تحته لي ساعة ادور وش معدل بالرد + نفس الشي سوي داتا للمهمة واعتبر المهمة ماركر ويوم يكتب الاعب مهمة مثلا نتحقق ان الداتا موب ترو ونسوي ريتيورن مافرقت شي , حط بكود المهمة getElementData -- if ... ~= false ممكن مثال Link to comment
Abdul KariM Posted March 8, 2016 Share Posted March 8, 2016 ياليت لو تقتبس شي تكتب تحته لي ساعة ادور وش معدل بالرد + نفس الشي سوي داتا للمهمة واعتبر المهمة ماركر ويوم يكتب الاعب مهمة مثلا نتحقق ان الداتا موب ترو ونسوي ريتيورن مافرقت شي , حط بكود المهمة getElementData -- if ... ~= false ممكن مثال معطيك امثلة بردي السابق Link to comment
Anis Posted March 9, 2016 Author Share Posted March 9, 2016 ياليت لو تقتبس شي تكتب تحته لي ساعة ادور وش معدل بالرد + نفس الشي سوي داتا للمهمة واعتبر المهمة ماركر ويوم يكتب الاعب مهمة مثلا نتحقق ان الداتا موب ترو ونسوي ريتيورن مافرقت شي , حط بكود المهمة getElementData -- if ... ~= false اخي انا معرفت كيف استخدم الفكنش ممكن مساعد Link to comment
YourMind Posted March 9, 2016 Share Posted March 9, 2016 غير مجرب local marker = createMarker ( 3724.6000976563, -385.5, 1.6000000238419, "cylinder", 4, 255, 255, 255, 255 ) function startMission( ) startTimer = setTimer(function() outputChatBox ("*بدأت المهمة",root,5,255,5) removeElementData (resourceRoot,"MissionNoRep") end,120000,1) checkTimer = setTimer (function() local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* المهمة علي وشك البدأ, ستبدأ بعد دقيقتين",root,5,255,5) setElementData (resourceRoot,"MissionNoRep",true) killTimer (checkTimer) end end,50,0) end startMission () -- بدأ المهمة -- هنا بدل اسمك برقم الثواني بالميلي ثانية -- يعني اختار عدد الثواني لبدأ المهمة كل مرة startMissionRepeat = setTimer (startMission,Mr.MtFcH,0) -- تكرار بدأ المهمة عشان ماتشتغلش مرة واحدة بس addEventHandler("onPlayerChat",root, function ( msg ) if msg == "مهمة" then if isTimer (startTimer) then local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* تم نقلك للمهمة",source,5,255,5) spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) giveWeapon(source,46) else return end else return outputChatBox ("* المهمة لم تبدأ بعد",source,255,5,5) end end end ) addEventHandler("onMarkerHit", root, function (player) if source == marker then if getElementType(player) == "player" and not isPedInVehicle(player) then if not getElementData (resourceRoot,"MissionNoRep") then if not isTimer (startTimer) then givePlayerMoney(player,50000) -- killPed(player) setElementData (resourceRoot,"MissionNoRep",true) outputChatBox(" #0099ff فاز بمهم, وحصل على 50000"..getPlayerName(player).." اللاعب ",root,255,255,255,true) else outputChatBox ("* تم أخذ الجائزة من قبل",player,255,5,5) killPed (player) end else outputChatBox ("* المهمة لم تبدأ بعد",player,255,5,5) end end end end ) يوجد خطا في كودك انظر اذا جرتوا راح يعيد يقول ستبدا المهمة ولن يقول بدات المهمة وانا اكتب مهمة بدخل جربت بنفسي و مفيش مشاكل و بدون تعديل علي الاكواد الفكرة هي يتاح ليك الدخول قبل بدأ المهمة بدقيقتين جميل ؟ بعد انتهاء الدقيقتين مش هاتقدر تدخل المهمة غير لما تبدأ تاني و بما انك عايزها ديربي تفضل missionPlayer = {} local marker = createMarker ( 3724.6000976563, -385.5, 1.6000000238419, "cylinder", 4, 255, 255, 255, 255 ) local Pcount = 0 function startMission( ) startTimer = setTimer(function() outputChatBox ("*بدأت المهمة",root,5,255,5) removeElementData (resourceRoot,"MissionNoRep") end,120000,1) checkTimer = setTimer (function() local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* المهمة علي وشك البدأ, ستبدأ بعد دقيقتين",root,5,255,5) setElementData (resourceRoot,"MissionNoRep",true) killTimer (checkTimer) Pcount = 0 for player , i in pairs (missionPlayer) do missionPlayer[player] = nil end for i , player in ipairs (getElementsByType ("player")) do if getElementData (player,"PcountBugFix") then removeElementData (player,"PcountBugFix") end end end end,50,0) end function vv(plr) if missionPlayer [plr] then missionPlayer = nil end end addEventHandler ("onPlayerWasted",root,vv) addEventHandler ("onPlayerQuit",root,vv) startMission () startMissionRepeat = setTimer (startMission,300000,0)-- هنا المهمة تبدأ كل 5 دقائق waterTimer = {} car = {} addEventHandler("onPlayerChat",root, function ( msg ) i = source if msg == "مهمة" then if not missionPlayer[source] then if isTimer (startTimer) then local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* تم نقلك للمهمة",source,5,255,5) spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) if isElement (car[source]) then destroyElement (car[source]) end giveWeapon(source,46) local x,y,z = getElementPosition (source) car[source] = createVehicle (411,x,y,z) Pcount = Pcount + 1 addEventHandler ("onPlayerWasted",i, function () if not getElementData (i,"PcountBugFix") then Pcount = Pcount - 1 setElementData (i,"PcountBugFix",true) end end ) addEventHandler ("onPlayerQuit",i, function () if not getElementData (i,"PcountBugFix") then Pcount = Pcount - 1 setElementData (i,"PcountBugFix",true) end end ) if isTimer (waterTimer[i]) then killTimer (waterTimer[i]) end waterTimer[i] = setTimer(function () if isPedInWater (i) and isPedInVehicle (i) and missionPlayer [i] then killPed (i) missionPlayer [i] = nil killTimer (waterTimer[i]) end end,50,0) else return end else return outputChatBox ("* المهمة لم تبدأ بعد",source,255,5,5) end else return outputChatBox ("* انت في المهمة بالفعل",source,255,5,5) end end end ) function kk ( thePlayer) if missionPlayer [thePlayer] then cancelEvent() outputChatBox ( "*لا تستطيع الخروج من السيارة في الديربي", thePlayer ,255,5,5) end end addEventHandler ( "onVehicleStartExit", getRootElement(), kk ) addEventHandler("onMarkerHit", root, function (player) if source == marker then if getElementType(player) == "player" and isPedInVehicle(player) and missionPlayer[player] and Pcount == 1 then if not getElementData (resourceRoot,"MissionNoRep") then if not isTimer (startTimer) then givePlayerMoney(player,50000) -- setElementData (resourceRoot,"MissionNoRep",true) outputChatBox(" #0099ff فاز بمهم, وحصل على 50000"..getPlayerName(player).." اللاعب ",root,255,255,255,true) for k , i in pairs (missionPlayer) do missionPlayer[k] = nil killPed (k) end if isElement (car[player]) then destroyElement (car[player]) end else outputChatBox ("* المهمة لم تبدأ بعد",player,255,5,5) killPed (player) missionPlayer[player] = nil if isElement (car[player]) then destroyElement (car[player]) end end else outputChatBox ("* تم آخذ الجائزة من قبل",player,255,5,5) killPed (player) missionPlayer[player] = nil if isElement (car[player]) then destroyElement (car[player]) end end end end end ) غير مجرب و اي خطأ او مشكلة كلمني Link to comment
Anis Posted March 9, 2016 Author Share Posted March 9, 2016 غير مجرب local marker = createMarker ( 3724.6000976563, -385.5, 1.6000000238419, "cylinder", 4, 255, 255, 255, 255 ) function startMission( ) startTimer = setTimer(function() outputChatBox ("*بدأت المهمة",root,5,255,5) removeElementData (resourceRoot,"MissionNoRep") end,120000,1) checkTimer = setTimer (function() local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* المهمة علي وشك البدأ, ستبدأ بعد دقيقتين",root,5,255,5) setElementData (resourceRoot,"MissionNoRep",true) killTimer (checkTimer) end end,50,0) end startMission () -- بدأ المهمة -- هنا بدل اسمك برقم الثواني بالميلي ثانية -- يعني اختار عدد الثواني لبدأ المهمة كل مرة startMissionRepeat = setTimer (startMission,Mr.MtFcH,0) -- تكرار بدأ المهمة عشان ماتشتغلش مرة واحدة بس addEventHandler("onPlayerChat",root, function ( msg ) if msg == "مهمة" then if isTimer (startTimer) then local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* تم نقلك للمهمة",source,5,255,5) spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) giveWeapon(source,46) else return end else return outputChatBox ("* المهمة لم تبدأ بعد",source,255,5,5) end end end ) addEventHandler("onMarkerHit", root, function (player) if source == marker then if getElementType(player) == "player" and not isPedInVehicle(player) then if not getElementData (resourceRoot,"MissionNoRep") then if not isTimer (startTimer) then givePlayerMoney(player,50000) -- killPed(player) setElementData (resourceRoot,"MissionNoRep",true) outputChatBox(" #0099ff فاز بمهم, وحصل على 50000"..getPlayerName(player).." اللاعب ",root,255,255,255,true) else outputChatBox ("* تم أخذ الجائزة من قبل",player,255,5,5) killPed (player) end else outputChatBox ("* المهمة لم تبدأ بعد",player,255,5,5) end end end end ) يوجد خطا في كودك انظر اذا جرتوا راح يعيد يقول ستبدا المهمة ولن يقول بدات المهمة وانا اكتب مهمة بدخل جربت بنفسي و مفيش مشاكل و بدون تعديل علي الاكواد الفكرة هي يتاح ليك الدخول قبل بدأ المهمة بدقيقتين جميل ؟ بعد انتهاء الدقيقتين مش هاتقدر تدخل المهمة غير لما تبدأ تاني و بما انك عايزها ديربي تفضل missionPlayer = {} local marker = createMarker ( 3724.6000976563, -385.5, 1.6000000238419, "cylinder", 4, 255, 255, 255, 255 ) local Pcount = 0 function startMission( ) startTimer = setTimer(function() outputChatBox ("*بدأت المهمة",root,5,255,5) removeElementData (resourceRoot,"MissionNoRep") end,120000,1) checkTimer = setTimer (function() local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* المهمة علي وشك البدأ, ستبدأ بعد دقيقتين",root,5,255,5) setElementData (resourceRoot,"MissionNoRep",true) killTimer (checkTimer) Pcount = 0 for player , i in pairs (missionPlayer) do missionPlayer[player] = nil end for i , player in ipairs (getElementsByType ("player")) do if getElementData (player,"PcountBugFix") then removeElementData (player,"PcountBugFix") end end end end,50,0) end function vv(plr) if missionPlayer [plr] then missionPlayer = nil end end addEventHandler ("onPlayerWasted",root,vv) addEventHandler ("onPlayerQuit",root,vv) startMission () startMissionRepeat = setTimer (startMission,300000,0)-- هنا المهمة تبدأ كل 5 دقائق waterTimer = {} car = {} addEventHandler("onPlayerChat",root, function ( msg ) i = source if msg == "مهمة" then if not missionPlayer[source] then if isTimer (startTimer) then local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* تم نقلك للمهمة",source,5,255,5) spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) if isElement (car[source]) then destroyElement (car[source]) end giveWeapon(source,46) local x,y,z = getElementPosition (source) car[source] = createVehicle (411,x,y,z) Pcount = Pcount + 1 addEventHandler ("onPlayerWasted",i, function () if not getElementData (i,"PcountBugFix") then Pcount = Pcount - 1 setElementData (i,"PcountBugFix",true) end end ) addEventHandler ("onPlayerQuit",i, function () if not getElementData (i,"PcountBugFix") then Pcount = Pcount - 1 setElementData (i,"PcountBugFix",true) end end ) if isTimer (waterTimer[i]) then killTimer (waterTimer[i]) end waterTimer[i] = setTimer(function () if isPedInWater (i) and isPedInVehicle (i) and missionPlayer [i] then killPed (i) missionPlayer [i] = nil killTimer (waterTimer[i]) end end,50,0) else return end else return outputChatBox ("* المهمة لم تبدأ بعد",source,255,5,5) end else return outputChatBox ("* انت في المهمة بالفعل",source,255,5,5) end end end ) function kk ( thePlayer) if missionPlayer [thePlayer] then cancelEvent() outputChatBox ( "*لا تستطيع الخروج من السيارة في الديربي", thePlayer ,255,5,5) end end addEventHandler ( "onVehicleStartExit", getRootElement(), kk ) addEventHandler("onMarkerHit", root, function (player) if source == marker then if getElementType(player) == "player" and isPedInVehicle(player) and missionPlayer[player] and Pcount == 1 then if not getElementData (resourceRoot,"MissionNoRep") then if not isTimer (startTimer) then givePlayerMoney(player,50000) -- setElementData (resourceRoot,"MissionNoRep",true) outputChatBox(" #0099ff فاز بمهم, وحصل على 50000"..getPlayerName(player).." اللاعب ",root,255,255,255,true) for k , i in pairs (missionPlayer) do missionPlayer[k] = nil killPed (k) end if isElement (car[player]) then destroyElement (car[player]) end else outputChatBox ("* المهمة لم تبدأ بعد",player,255,5,5) killPed (player) missionPlayer[player] = nil if isElement (car[player]) then destroyElement (car[player]) end end else outputChatBox ("* تم آخذ الجائزة من قبل",player,255,5,5) killPed (player) missionPlayer[player] = nil if isElement (car[player]) then destroyElement (car[player]) end end end end end ) غير مجرب و اي خطأ او مشكلة كلمني شكرا لك اخي تحت التجربة بعد فتح اللعبة Link to comment
Anis Posted March 9, 2016 Author Share Posted March 9, 2016 غير مجرب local marker = createMarker ( 3724.6000976563, -385.5, 1.6000000238419, "cylinder", 4, 255, 255, 255, 255 ) function startMission( ) startTimer = setTimer(function() outputChatBox ("*بدأت المهمة",root,5,255,5) removeElementData (resourceRoot,"MissionNoRep") end,120000,1) checkTimer = setTimer (function() local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* المهمة علي وشك البدأ, ستبدأ بعد دقيقتين",root,5,255,5) setElementData (resourceRoot,"MissionNoRep",true) killTimer (checkTimer) ضض في مشكلة الماركر عندما المسوا مايحدث شئ حتى ولوا بدا بس مو مشكلة احلها سهلة end end,50,0) end startMission () -- بدأ المهمة -- هنا بدل اسمك برقم الثواني بالميلي ثانية -- يعني اختار عدد الثواني لبدأ المهمة كل مرة startMissionRepeat = setTimer (startMission,Mr.MtFcH,0) -- تكرار بدأ المهمة عشان ماتشتغلش مرة واحدة بس addEventHandler("onPlayerChat",root, function ( msg ) if msg == "مهمة" then if isTimer (startTimer) then local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* تم نقلك للمهمة",source,5,255,5) spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) giveWeapon(source,46) else return end else return outputChatBox ("* المهمة لم تبدأ بعد",source,255,5,5) end end end ) addEventHandler("onMarkerHit", root, function (player) if source == marker then if getElementType(player) == "player" and not isPedInVehicle(player) then if not getElementData (resourceRoot,"MissionNoRep") then if not isTimer (startTimer) then givePlayerMoney(player,50000) -- killPed(player) setElementData (resourceRoot,"MissionNoRep",true) outputChatBox(" #0099ff فاز بمهم, وحصل على 50000"..getPlayerName(player).." اللاعب ",root,255,255,255,true) else outputChatBox ("* تم أخذ الجائزة من قبل",player,255,5,5) killPed (player) end else outputChatBox ("* المهمة لم تبدأ بعد",player,255,5,5) end end end end ) يوجد خطا في كودك انظر اذا جرتوا راح يعيد يقول ستبدا المهمة ولن يقول بدات المهمة وانا اكتب مهمة بدخل جربت بنفسي و مفيش مشاكل و بدون تعديل علي الاكواد الفكرة هي يتاح ليك الدخول قبل بدأ المهمة بدقيقتين جميل ؟ بعد انتهاء الدقيقتين مش هاتقدر تدخل المهمة غير لما تبدأ تاني و بما انك عايزها ديربي تفضل missionPlayer = {} local marker = createMarker ( 3724.6000976563, -385.5, 1.6000000238419, "cylinder", 4, 255, 255, 255, 255 ) local Pcount = 0 function startMission( ) startTimer = setTimer(function() outputChatBox ("*بدأت المهمة",root,5,255,5) removeElementData (resourceRoot,"MissionNoRep") end,120000,1) checkTimer = setTimer (function() local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* المهمة علي وشك البدأ, ستبدأ بعد دقيقتين",root,5,255,5) setElementData (resourceRoot,"MissionNoRep",true) killTimer (checkTimer) Pcount = 0 for player , i in pairs (missionPlayer) do missionPlayer[player] = nil end for i , player in ipairs (getElementsByType ("player")) do if getElementData (player,"PcountBugFix") then removeElementData (player,"PcountBugFix") end end end end,50,0) end function vv(plr) if missionPlayer [plr] then missionPlayer = nil end end addEventHandler ("onPlayerWasted",root,vv) addEventHandler ("onPlayerQuit",root,vv) startMission () startMissionRepeat = setTimer (startMission,300000,0)-- هنا المهمة تبدأ كل 5 دقائق waterTimer = {} car = {} addEventHandler("onPlayerChat",root, function ( msg ) i = source if msg == "مهمة" then if not missionPlayer[source] then if isTimer (startTimer) then local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* تم نقلك للمهمة",source,5,255,5) spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) if isElement (car[source]) then destroyElement (car[source]) end giveWeapon(source,46) local x,y,z = getElementPosition (source) car[source] = createVehicle (411,x,y,z) Pcount = Pcount + 1 addEventHandler ("onPlayerWasted",i, function () if not getElementData (i,"PcountBugFix") then Pcount = Pcount - 1 setElementData (i,"PcountBugFix",true) end end ) addEventHandler ("onPlayerQuit",i, function () if not getElementData (i,"PcountBugFix") then Pcount = Pcount - 1 setElementData (i,"PcountBugFix",true) end end ) if isTimer (waterTimer[i]) then killTimer (waterTimer[i]) end waterTimer[i] = setTimer(function () if isPedInWater (i) and isPedInVehicle (i) and missionPlayer [i] then killPed (i) missionPlayer [i] = nil killTimer (waterTimer[i]) end end,50,0) else return end else return outputChatBox ("* المهمة لم تبدأ بعد",source,255,5,5) end else return outputChatBox ("* انت في المهمة بالفعل",source,255,5,5) end end end ) function kk ( thePlayer) if missionPlayer [thePlayer] then cancelEvent() outputChatBox ( "*لا تستطيع الخروج من السيارة في الديربي", thePlayer ,255,5,5) end end addEventHandler ( "onVehicleStartExit", getRootElement(), kk ) addEventHandler("onMarkerHit", root, function (player) if source == marker then if getElementType(player) == "player" and isPedInVehicle(player) and missionPlayer[player] and Pcount == 1 then if not getElementData (resourceRoot,"MissionNoRep") then if not isTimer (startTimer) then givePlayerMoney(player,50000) -- setElementData (resourceRoot,"MissionNoRep",true) outputChatBox(" #0099ff فاز بمهم, وحصل على 50000"..getPlayerName(player).." اللاعب ",root,255,255,255,true) for k , i in pairs (missionPlayer) do missionPlayer[k] = nil killPed (k) end if isElement (car[player]) then destroyElement (car[player]) end else outputChatBox ("* المهمة لم تبدأ بعد",player,255,5,5) killPed (player) missionPlayer[player] = nil if isElement (car[player]) then destroyElement (car[player]) end end else outputChatBox ("* تم آخذ الجائزة من قبل",player,255,5,5) killPed (player) missionPlayer[player] = nil if isElement (car[player]) then destroyElement (car[player]) end end end end end ) غير مجرب و اي خطأ او مشكلة كلمني عندما المس الماركر مايحدث شئ بس ماعليك مشكور على جهدك بصلحوا Link to comment
YourMind Posted March 9, 2016 Share Posted March 9, 2016 missionPlayer = {} local marker = createMarker ( 3724.6000976563, -385.5, 1.6000000238419, "cylinder", 4, 255, 255, 255, 255 ) local Pcount = 0 function startMission( ) startTimer = setTimer(function() outputChatBox ("*بدأت المهمة",root,5,255,5) end,120000,1) checkTimer = setTimer (function() local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* المهمة علي وشك البدأ, ستبدأ بعد دقيقتين",root,5,255,5) setElementData (resourceRoot,"MissionNoRep",true) killTimer (checkTimer) Pcount = 0 for player , i in pairs (missionPlayer) do missionPlayer[player] = nil end end end,50,0) end startMission () startMissionRepeat = setTimer (startMission,300000,0)-- هنا المهمة تبدأ كل 5 دقائق waterTimer = {} car = {} addEventHandler("onPlayerChat",root, function ( msg ) i = source if msg == "مهمة" then if not missionPlayer[source] then if isTimer (startTimer) then local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* تم نقلك للمهمة",source,5,255,5) spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) if isElement (car[source]) then destroyElement (car[source]) end giveWeapon(source,46) missionPlayer[source] = true local x,y,z = getElementPosition (source) car[source] = createVehicle (411,x,y,z) warpPedIntoVehicle (i,car[source]) Pcount = Pcount + 1 addEventHandler ("onPlayerWasted",i, function () if missionPlayer[i] then Pcount = Pcount - 1 missionPlayer[i] = nil end end ) addEventHandler ("onPlayerQuit",i, function () if missionPlayer[i] then Pcount = Pcount - 1 missionPlayer[i] = nil end end ) if isTimer (waterTimer[i]) then killTimer (waterTimer[i]) end waterTimer[i] = setTimer(function () if isElementInWater (i) and isPedInVehicle (i) and missionPlayer [i] then killPed (i) missionPlayer [i] = nil killTimer (waterTimer[i]) else return end end,50,0) else return end else return outputChatBox ("* المهمة لم تبدأ بعد",source,255,5,5) end else return outputChatBox ("* انت في المهمة بالفعل",source,255,5,5) end end end ) function kk ( thePlayer) if missionPlayer [thePlayer] then cancelEvent() outputChatBox ( "*لا تستطيع الخروج من السيارة في الديربي", thePlayer ,255,5,5) end end addEventHandler ( "onVehicleStartExit", getRootElement(), kk ) addEventHandler ("onMarkerHit",marker, function (plr) if getElementType (plr) == "player" and isPedInVehicle (plr) and missionPlayer [plr] and Pcount == 1 then if not isTimer (startTimer) then givePlayerMoney(plr,50000) -- killPed(plr) setElementData (resourceRoot,"MissionNoRep",true) outputChatBox("! 50000$ من الديربي "..getPlayerName(plr).." فاز الاعب",root,5,255,5,true) for i , k in ipairs (missionPlayer) do killPed (i) missionPlayer [i] = nil if isElement (car[i]) then destroyElement (car[i]) end end else outputChatBox ("* المهمة لم تبدأ بعد",plr,255,5,5) killPed (plr) missionPlayer[plr] = nil if isElement (car[plr]) then destroyElement (car[plr]) end end end end ) Link to comment
MrSAUD1 Posted March 10, 2016 Share Posted March 10, 2016 missionPlayer = {} local marker = createMarker ( 3724.6000976563, -385.5, 1.6000000238419, "cylinder", 4, 255, 255, 255, 255 ) local Pcount = 0 function startMission( ) startTimer = setTimer(function() outputChatBox ("*بدأت المهمة",root,5,255,5) end,120000,1) checkTimer = setTimer (function() local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* المهمة علي وشك البدأ, ستبدأ بعد دقيقتين",root,5,255,5) setElementData (resourceRoot,"MissionNoRep",true) killTimer (checkTimer) Pcount = 0 for player , i in pairs (missionPlayer) do missionPlayer[player] = nil end end end,50,0) end startMission () startMissionRepeat = setTimer (startMission,300000,0)-- هنا المهمة تبدأ كل 5 دقائق waterTimer = {} car = {} addEventHandler("onPlayerChat",root, function ( msg ) i = source if msg == "مهمة" then if not missionPlayer[source] then if isTimer (startTimer) then local remai = getTimerDetails (startTimer) if remai <= 120000 then outputChatBox ("* تم نقلك للمهمة",source,5,255,5) spawnPlayer(source,3727.5,-342.29998779297,1000.19999694824) if isElement (car[source]) then destroyElement (car[source]) end giveWeapon(source,46) missionPlayer[source] = true local x,y,z = getElementPosition (source) car[source] = createVehicle (411,x,y,z) warpPedIntoVehicle (i,car[source]) Pcount = Pcount + 1 addEventHandler ("onPlayerWasted",i, function () if missionPlayer[i] then Pcount = Pcount - 1 missionPlayer[i] = nil end end ) addEventHandler ("onPlayerQuit",i, function () if missionPlayer[i] then Pcount = Pcount - 1 missionPlayer[i] = nil end end ) if isTimer (waterTimer[i]) then killTimer (waterTimer[i]) end waterTimer[i] = setTimer(function () if isElementInWater (i) and isPedInVehicle (i) and missionPlayer [i] then killPed (i) missionPlayer [i] = nil killTimer (waterTimer[i]) else return end end,50,0) else return end else return outputChatBox ("* المهمة لم تبدأ بعد",source,255,5,5) end else return outputChatBox ("* انت في المهمة بالفعل",source,255,5,5) end end end ) function kk ( thePlayer) if missionPlayer [thePlayer] then cancelEvent() outputChatBox ( "*لا تستطيع الخروج من السيارة في الديربي", thePlayer ,255,5,5) end end addEventHandler ( "onVehicleStartExit", getRootElement(), kk ) addEventHandler ("onMarkerHit",marker, function (plr) if getElementType (plr) == "player" and isPedInVehicle (plr) and missionPlayer [plr] and Pcount == 1 then if not isTimer (startTimer) then givePlayerMoney(plr,50000) -- killPed(plr) setElementData (resourceRoot,"MissionNoRep",true) outputChatBox("! 50000$ من الديربي "..getPlayerName(plr).." فاز الاعب",root,5,255,5,true) for i , k in ipairs (missionPlayer) do killPed (i) missionPlayer [i] = nil if isElement (car[i]) then destroyElement (car[i]) end end else outputChatBox ("* المهمة لم تبدأ بعد",plr,255,5,5) killPed (plr) missionPlayer[plr] = nil if isElement (car[plr]) then destroyElement (car[plr]) end end end end ) تقدر تعطيني السكايب حقك ابيك ؟! 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