mostafaalal Posted January 21, 2016 Share Posted January 21, 2016 الكود متاكد اني حاط كل شي صح بس لما اقرب من البوابة ما يصير شي وبالهي ابي يصير للبوابة لكمة مرور كيف؟ Object = createObject(2990,1004,-643.5,124.30000305176,0,357.99499511719,201.99462890625) -- انشاء اوبجكت بدل المطلوب Move = createMarker(1003.4000244141,-643.5,120.120.30000305176,'cylinder',7,0,0,0 ) -- بدل الاكس و الواي والزد للاحدثيات حقتك addEventHandler('onMarkerHit', root, -- حدث عند لمس المركر function( hPlayer ) -- فنكشن if ( source == Move ) then -- تحقق بان المركر الـلمسه = Move moveObject( Object,1000,1004,-643.5,130.80000305176) -- المكان الراح يتحرك له الاوبجكت او البوابه end -- اغلاق الفنكشن end -- اغلاق التحقق ) -- قوس لاغلاق الحدث addEventHandler('onMarkerLeave', root, -- عند الخروج من المركر function( hPlayer ) -- فنكشنك if ( source == Move ) then -- تحقق بان المركر التركه = Move moveObject( Object,1000,1004,-643.5,124.30000305176 ) -- المكان الراح يرجع له الاوبجكت end -- قفل للفنكشن end -- قفل للتحقق ) -- الكود الثاني ماخذه من واحد اول ما اقرب البوابة تنفتح بس تجلس مسكرة كيف؟ مدري كانه بوابتين فوق بعض البوابة 1 والبوابة 2 البوابة 1 تنفتح والبوابة 2 تجلس في مكانها ويصير كان البوابة مسكرة(كانه ما صار شي)اتمنى وصلت الفكرة هذا الكود Door3 = createObject(2990,1004,-643.5,124.30000305176,0,357.98950195313,201.99462890625) markerDoor3 = createMarker(1003.5999755859,-643.79998779297,120.30000305176,'cylinder',10,0,0,0,0) addEventHandler('onMarkerHit',markerDoor3, function ( hitElement ) moveObject(Door3,1000,1004,-643.5,129.80000305176) end ) addEventHandler('onMarkerLeave',markerDoor3, function ( hitElement ) moveObject(Door3,1000,1004,-643.5,124.30000305176) end ) ابيه نفس الشي بكلمة مرور ...... Link to comment
Jupi Posted January 24, 2016 Share Posted January 24, 2016 Door3 = createObject(2990,1004,-643.5,124.30000305176,0,357.98950195313,201.99462890625) addCommandHandler("كلمة مرور الفتح", function () moveObject(Door3,1000,1004,-643.5,129.80000305176) end ) addCommandHandler("كلمة مرور الاغلاق", function ( ) moveObject(Door3,1000,1004,-643.5,124.30000305176) 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