Max+ Posted June 23, 2014 Share Posted June 23, 2014 (edited) جرب الكود ذا , theMarker = createMarker ( 1368.99402,-1279.65918,13.54688, "cylinder", 1.5, 255, 255, 0, 250 ) addEventHandler( "onMarkerHit", theMarker, function ( elm ) if ( getElementType ( elm ) == 'player' ) then setElementInterior ( elm, 6 ) end end ) Edited June 23, 2014 by Guest Link to comment
The Killer Posted June 23, 2014 Share Posted June 23, 2014 كودك غلط كيف حاط isElementWithinMarker في حدث اذا لمس الماركر + setElementInterior ناقصك الاحداثيات --------------------------------- الكود هذا صح بس صاحب الموضوع ما عرف يحطه زين او مسوي مشكله بالميتا local theMarker = createMarker (1368.99,-1279.659,13.546, "cylinder", 1.5, 255, 255, 0, 255 ) addEventHandler( "onMarkerHit", theMarker, function ( player ) if getElementType ( player ) == "player" then if isPedInVehicle ( player ) then return end setElementInterior ( player, 2, 285.98175,-85.31979,1001.51563) end end ) Link to comment
Max+ Posted June 23, 2014 Share Posted June 23, 2014 كودك غلطكيف حاط isElementWithinMarker في حدث اذا لمس الماركر + setElementInterior ناقصك الاحداثيات --------------------------------- الكود هذا صح بس صاحب الموضوع ما عرف يحطه زين او مسوي مشكله بالميتا local theMarker = createMarker (1368.99,-1279.659,13.546, "cylinder", 1.5, 255, 255, 0, 255 ) addEventHandler( "onMarkerHit", theMarker, function ( player ) if getElementType ( player ) == "player" then if isPedInVehicle ( player ) then return end setElementInterior ( player, 2, 285.98175,-85.31979,1001.51563) end end ) كودي غلط ؟ ----------------------------------- Required Arguments theElement: The element in which you'd like to set the interior of. interior: The interior you want to set the element to. Valid values are 0 to 255. -------------------------------------------------- وبعدين ابي اعرف وش دخل السيارة بنقله لشوب الاسلحه ؟ if isPedInVehicle Link to comment
Simba Posted June 23, 2014 Share Posted June 23, 2014 لو كان داخل الماركر بمبركبة سواء كانت سيارة او طائرة او سفينه ما ينقله ! Link to comment
acount deleted Posted June 23, 2014 Share Posted June 23, 2014 كودك غلطكيف حاط isElementWithinMarker في حدث اذا لمس الماركر + setElementInterior ناقصك الاحداثيات --------------------------------- الكود هذا صح بس صاحب الموضوع ما عرف يحطه زين او مسوي مشكله بالميتا local theMarker = createMarker (1368.99,-1279.659,13.546, "cylinder", 1.5, 255, 255, 0, 255 ) addEventHandler( "onMarkerHit", theMarker, function ( player ) if getElementType ( player ) == "player" then if isPedInVehicle ( player ) then return end setElementInterior ( player, 2, 285.98175,-85.31979,1001.51563) end end ) كودي غلط ؟ ----------------------------------- Required Arguments theElement: The element in which you'd like to set the interior of. interior: The interior you want to set the element to. Valid values are 0 to 255. -------------------------------------------------- وبعدين ابي اعرف وش دخل السيارة بنقله لشوب الاسلحه ؟ if isPedInVehicle لو كان بسيارة ما يقدر ينتقل Link to comment
KING#NSSER Posted June 24, 2014 Author Share Posted June 24, 2014 يا اخوان لماذا هذه الاكواد كلها لاتعمل وانتم مبرمجين ممتازين طلبي سهل ليس صعب بما معنا الكلمه هو مجرد كود عادي بالنسبه لديكم سهل يلا يا عباقرة تعبوا نفسكم من اجلي يا عباقرة mta انتم مستقبل هيا لتصميم عصابه البرمجه وانتم المسؤولون في العصابه الله يبارك فيكم + اعطوني الكود المنساب و جربه عندك قبل طرحه وشكرا يا ابطال البرمجه تبا لمن لايحترمكم Link to comment
Simba Posted June 24, 2014 Share Posted June 24, 2014 الكود شغااال بس انتت مانك عارف كيف تسويهه ++ الكوود مرره سههل انت اطرح ملف الميتا وبسس meta Link to comment
KING#NSSER Posted June 24, 2014 Author Share Posted June 24, 2014 هذا هو الي طلبته يا رب يكون فيه خطأ حتى لاتضهر لنا خطأ جديد في غير مكان Link to comment
Max+ Posted June 24, 2014 Share Posted June 24, 2014 جرب ذا , theMarker = createMarker ( 1368.99402,-1279.65918,13.54688, "cylinder", 1.5, 255, 255, 0, 250 ) addEventHandler( "onMarkerHit", theMarker, function ( elm ) if ( getElementType ( elm ) == 'player' ) then setElementInterior ( elm, 6 ) setElementPosition ( elm, 285.56036,-41.65447,1001.51563 ) end end ) Link to comment
KING#NSSER Posted June 24, 2014 Author Share Posted June 24, 2014 شف هذه الصوره كذا يضهر لي اريد حل راجاااااااااءا Link to comment
AboShanab Posted June 24, 2014 Share Posted June 24, 2014 عذرآ ع الخشششة الغلط ضض1 بسس شسمه وش تبي تسوي ؟ Link to comment
KING#NSSER Posted June 24, 2014 Author Share Posted June 24, 2014 عذرآ ع الخشششة الغلط ضض1 بسس شسمه وش تبي تسوي ؟ اذا انت مبرمج حياك الله اذا لا انتضر ماركر يعطينا اياه الخبراء اذا مبرمج اريد انتقل من محل من هنا الى هنا طيعا اريد انتقل الى محل السلحه الي هو بالخارطه الوهميه واكون ممنون طبعا لجميع اللاعبين _^_^ Link to comment
AboShanab Posted June 24, 2014 Share Posted June 24, 2014 -- # Server Side ! local MarkerJoin = {} local MarkerQuit = {} local Blip = {} local MarkerJoinData = { { x, y, z, interior, dimension }, } local MarkerQuitData = { { x, y, z, interior, dimension }, } addEventHandler("onResourceStart", resourceRoot, function () for k,v in ipairs ( MarkerJoinData ) do MarkerJoin [ k ] = createMarker ( v [ 1 ], v [ 2 ], v [ 3 ], "cylinder", 2.0, 0, 0, 255, 255 ) setElementInterior ( MarkerJoin [ k ], v [ 4 ] ) setElementDimension ( MarkerJoin [ k ], v [ 5 ] ) setElementData ( MarkerJoin [ k ], "MarkerJoin_", true ) Blip [ k ] = createBlipAttachedTo ( MarkerJoin [ k ], 6 ) end for k,v in ipairs ( MarkerQuitData ) do MarkerQuit [ k ] = createMarker ( v [ 1 ], v [ 2 ], v [ 3 ], "cylinder", 2.0, 0, 0, 255, 255 ) setElementInterior ( MarkerQuit [ k ], v [ 4 ] ) setElementDimension ( MarkerQuit [ k ], v [ 5 ] ) end end ) addEventHandler("onMarkerHit", resourceRoot, function ( element ) if ( getElementType ( element ) == "player" and not isPedInVehicle ( element ) ) then if ( getElementData ( source, "MarkerJoin_" ) == true ) then setElementDimension ( element, 0 ) setElementInterior ( element, 2, x, y, z ) else setElementDimension ( element, 0 ) setElementInterior ( element, 0 ) setElementPosition ( element, x, y, z ) end end end ) الشرح -- [ Table MarkerJoinData ] -- -- [ جدول MarkerJoinData ] -- { x, y, z, interior, dimension }, x, y, z = الاحداثيات interior = الانتور حق ماركر الدخول dimension = العالم الوهمي للماركر حق الدخول -- [ Table MarkerQuitData ] -- -- [ جدول MarkerQuitData ] -- { x, y, z, interior, dimension }, x, y, z = الاحداثيات interior = الانتور حق ماركر الخروج dimension = العالم الوهمي للماركر حق الخروح -- [ Event onMarkerHit ] -- -- [ افينت onMarkerHit ] -- شرح م تحت سطر التحقق if ( getElementData ( source, "MarkerJoin_" ) == true ) then setElementDimension ( element, 0 ) setElementInterior ( element, 2, x, y, z ) # 0 = العالم الوهمي # 2 = الانتور # x, y, z = الاحداثيات داخل الانتور الشررح م تحت سطر else طبعا هذي حق الخروج من محل الاسلحة setElementDimension ( element, 0 ) setElementInterior ( element, 0 ) setElementPosition ( element, x, y, z ) # setElementDimension | 0 | العالم الوهمي # setElementInterior | 0 | الانتور # setElementPosition | x, y, z | الاحداثيات اللي ينزل فيها الاعب بعد الخروج جربهه ورد لي خبر # Link to comment
KING#NSSER Posted June 24, 2014 Author Share Posted June 24, 2014 ممكن تكتب الاسطر الي اعدل عليها فقط و شكرا Link to comment
AboShanab Posted June 24, 2014 Share Posted June 24, 2014 الاسطر اللي تعدل عليها { x, y, z, interior, dimension }, + setElementInterior ( element, 2, x, y, z ) + setElementPosition ( element, x, y, z ) Link to comment
KING#NSSER Posted June 24, 2014 Author Share Posted June 24, 2014 انا الاحدائيات الي استخدمها ==================================== داخل متجر الاسلحه ................................................... هذه الاحداثيات من اجيلها ينقلني الى الخارطه الحقيقيه 285.46732,-41.80194,1001.51563 .................................................... وهذه الاحداثيات الي ينقلني من الخارطه الحقيقيه الى امتجر الاسلحه 285.36450,-40.75896,1001.51563 ===================================== ساحه اللعب (الخارطه الحقيقيه) ليست الوهميه .................................................... هذه الاحداثيات من اللمسها ينقني من الخارطه الحقيقيه الى متجر الاسلحه 1368.99939,-1279.69312,13.54688 .................................................... وهذه الاحداثيات الذي تنقلني من متجر الاسلحه الى الخارطه الحقيقيه 1367.48328,-1280.02319,13.54688 ============================================================ وشكرا Link to comment
AboShanab Posted June 24, 2014 Share Posted June 24, 2014 -- # Server Side ! local MarkerJoin = {} local MarkerQuit = {} local Blip = {} local MarkerJoinData = { { 1368.99939, -1279.69312, 13.54688, 0, 0 }, } local MarkerQuitData = { { 1367.48328, -1280.02319, 13.54688, 2, 0 }, } addEventHandler("onResourceStart", resourceRoot, function () for k,v in ipairs ( MarkerJoinData ) do MarkerJoin [ k ] = createMarker ( v [ 1 ], v [ 2 ], v [ 3 ], "cylinder", 2.0, 0, 0, 255, 255 ) setElementInterior ( MarkerJoin [ k ], v [ 4 ] ) setElementDimension ( MarkerJoin [ k ], v [ 5 ] ) setElementData ( MarkerJoin [ k ], "MarkerJoin_", true ) Blip [ k ] = createBlipAttachedTo ( MarkerJoin [ k ], 6 ) end for k,v in ipairs ( MarkerQuitData ) do MarkerQuit [ k ] = createMarker ( v [ 1 ], v [ 2 ], v [ 3 ], "cylinder", 2.0, 0, 0, 255, 255 ) setElementInterior ( MarkerQuit [ k ], v [ 4 ] ) setElementDimension ( MarkerQuit [ k ], v [ 5 ] ) end end ) addEventHandler("onMarkerHit", resourceRoot, function ( element ) if ( getElementType ( element ) == "player" and not isPedInVehicle ( element ) ) then if ( getElementData ( source, "MarkerJoin_" ) == true ) then setElementDimension ( element, 0 ) setElementInterior ( element, 2, 285.36450, -40.75896, 1001.51563 ) else setElementDimension ( element, 0 ) setElementInterior ( element, 0 ) setElementPosition ( element, 285.46732, -41.80194, 1001.51563 ) end end end ) Link to comment
KING#NSSER Posted June 24, 2014 Author Share Posted June 24, 2014 هل تعلم ؟ هذا كودك اسف اسف على تعب كل من شارك هنا وان شاء الله تحقيق امانيه ويعيش بأمان و استقرار Link to comment
AboShanab Posted June 24, 2014 Share Posted June 24, 2014 امم طيب شف انتقل من الادمنية لـ مكان الاسسلحة وصورها لنا .. لا هنت Link to comment
Simba Posted June 25, 2014 Share Posted June 25, 2014 ههههههههه عرفت الغلط وش كان كان من setElementInterior انا حاط الانتريور رقم 1 مدري 2 بس كان رقم المتجر الصغير وهو حاطط احداثيات المتجر الكبير افاا طلع الغلط مني ! المهمم هذا هو الكود ومجرب وشغال ميه ميه عندي ورح احط فيديو له هذي هي الاكواد ركزز x , y , z = 1368.99561,-1279.69981,13.54688 -- احداثيات الماركر الي ينقلك لمحل الاسلحةة theMarker = createMarker ( x , y , z ,"cylinder", 1.5, 255, 0, 255, 250 ) -- لا تسوي شي هنا addEventHandler( "onMarkerHit", theMarker, function ( plr ) if getElementType ( plr ) == "player" then if isPedInVehicle ( plr ) then return end setElementInterior ( plr, 1, 285.96152,-40.28812,1001.51563) -- هنا بعد رقم 1 تحط الاحداثيات حقت متجر الاسلحة end end ) px , py , pz = 285.47217,-41.80237,1001.51563 -- احداثيات الماركر داخل المتجر mark = createMarker ( px , py , pz ,"cylinder", 1.5, 255, 0, 255, 250 ) -- هنا لا تسوي شي setElementInterior ( mark, 1, 285.47217,-41.80237,1001.51563) -- هنا بعد رقم واحد تحط الاحداثيات حقت الماركر الي داخل المتجر addEventHandler( "onMarkerHit", mark, function ( abod ) if getElementType ( abod ) == "player" then if isPedInVehicle ( abod ) then return end setElementInterior ( abod, 0, 1365.78503,-1278.84778,13.54688) -- هنا لما يلمس اكر الي داخل المتجر ينقله لبرا للعالم العادي -- تحط الاحداثيات بعد رقم صفر end end ) واهمم شي لا تنسى تحذف الكلام الي باللون الرصاصي الي بعد -- او حط ترميز الملف UTF-8 الاكواد كلها سيرفر او لا تحذف الاحداثيات او تعدلها لاني انا مزبطها لك 100% والكود شغال وهذي صور Link to comment
acount deleted Posted June 25, 2014 Share Posted June 25, 2014 اذا ما اشتغل معه ذا يمكن عنده مشكلة باللعبة Link to comment
Simba Posted June 25, 2014 Share Posted June 25, 2014 اذا ما اشتغلل اكتب في اف 8 debugscript 3 وقلنا وش يطلعلك 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