MA[S]RIY Posted June 14, 2018 Share Posted June 14, 2018 السلام عليكم وش احلي طريقه اسوي بيها كنترول للمهمات يعني مهمه تخلص تيجي المهمه الي بعدها وكذا جربت اسويها ب الاكسبورت مدري ليش يكرر المهم ايش احلي طريقه ؟ Link to comment
MrBiG Posted June 14, 2018 Share Posted June 14, 2018 (edited) انا بقول انو تسوي دوال في كل مهمة وظيفتهم تشغيل المهمات بس لا تشغلهم وفي مهمة واحده منهم شغل الدالة الخاصة بها ( export ) ولما تخلص المهمة اعمل اتصال بمهمة من المهمات على دالات التشغيل الخاصة بها وفي داخل الدوال تسوي تايمر لوقت المهمة والخ ... وش رايك Edited June 14, 2018 by Debo15 Link to comment
SycroX Posted June 14, 2018 Share Posted June 14, 2018 (edited) من رأي يسوي مود متحكم للمهمات MissionManager انا مسويه - نظام جداول تحط المهمات بالترتيب الي تباه بالجدول و و روح للمهمات و سوي بها وظيفه اسمها startMission بعدين بقا لما يجي المود يفتح ( المتحكم ) يسوي اتصال بالمهمه الأولي بالجدول بعدين سوي لما المهمه تخلص يسوي اتصال بالمتحكم يخله يبداء المهمه الي بعدها - ذي افضل طريقه من الطرق الي جربتها مثال بسيط : --#Ex local currentMission = 1 local MyMissions = { --#Mission name, resource name [1] = {"CVR", "CVRMission"}, [2] = {"TEST", "TESTMission"} } addEventHandler("onResourceStart", resourceRoot, function() local res = getResourceFromName(MyMissions[currentMission][2]) if res and getResourceState(res) == "running" then exports[MyMissions[currentMission][2]]:startMission() else nextMission() end end ) function nextMission() currentMission = currentMission + 1 if currentMission > #MyMissions then currentMission = 1 end local res = getResourceFromName(MyMissions[currentMission][2]) if res and getResourceState(res) == "running" then exports[MyMissions[currentMission][2]]:startMission() else nextMission() end end Edited June 14, 2018 by #َxLysandeR Link to comment
MA[S]RIY Posted June 14, 2018 Author Share Posted June 14, 2018 (edited) 42 minutes ago, #َxLysandeR said: من رأي يسوي مود متحكم للمهمات MissionManager انا مسويه - نظام جداول تحط المهمات بالترتيب الي تباه بالجدول و و روح للمهمات و سوي بها وظيفه اسمها startMission بعدين بقا لما يجي المود يفتح ( المتحكم ) يسوي اتصال بالمهمه الأولي بالجدول بعدين سوي لما المهمه تخلص يسوي اتصال بالمتحكم يخله يبداء المهمه الي بعدها - ذي افضل طريقه من الطرق الي جربتها مثال بسيط : --#Ex local currentMission = 1 local MyMissions = { --#Mission name, resource name [1] = {"CVR", "CVRMission"}, [2] = {"TEST", "TESTMission"} } addEventHandler("onResourceStart", resourceRoot, function() local res = getResourceFromName(MyMissions[currentMission][2]) if res and getResourceState(res) == "running" then exports[MyMissions[currentMission][2]]:startMission() else nextMission() end end ) function nextMission() currentMission = currentMission + 1 if currentMission > #MyMissions then currentMission = 1 end local res = getResourceFromName(MyMissions[currentMission][2]) if res and getResourceState(res) == "running" then exports[MyMissions[currentMission][2]]:startMission() else nextMission() end end طريقتك حلوة بجربها Edited June 14, 2018 by MA[S]RIY Link to comment
MA[S]RIY Posted June 14, 2018 Author Share Posted June 14, 2018 (edited) 1 hour ago, #َxLysandeR said: من رأي يسوي مود متحكم للمهمات MissionManager انا مسويه - نظام جداول تحط المهمات بالترتيب الي تباه بالجدول و و روح للمهمات و سوي بها وظيفه اسمها startMission بعدين بقا لما يجي المود يفتح ( المتحكم ) يسوي اتصال بالمهمه الأولي بالجدول بعدين سوي لما المهمه تخلص يسوي اتصال بالمتحكم يخله يبداء المهمه الي بعدها - ذي افضل طريقه من الطرق الي جربتها مثال بسيط : --#Ex local currentMission = 1 local MyMissions = { --#Mission name, resource name [1] = {"CVR", "CVRMission"}, [2] = {"TEST", "TESTMission"} } addEventHandler("onResourceStart", resourceRoot, function() local res = getResourceFromName(MyMissions[currentMission][2]) if res and getResourceState(res) == "running" then exports[MyMissions[currentMission][2]]:startMission() else nextMission() end end ) function nextMission() currentMission = currentMission + 1 if currentMission > #MyMissions then currentMission = 1 end local res = getResourceFromName(MyMissions[currentMission][2]) if res and getResourceState(res) == "running" then exports[MyMissions[currentMission][2]]:startMission() else nextMission() end end الحين انا شغلت المود شغل اول مهمه تمام وبعدان اول مهمه خلصت اشتغلت اول مهمه ثاني وثاني مهمه مع بض ؟ Edited June 14, 2018 by MA[S]RIY 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