SycroX Posted February 12, 2016 Posted February 12, 2016 سلام عليكم الحين انا مسوي لما اللاعب يدوس زر و يكون جوا ماركر يحرك البوابة المشكلة ان المود ما يشتغل البوابة ما تتحرك bd = createObject ( 5856, 1470.599, -1794.8, 624.5, 0, 0, 0) setElementInterior(bd, 6) e2 = createObject ( 5856, 1470.555, -1729.189, 624.5, 0, 0, 0) setElementInterior(e2, 6) markerDoorbd = createMarker(1470.5661621094,-1795.1608886719,622.47814941406,'cylinder',5,0,0,255,255) setElementInterior(markerDoorbd, 6) markerDoore2 = createMarker(1470.8516845703,-1729.3052978516,622.47814941406,'cylinder',5,0,0,255,255) setElementInterior(markerDoore2, 6) bindKey("tab", "down", function (KeyPresser) if isElementWithinMarker(KeyPresser, markerDoorbd) and getTeamName(getPlayerTeam(KeyPresser)) == "Police" then if getElementPosition(bd, 1470.599, -1794.8, 624.5) then moveObject(bd, 500, 1470.599, -1794.8, 627.5) else moveObject(bd, 500, 1470.599, -1794.8, 624.5) end elseif isElementWithinMarker(KeyPresser, markerDoore2) and getTeamName(getPlayerTeam(KeyPresser)) == "Police" then if getElementPosition(e2, 1470.555, -1729.189, 624.5) then moveObject (e2, 500, 1470.555, -1729.189, 627.5) else moveObject(e2, 500, 1470.555, -1729.189, 624.5) end end end )
MrSAUD1 Posted February 13, 2016 Posted February 13, 2016 local Object = createObject ( ID, x, y, z, rx, ry, rz ) local Marker = createMarker ( x, y, z, "cylinder", size, 0, 0, 0, 0 ) function OpenObject ( player ) if isElementWithinMarker ( player, Marker ) then local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Group Name" ) ) then if not Open then moveObject ( Object, 1500, moveX, moveY, moveZ ) else moveObject ( Object, 1500, x, y, z ) end Open = not Open else outputChatBox ( "* You must be 'Group Name' !", player, 200, 0, 0, true ) end end end addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, v in ipairs ( getElementsByType ( "player" ) ) do bindKey ( v, "tab", "down", OpenObject ) end end ) addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "tab", "down", OpenObject ) end ) الإستبدآل , السسطر الأول , ID = رقم الأوبجكت x, y, z = إحداثيات الأوبجكت rx, ry, rz = إحداثيات دوران الأوبجكت / إذا تبيه بدون دوران خلها كلها صفر ( 0 ) ذذ السسطر الثآني , x, y, z = إحداثيات الماركر الي إذا كنت فيه وتكبس زر تاب يفتح البوابة او يقفلها size = حجم الماركر السسطر السآبع , Group Name = إسم القروب الي تبي الأوبجكت يفتح له فقط السسطر التآسع , moveX, moveY, moveZ = إحداثيات الأوبجكت عند تحريكه السسطر الحآدي عشر ( 11 ) ذذ , x, y, z = إحداثيات الأوبجكت عند رجوعه / خلها مثل احداثيات إنشاء الأوبجكت الي بالسطر الأول السسطر الخآمس عششر ( 15 ) ذذ , Group Name = إسم القروب الي تبي الأوبجكت يفتح له فقط بدل التحقق من قروب الى تيم ,
Me[Z]oO Posted February 13, 2016 Posted February 13, 2016 هو سيرفره حرب عصابات اكيد يقصد بالسجن يسوي ماركر امام كل بوابة مشان المساجين وهيك
SycroX Posted February 13, 2016 Author Posted February 13, 2016 ما ظبتت طريقتك يا سعود الحين انا جربت اعمل تريقر من الكلنت للسيرفر بس المشكلة البوابة تطلع ما تنزل --#Server bd = createObject ( 5856, 1470.599, -1794.8, 624.5, 0, 0, 0) setElementInterior(bd, 1) e2 = createObject ( 5856, 1470.555, -1729.189, 624.5, 0, 0, 0) setElementInterior(e2, 1) markerDoorbd = createMarker(1470.5661621094,-1795.1608886719,622.47814941406,'cylinder',5,0,255,255,0) setElementInterior(markerDoorbd, 1) markerDoore2 = createMarker(1470.8516845703,-1729.3052978516,622.47814941406,'cylinder',5,0,255,255,0) setElementInterior(markerDoore2, 1) addEvent("openDoor", true) addEventHandler("openDoor", root, function() if isElementWithinMarker(source, markerDoorbd) and getTeamName(getPlayerTeam(source)) == "Police" then if getElementPosition(bd, 1470.599, -1794.8, 624.5) then moveObject(bd, 500, 1470.599, -1794.8, 627.5) else moveObject(bd, 500, 1470.599, -1794.8, 624.5) end elseif isElementWithinMarker(source, markerDoore2) and getTeamName(getPlayerTeam(source)) == "Police" then if getElementPosition(e2, 1470.555, -1729.189, 624.5) then moveObject (e2, 500, 1470.555, -1729.189, 627.5) else moveObject(e2, 500, 1470.555, -1729.189, 624.5) end end end ) --#Client bindKey("tab", "down", function () triggerServerEvent("openDoor", localPlayer) end )
!#NssoR_) Posted February 14, 2016 Posted February 14, 2016 --#Server bd = createObject ( 5856, 1470.599, -1794.8, 624.5, 0, 0, 0) setElementInterior(bd, 1) e2 = createObject ( 5856, 1470.555, -1729.189, 624.5, 0, 0, 0) setElementInterior(e2, 1) markerDoorbd = createMarker(1470.5661621094,-1795.1608886719,622.47814941406,'cylinder',5,0,255,255,0) setElementInterior(markerDoorbd, 1) markerDoore2 = createMarker(1470.8516845703,-1729.3052978516,622.47814941406,'cylinder',5,0,255,255,0) setElementInterior(markerDoore2, 1) addEvent("openDoor", true) addEventHandler("openDoor", root, function() if isElementWithinMarker(source, markerDoorbd) and getTeamName(getPlayerTeam(source)) == "Police" then local _,_,z = getElementPosition(bd) if ( z <= 625 ) then moveObject(bd, 500, 1470.599, -1794.8, 627.5) else moveObject(bd, 500, 1470.599, -1794.8, 624.5) end elseif isElementWithinMarker(source, markerDoore2) and getTeamName(getPlayerTeam(source)) == "Police" then local _,_,z = getElementPosition(e2) if ( z <= 625 ) then moveObject (e2, 500, 1470.555, -1729.189, 627.5) else moveObject(e2, 500, 1470.555, -1729.189, 624.5) end end end )
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