GoNeOr.HosT Posted January 24, 2018 Share Posted January 24, 2018 السلام عليكم ورحمة الله وبركاته شباب احتاج مساعده في كود اذا سمحتوا -- زر الفتح Door1 = createObject(3095,1872.8000488281,1312.8000488281,17.5,0,90,89.983520507813) function opendoor() moveObject (Door1,4000,1872.8000488281,1312.8000488281,11.5) end addCommandHandler("1", opendoor) -- زر الاغلاق function closedoor() moveObject(Door1,4000,1872.8000488281,1312.8000488281,17.5) end addCommandHandler("2", closedoor) طبعا يا شباب هذا الكود فوق لكن ابي الباب يفتح برقم واحد يعني لما اكتب في اف 8 : رقم ( 1 ) يفتح معي ولما اكتبه مره ثانية يسكر الباب صراحه ما عرفت اسويه لاني باقي ببداية البرمجة ومب محترف مره بلنهايه انتظر مساعدتكم وشرحكم وشكرا Link to comment
!#NssoR_) Posted January 24, 2018 Share Posted January 24, 2018 Door1 = createObject(3095,1872.8000488281,1312.8000488281,17.5,0,90,89.983520507813) doorState = false function opendoor() if not ( doorState ) then moveObject (Door1,4000,1872.8000488281,1312.8000488281,11.5) doorState = true else moveObject(Door1,4000,1872.8000488281,1312.8000488281,17.5) doorState = false end end addCommandHandler("1", opendoor) Link to comment
GoNeOr.HosT Posted January 24, 2018 Author Share Posted January 24, 2018 (edited) 4 minutes ago, !#NssoR_) said: Door1 = createObject(3095,1872.8000488281,1312.8000488281,17.5,0,90,89.983520507813) doorState = false function opendoor() if not ( doorState ) then moveObject (Door1,4000,1872.8000488281,1312.8000488281,11.5) doorState = true else moveObject(Door1,4000,1872.8000488281,1312.8000488281,17.5) doorState = false end end addCommandHandler("1", opendoor) شكرا لك اخي نصور تعبتك معي وشكرا #Himoo - شكرا لك اخي هيمو لمساعدك الدائمه لي بسكايب Edited January 24, 2018 by GoNeOr.HosT 1 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