Jump to content

مساعده في برمجة مقر


Recommended Posts

 السلام عليكم ورحمة الله وبركاته

 شباب احتاج مساعده في كود اذا سمحتوا

-- زر الفتح
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
  • Moderators
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

 

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 by GoNeOr.HosT
  • Haha 1
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...