|M.r|LooFe| Posted August 15, 2017 Share Posted August 15, 2017 السلام عليكم يعيال انا فكرت اني اصمم مهمة الركض صممت الماب الحين ابيه كل 20 دقيقة تشتغل المهمة يوم تشتغل يكتب في الشات لقد بدات مهمة الركض للدخول اكتب في الشات ركض يجي يكتب ركض ينقله للماب طبعا سويت الكود بس ابي الماب يكون في العالم هذا هذا الكود يليل صممته addEventHandler ( "onPlayerChat" , root , function ( msg , msgType ) if msg == 'ركض' then setElementPosition(source,2442.15771,-1664.14917,27.08487) setElementDimension(source, 45) setElementFrozen(source,true) end end ) ابيه يوم يروح يتجمد بعد ب1دقيقة من بدء المهمة تشتغل ويقول بدأت المهمة انطلاق ويفك التحميد ويبلش يركض وبس في ماركر اخر الماب لي يصله اول هو ياخذ الفلوس وبعدها الكل يموت ويخرجهم من العالم الوهمي ولو لاعب وهو يركض سقط يكتب في الشات عدد اللاعبين المتبقيين في الركض مثلا 8 7 وكذا وشكرا يا ريت تساعدوني انا جربت بس اهم شي ابيها ذي االكواد و الباقي انا اسويه Link to comment
yasin0 Posted August 15, 2017 Share Posted August 15, 2017 (edited) table setElementFrozen setTimer destroyElement setElementDimension givePlayerMoney count = count + 1 count = count - 1 'onPlayerWasted' Edited August 15, 2017 by yasin0 Link to comment
DaHoM Posted August 15, 2017 Share Posted August 15, 2017 اخي لو تبي طريقتي روح على الماب وفتحو عن طريق المايكروسوفت وورد واعمل بحث عن كلمة dimension رح يطلعلك جمب كل قطعة dimension="0" اعمل خيار استبدال الكل وحط العنصر المراد الأستبدال به dimension="45" ورح ينبدل كل الأوبجيكت الي في الماب من ديمونتيشن 0 الى 45 وبس .... Link to comment
|M.r|LooFe| Posted August 16, 2017 Author Share Posted August 16, 2017 13 hours ago, yasin0 said: table setElementFrozen setTimer destroyElement setElementDimension givePlayerMoney count = count + 1 count = count - 1 'onPlayerWasted' اخوي ممكن الأكود كاملة 13 hours ago, DaHoM said: اخي لو تبي طريقتي روح على الماب وفتحو عن طريق المايكروسوفت وورد واعمل بحث عن كلمة dimension رح يطلعلك جمب كل قطعة dimension="0" اعمل خيار استبدال الكل وحط العنصر المراد الأستبدال به dimension="45" ورح ينبدل كل الأوبجيكت الي في الماب من ديمونتيشن 0 الى 45 وبس .... سويتها لكن ضل الاكواد يلي طلبتها Link to comment
|M.r|LooFe| Posted August 16, 2017 Author Share Posted August 16, 2017 عيال هذي محاولاتي على الفنكشنات يلي اعطيتوني اياهم ممكن مساعده انه لو في خطأ بالكود تصلحوه addEventHandler ( "onPlayerChat" , root , function ( msg , msgType ) if msg == 'ركض' then setElementPosition(source,4515.9516601563,-1866.2738037109,295.76873779297) setElementDimension(source, 45) setElementFrozen(source,true) end end ) -------------------------------------------------------------- function chat ( ) outputChatBox("********************************************" ,root,255,0,0,true) outputChatBox(" " ,root,255,0,0,true) outputChatBox("لقد بدات مهمة الركض للدخول اكتب في الشات ركض" ,root,255,0,0,true) outputChatBox(" " ,root,255,0,0,true) outputChatBox("********************************************" ,root,255,0,0,true) end setTimer (chat, 120000, 0) -------------------------------------------------------------- -------------------------------------------------------------- local marker = createMarker(4525.6000976563,-1373.9000244141,304.5,"cylinder",1.5,255,255,0,255) addEventHandler("onMarkerHit",marker, function ( source ) if source ~= themarker then return end givePlayerMoney( source, 5000 ) destroyElement(themarker) outputChatBox("في مهمة الركض وقد ربح 500الف " .. getPlayerName(source) .. " لقد فاز اللاعب",root,255,255,255,true) end ) ------------------------------------------------------------- addEventHandler("onPlayerWasted",root, function () if isPlayerInWp(source) then DelPlayer(source) Check() end end ) addEventHandler("onPlayerQuit",root, function () if isPlayerInWp(source) then DelPlayer(source) end end ) addEventHandler("onColShapeLeave",col, function (player) if getElementType(player) == "player" then if isPlayerInWp(player) then killPed(player) DelPlayer(player) end end end ) Link to comment
' A F . Posted August 16, 2017 Share Posted August 16, 2017 تحتاج تسوي متغير تجيب حالة المهمة هل هي مشتغلة أو طافية . وتحدث المتغير مع التايمر . Link to comment
|M.r|LooFe| Posted August 16, 2017 Author Share Posted August 16, 2017 3 hours ago, Default said: تحتاج تسوي متغير تجيب حالة المهمة هل هي مشتغلة أو طافية . وتحدث المتغير مع التايمر . كيف يعني ؟ اطرحلي كود + يخوي المهمة اشتغلت منيح وكل شي خلاص بس ضل انه يوم يلمس الماركر يموتو يلي في المهمة بس + انا سويت كود حماية من فتح لوحات بس ما اشتغل هذا الكود buttons = { ['F1'] = true, ['F2'] = true, ['F3'] = true, ['F4'] = true, ['F5'] = true, ['F6'] = true, ['F7'] = true, ['F8'] = true, ['F9'] = true, ['F10'] = true, ['F11'] = true, ['b'] = true, ['p'] = true, [']'] = true, ['['] = true, ['/'] = true, ['admin'] = true, ['x'] = true, ['fix'] = true, ['m'] = true, ['j'] = true, } addEventHandler( 'onClientKey', root, function (button , prees) if prees and getElementDimension(localPlayer) == 45 then if buttons[button] then outputChatBox("غير مصرح لك بفتح اللوحة الان", source, 255, 0, 0) cancelEvent() end end end) الكود انا كنت مسوي فيه حماية للديربي لحد الان هو شغال Link to comment
' A F . Posted August 16, 2017 Share Posted August 16, 2017 local Keys,Dim = {"F1","F2","F3","F4","F5","F6","F7","F9","F10","F12","p","]","[","/"} , 45 ; addEventHandler ( "onClientKey" , root , function ( key , press ) if ( press and getElementDimension ( localPlayer ) == Dim ) then for k,v in ipairs ( Keys ) do if ( v == key ) then outputChatBox("غير مصرح لك بفتح اللوحة الان !",255,255,0,true) cancelEvent() end end end end ) ; Link to comment
|M.r|LooFe| Posted August 16, 2017 Author Share Posted August 16, 2017 35 minutes ago, Default said: local Keys,Dim = {"F1","F2","F3","F4","F5","F6","F7","F9","F10","F12","p","]","[","/"} , 45 ; addEventHandler ( "onClientKey" , root , function ( key , press ) if ( press and getElementDimension ( localPlayer ) == Dim ) then for k,v in ipairs ( Keys ) do if ( v == key ) then outputChatBox("غير مصرح لك بفتح اللوحة الان !",255,255,0,true) cancelEvent() end end end end ) ; شكرا لكن ضل كود صغير بس وهو انه يوم اللاعب يلمس الماركر يموتو كل يلي في المهمة وشكرا Link to comment
' A F . Posted August 16, 2017 Share Posted August 16, 2017 احط بالحدث حق دخول الماركر لوب يجيب لك اللاعبين الي بالمهمة ثم اقتلهم عن طريق هاذا الفنكشن : killPed ثم أحذفهم من الجدول . Link to comment
|M.r|LooFe| Posted August 16, 2017 Author Share Posted August 16, 2017 2 minutes ago, Default said: احط بالحدث حق دخول الماركر لوب يجيب لك اللاعبين الي بالمهمة ثم اقتلهم عن طريق هاذا الفنكشن : killPed ثم أحذفهم من الجدول . كيف يعني هي كود الماركر addEventHandler("onMarkerHit",marker, function ( source ) givePlayerMoney( source, 5000 ) destroyElement(marker) killPed(player) outputChatBox("في مهمة الركض وقد ربح 500الف " .. getPlayerName(source) .. " لقد فاز اللاعب",root,255,255,255,true) end ) Link to comment
' A F . Posted August 16, 2017 Share Posted August 16, 2017 addEventHandler("onMarkerHit",root,function ( hit ) if ( source == marker and getElementType ( hit ) == "player" ) then givePlayerMoney( hit , 5000 ) outputChatBox("في مهمة الركض وقد ربح 500الف " .. getPlayerName(hit) .. " لقد فاز اللاعب",root,255,255,255,true) for i,v in ipairs ( getElementsByType("player") ) do if ( isPlayerInWp ( v ) ) then killPed ( v ) DelPlayer ( v ) end end destroyElement(source) end end ); Link to comment
|M.r|LooFe| Posted August 16, 2017 Author Share Posted August 16, 2017 يعني انا استخدمت هذا الكود addEventHandler("onPlayerWasted",root, function () if isPlayerInWp(source) then DelPlayer(source) Check() end end ) addEventHandler("onPlayerQuit",root, function () if isPlayerInWp(source) then DelPlayer(source) end end ) addEventHandler("onColShapeLeave",player, function (player) if getElementType(player) == "player" then if isPlayerInWp(player) then killPed(player) DelPlayer(player) end end end ) بس ما اشتغل Link to comment
' A F . Posted August 16, 2017 Share Posted August 16, 2017 متأكد isPlayerInWp DelPlayer انها موجودة ؟ Link to comment
|M.r|LooFe| Posted August 16, 2017 Author Share Posted August 16, 2017 1 minute ago, Default said: متأكد isPlayerInWp DelPlayer انها موجودة ؟ معرف اخذتها من مهمة بتاعت سنابير Link to comment
|M.r|LooFe| Posted August 16, 2017 Author Share Posted August 16, 2017 Just now, Default said: اطرح الاكواد كاملة كك addEventHandler ( "onPlayerChat" , root , function ( msg , msgType ) if msg == 'ركض' then setElementPosition(source,4515.9516601563,-1866.2738037109,295.76873779297) setElementDimension(source, 45) outputChatBox("********************************************" ,root,255,0,0,true) outputChatBox(" " ,root,255,0,0,true) outputChatBox("لقد بدات مهمة الركض للدخول اكتب في الشات ركض" ,root,255,0,0,true) outputChatBox(" " ,root,255,0,0,true) outputChatBox("********************************************" ,root,255,0,0,true) end end ) -------------------------------------------------------------- -------------------------------------------------------------- local marker = createMarker(4525.6000976563,-1373.9000244141,304.5,"cylinder",1.5,255,255,0,255) addEventHandler("onMarkerHit",root,function ( hit ) if ( source == marker and getElementType ( hit ) == "player" ) then givePlayerMoney( hit , 5000 ) outputChatBox("في مهمة الركض وقد ربح 500الف " .. getPlayerName(hit) .. " لقد فاز اللاعب",root,255,255,255,true) for i,v in ipairs ( getElementsByType("player") ) do if ( isPlayerInWp ( v ) ) then killPed ( v ) DelPlayer ( v ) end end destroyElement(source) end end ); ------------------------------------------------------------- addEventHandler("onPlayerWasted",root, function () if isPlayerInWp(source) then DelPlayer(source) Check() end end ) addEventHandler("onPlayerQuit",root, function () if isPlayerInWp(source) then DelPlayer(source) end end ) addEventHandler("onColShapeLeave",player, function (player) if getElementType(player) == "player" then if isPlayerInWp(player) then killPed(player) DelPlayer(player) end end end ) + انا مسوي كود انه يطفي مهمة ويشغل الثانية + ابيه لو لاعب وقع يموت اللاعب ويكتب في الشات انه بقي يفي الركض مثلا 5 لاعبين Link to comment
' A F . Posted August 16, 2017 Share Posted August 16, 2017 (edited) طيب وين الوظائف حقت isPlayerInWp + DelPlayer + وين الكول شيب الي مسوية . Edited August 16, 2017 by Default Link to comment
|M.r|LooFe| Posted August 16, 2017 Author Share Posted August 16, 2017 1 minute ago, Default said: طيب وين الوظائف حقت isPlayerInWp + DelPlayer + وين الكول شيب الي مسوية . انساهم ذول خلص المهمة شغالة بس يلي ابيه لو وقع لاعب يموت ويكتب في الشات بقي في الركض 5لاعبين Link to comment
' A F . Posted August 16, 2017 Share Posted August 16, 2017 سوي يوم يموت لاعب تحقق انه بالمهمة بعد ماتحذفه جيب عدد الاعبين الي بالمهمة الي هو بالجدول #TableName Link to comment
|M.r|LooFe| Posted August 16, 2017 Author Share Posted August 16, 2017 1 minute ago, Default said: سوي يوم يموت لاعب تحقق انه بالمهمة بعد ماتحذفه جيب عدد الاعبين الي بالمهمة الي هو بالجدول #TableName يخوي عطني الكود انت انا جالس اسوي بشي على الكود Link to comment
' A F . Posted August 16, 2017 Share Posted August 16, 2017 يعني انت هاذا كل وقت انك راح تعمد على الجاهز ؟ حآول ونسآعدك . Link to comment
|M.r|LooFe| Posted August 16, 2017 Author Share Posted August 16, 2017 Just now, Default said: يعني انت هاذا كل وقت انك راح تعمد على الجاهز ؟ حآول ونسآعدك . يخوي الصراحة ما اعرف لللكود هذا مفي شي جاهز ما انا عطيتك محاولاتي Link to comment
' A F . Posted August 16, 2017 Share Posted August 16, 2017 أعطيتني محاولاتك بس ماعطيتني محآولتك بالكود الي انت تبي تسوية Link to comment
|M.r|LooFe| Posted August 16, 2017 Author Share Posted August 16, 2017 1 minute ago, Default said: أعطيتني محاولاتك بس ماعطيتني محآولتك بالكود الي انت تبي تسوية عطني فانكشنات 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