aBo.F[ra]G<3 Posted April 21, 2014 Share Posted April 21, 2014 السسلام عليكم ي شباب ابي كود البوابه اذا قربت منها تفتح يعني من غير رقم سري وكذا وابي كود الماركر يطلع سياره الى عنده لايبخلل ; \ وياليت توضحون Link to comment
ahmed1010 Posted April 21, 2014 Share Posted April 21, 2014 Door = createObject(980, Y , X , Z ,0,0,0)-----اولا نعمل الاوبجت (البوابة ) markerDoor = createMarker( Y , X , Z ,"cylinder",9,0,0,0,0)-----------نعمل الماركر addEventHandler("onMarkerHit", markerDoor , function ( hitElement ) moveObject( Door, 1000, Y , X , Z ) ---------- احداثيات البوابة عندما تتحرك end ) Link to comment
al-Kobra Posted April 21, 2014 Share Posted April 21, 2014 اول كود createObject createMarker 'onMarkerHit' getElementType setTimer > moveObject الكود الثاني createMarker 'onMarkerHit' createVehicle warpPedIntoVehicle Link to comment
aBo.F[ra]G<3 Posted April 21, 2014 Author Share Posted April 21, 2014 ضبط معي اذا قربت تفتح لاكن ماتسكر Link to comment
shwaeki Posted April 21, 2014 Share Posted April 21, 2014 اسنحدم 'onMarkerLeave' moveObject Link to comment
aBo.F[ra]G<3 Posted April 21, 2014 Author Share Posted April 21, 2014 اضفت عليهه هذا الكوود addEventHandler('onMarkerLeave',markerDoor3, function ( hitElement ) moveObject(Door3,10000,-504.79998779297,2592.6999511719,54.099998474121,0,0,268) end ) لاكن مانفع نفس الشي ماتسكر Link to comment
The Killer Posted April 21, 2014 Share Posted April 21, 2014 غير الاحداثيات خلها احداثيات حقت مكان صنع البوابه Link to comment
ahmed1010 Posted April 21, 2014 Share Posted April 21, 2014 Door = createObject(980, Y , X , Z ,0,0,0)-----اولا نعمل الاوبجت (البوابة ) markerDoor = createMarker( Y , X , Z ,"cylinder",9,0,0,0,0)-----------نعمل الماركر addEventHandler("onMarkerHit", markerDoor , function ( hitElement ) moveObject( Door, 1000, Y , X , Z ) ---------- احداثيات البوابة عندما تتحرك end ) addEventHandler("onMarkeLeave", markerDoor , function ( hitElement ) moveObject( Door, 1000, Y , X , Z ) -----احداثيات البوابة عندما تسكر end ) ) Link to comment
aBo.F[ra]G<3 Posted April 21, 2014 Author Share Posted April 21, 2014 سوي زي كذااا Door = createObject(980,-504.70001220703,2592.6000976563,55.200000762939,0,0,268 ) markerDoor = createMarker( -504.79998779297,2592.6000976563,52.299999237061 ,"cylinder",9,0,0,0,0) addEventHandler("onMarkerHit", markerDoor , function ( hitElement ) moveObject( Door, 1000, -504.79998779297,2593.1000976563,59.200000762939 ) end ) addEventHandler("onMarkeLeave", markerDoor , function ( hitElement ) moveObject( Door, 980,-504.70001220703,2592.6000976563,55.200000762939,0,0,268 ) end ) مانفع Link to comment
aBo.F[ra]G<3 Posted April 21, 2014 Author Share Posted April 21, 2014 سويت نفس الطريقه ذي بس تفتح ماتسكرر Link to comment
KING-_-HOHO Posted April 21, 2014 Share Posted April 21, 2014 نسيت تحط حرف R في الحدث حق اغلاق البوابة خله كذا Door = createObject(980,-504.70001220703,2592.6000976563,55.200000762939,0,0,268 ) markerDoor = createMarker( -504.79998779297,2592.6000976563,52.299999237061 ,"cylinder",9,0,0,0,0) addEventHandler("onMarkerHit", markerDoor , function ( hitElement ) moveObject( Door, 1000, -504.79998779297,2593.1000976563,59.200000762939 ) end ) addEventHandler("onMarkerLeave", markerDoor , function ( hitElement ) moveObject( Door, 980,-504.70001220703,2592.6000976563,55.200000762939,0,0,268 ) end ) Link to comment
ahmed1010 Posted April 21, 2014 Share Posted April 21, 2014 نسيت تحط حرفR في الحدث حق اغلاق البوابة خله كذا Door = createObject(980,-504.70001220703,2592.6000976563,55.200000762939,0,0,268 ) markerDoor = createMarker( -504.79998779297,2592.6000976563,52.299999237061 ,"cylinder",9,0,0,0,0) addEventHandler("onMarkerHit", markerDoor , function ( hitElement ) moveObject( Door, 1000, -504.79998779297,2593.1000976563,59.200000762939 ) end ) addEventHandler("onMarkerLeave", markerDoor , function ( hitElement ) moveObject( Door, 980,-504.70001220703,2592.6000976563,55.200000762939,0,0,268 ) end ) دائما لازم انسى شئ ذذ Link to comment
aBo.F[ra]G<3 Posted April 21, 2014 Author Share Posted April 21, 2014 مضبوط الحين تنزل البوابه بس ماتسكرر بس تنزل بالارض يعني البوابه تكون فاتحه المشكله اني متأكد من الاحداثيات Link to comment
ahmed1010 Posted April 21, 2014 Share Posted April 21, 2014 مضبوط الحين تنزل البوابه بس ماتسكرر بس تنزل بالارض يعني البوابه تكون فاتحه المشكله اني متأكد من الاحداثيات مشكلتك الكود صحيح تأكد من االاحداثيات كلها ثانى Link to comment
™!>VàLéNTiNô<!™ Posted April 21, 2014 Share Posted April 21, 2014 Door = createObject(980,-504.70001220703,2592.6000976563,55.200000762939,0,0,268 ) markerDoor = createMarker( -504.79998779297,2592.6000976563,52.299999237061 ,"cylinder",9,0,0,0,0) addEventHandler("onMarkerHit", markerDoor , function ( hitElement ) moveObject( Door, 1000, -504.79998779297,2593.1000976563,59.200000762939 ) end ) addEventHandler("onMarkerLeave", markerDoor , function ( hitElement ) moveObject( Door, 980,-504.70001220703,2592.6000976563,55.200000762939,0,0,268 ) end ) X اخى ماينفع تحط مسافة بين الفاصل اللى جمب markerDoor --- function وثانى شئ انت لم تقم بتحديد نوع الذى قام بلمس الماركر افرض سيارتى دخلت الماركر الباب بيفتحلها مثلا ض1 ثالث شئ فى الخروج من الماركر افرض السيارة جوا الماركر وانا فجرتها الباب بينقفل وملحوظة 980 الموجودة برجوع البوابة عند مغادرة الماركر هنا مايطلب منك رقم الاى دى للبوابة هنا يطلب منك وقت رجوع البوابة يعنى مثلا لو حطتها كذا بتلاقى البوابة رجعت فى اقل من ثانية الكود صح بس حبيت انبهك لو استخدمتها باكواد تانية الكود الصح Object = createObject(980,-504.70001220703,2592.6000976563,55.200000762939,0,0,268 ) marker = createMarker( -504.79998779297,2592.6000976563,52.299999237061 ,"cylinder",9,0,0,0,0) addEventHandler("onMarkerHit", marker, function (thePlayer) if getElementType ( thePlayer ) == "player" and not isPedInVehicle ( thePlayer ) then moveObject( Object, 1000, -504.79998779297,2593.1000976563,59.200000762939 ) end end ) addEventHandler("onMarkerLeave", marker, function (thePlayer) if getElementType ( thePlayer ) == "player" then moveObject( Object, 5000, -504.70001220703, 2592.6000976563, 55.200000762939 ) end end ) Link to comment
aBo.F[ra]G<3 Posted April 21, 2014 Author Share Posted April 21, 2014 الله يعطيك العافيهه ضبطت معي ماقصرتو كلكم Link to comment
™!>VàLéNTiNô<!™ Posted April 21, 2014 Share Posted April 21, 2014 (edited) الله يعطيك العافيهه ضبطت معي ماقصرتو كلكم حياك الله ملحوظة فى الكود اللى كان موجود اللى فات لما كانت البوابة تنزل تحت الارض بمعنى اصح المود كان مرخبط فالبوابة تختفى وماترجع تانى لان الوظيفة غلط فالمود ملخبط عند لمس الماركر والخروج منها بلمى تلمسها يمسح البوابة ماينزلها تحت الارض Edited April 21, 2014 by Guest Link to comment
aBo.F[ra]G<3 Posted April 21, 2014 Author Share Posted April 21, 2014 باقي كود اذا لمسة الماركر تظهر سياره واكون شاكرر : \ Link to comment
™!>VàLéNTiNô<!™ Posted April 21, 2014 Share Posted April 21, 2014 Vehicles = {} VehicleM = createMarker (x, y, z, "cylinder", 3, 255, 0, 0, 255 ) addEventHandler( "onMarkerHit", root, function ( hitElement ) if source == VehicleM and getElementType( hitElement ) == "player" then if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then destroyElement( Vehicles[hitElement] ) end end end ) local x,y,z = getElementPosition( hitElement ) Vehicles[hitElement] = createVehicle ( id, x, y, z ) if Vehicles[hitElement] then warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) outputChatBox( "الكلام الذي يطلع بالشات بعذ اخذ الموتر", hitElement, 255, 0, 0, true ) end addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) جرب مع اسبتدال كل من x, y, z باحداثيات الماركر id رقم اى دى السيارة Link to comment
K1NG Posted April 21, 2014 Share Posted April 21, 2014 Vehicles = {} VehicleM = createMarker (x, y, z, "cylinder", 3, 255, 0, 0, 255 ) addEventHandler( "onMarkerHit", root, function ( hitElement ) if source == VehicleM and getElementType( hitElement ) == "player" then if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then destroyElement( Vehicles[hitElement] ) end end end ) local x,y,z = getElementPosition( hitElement ) Vehicles[hitElement] = createVehicle ( id, x, y, z ) if Vehicles[hitElement] then warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) outputChatBox( "الكلام الذي يطلع بالشات بعذ اخذ الموتر", hitElement, 255, 0, 0, true ) end addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) جرب مع اسبتدال كل من x, y, z باحداثيات الماركر id رقم اى دى السيارة . لابغيت تنسخ وتلصق ، إنسخ زين يابني Link to comment
aBo.F[ra]G<3 Posted April 21, 2014 Author Share Posted April 21, 2014 Vehicles = {} VehicleM = createMarker (-487.29998779297, 2590.8000488281, 52.099998474121, "cylinder", 3, 255, 0, 0, 255 ) addEventHandler( "onMarkerHit", root, function ( hitElement ) if source == VehicleM and getElementType( hitElement ) == "player" then if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then destroyElement( Vehicles[hitElement] ) end end end ) local x,y,z = getElementPosition( hitElement ) Vehicles[hitElement] = createVehicle ( FCR-900, -487.29998779297, 2591, 52.700000762939 ) if Vehicles[hitElement] then warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) outputChatBox( "M", hitElement, 255, 0, 0, true ) end addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) سويت مثل ماقلت بس لم يظهر لي شي بعد مادخلت الماركر Link to comment
™!>VàLéNTiNô<!™ Posted April 21, 2014 Share Posted April 21, 2014 Vehicles = {} VehicleM = createMarker (x, y, z, "cylinder", 3, 255, 0, 0, 255 ) addEventHandler( "onMarkerHit", root, function ( hitElement ) if source == VehicleM and getElementType( hitElement ) == "player" then if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then destroyElement( Vehicles[hitElement] ) end end end ) local x,y,z = getElementPosition( hitElement ) Vehicles[hitElement] = createVehicle ( id, x, y, z ) if Vehicles[hitElement] then warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) outputChatBox( "الكلام الذي يطلع بالشات بعذ اخذ الموتر", hitElement, 255, 0, 0, true ) end addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) جرب مع اسبتدال كل من x, y, z باحداثيات الماركر id رقم اى دى السيارة . لابغيت تنسخ وتلصق ، إنسخ زين يابني ؟؟؟؟؟؟؟؟؟ Link to comment
™!>VàLéNTiNô<!™ Posted April 21, 2014 Share Posted April 21, 2014 Vehicles = {} VehicleM = createMarker (-487.29998779297, 2590.8000488281, 52.099998474121, "cylinder", 3, 255, 0, 0, 255 ) addEventHandler( "onMarkerHit", root, function ( hitElement ) if source == VehicleM and getElementType( hitElement ) == "player" then if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then destroyElement( Vehicles[hitElement] ) end end end ) local x,y,z = getElementPosition( hitElement ) Vehicles[hitElement] = createVehicle ( FCR-900, -487.29998779297, 2591, 52.700000762939 ) if Vehicles[hitElement] then warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) outputChatBox( "M", hitElement, 255, 0, 0, true ) end addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) سويت مثل ماقلت بس لم يظهر لي شي بعد مادخلت الماركر شوف Vehicles[hitElement] = createVehicle ( FCR-900, -487.29998779297, 2591, 52.700000762939 ) FCR-900 خطا رقم الاى دى بدلها وحط 514 بيصير الكود كدا Vehicles = {} VehicleM = createMarker (-487.29998779297, 2590.8000488281, 52.099998474121, "cylinder", 3, 255, 0, 0, 255 ) addEventHandler( "onMarkerHit", root, function ( hitElement ) if source == VehicleM and getElementType( hitElement ) == "player" then if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then destroyElement( Vehicles[hitElement] ) end end end ) local x,y,z = getElementPosition( hitElement ) Vehicles[hitElement] = createVehicle ( 514, -487.29998779297, 2591, 52.700000762939 ) if Vehicles[hitElement] then warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) outputChatBox("#ffff00تم منحك السيارة #00ff00بنجاح", hitElement, 255, 255, 255, true ) end addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) Link to comment
aBo.F[ra]G<3 Posted April 21, 2014 Author Share Posted April 21, 2014 ضبط معي لاكن شغلت المود طلع الماركر والسياره مع بعض انا ابي لما ادخل الماركر تطلع السياره Link to comment
K1NG Posted April 21, 2014 Share Posted April 21, 2014 . لابغيت تنسخ وتلصق ، إنسخ زين يابني ؟؟؟؟؟؟؟؟؟ )= لا أبد سلامتك يا مسكين Vehicles = {} VehicleM = createMarker (-487.29998779297, 2590.8000488281, 52.099998474121, "cylinder", 3, 255, 0, 0, 255 ) addEventHandler( "onMarkerHit", root, function ( hitElement ) if source == VehicleM and getElementType( hitElement ) == "player" then if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then destroyElement( Vehicles[hitElement] ) end end end ) local x,y,z = getElementPosition( hitElement ) Vehicles[hitElement] = createVehicle ( FCR-900, -487.29998779297, 2591, 52.700000762939 ) if Vehicles[hitElement] then warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) outputChatBox( "M", hitElement, 255, 0, 0, true ) end addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) سويت مثل ماقلت بس لم يظهر لي شي بعد مادخلت الماركر شوف Vehicles[hitElement] = createVehicle ( FCR-900, -487.29998779297, 2591, 52.700000762939 ) FCR-900 خطا رقم الاى دى بدلها وحط 514 بيصير الكود كدا Vehicles = {} VehicleM = createMarker (-487.29998779297, 2590.8000488281, 52.099998474121, "cylinder", 3, 255, 0, 0, 255 ) addEventHandler( "onMarkerHit", root, function ( hitElement ) if source == VehicleM and getElementType( hitElement ) == "player" then if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then destroyElement( Vehicles[hitElement] ) end end end ) local x,y,z = getElementPosition( hitElement ) Vehicles[hitElement] = createVehicle ( 514, -487.29998779297, 2591, 52.700000762939 ) if Vehicles[hitElement] then warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) outputChatBox("#ffff00تم منحك السيارة #00ff00بنجاح", hitElement, 255, 255, 255, true ) end addEventHandler( "onVehicleExplode", root, function( ) setTimer( destroyElement, 2000, 1, source ) end ) addEventHandler( "onPlayerQuit", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) 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