Jump to content

تعديل كود فتح البوابه لرتبة معينة *


JN[T]OoOoL

Recommended Posts

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

 

أخباركم وشعلومكم بغيت مساعده في شغلة بسيطه محتاجها ضروري

Door = createObject(980,2481.1999511719,-1742.4000244141,15.300000190735,0,0,0)
markerDoor =createMarker(2481.1000976563,-1743.0999755859,13.5,'cylinder',12,0,0,0,0)

addEventHandler('onMarkerHit',markerDoor,
function(hitElement)
if getElementData(hitElement,'Group') == 'PDK6' then
moveObject(Door,1000,2481.1999511719,-1742.4000244141,19.799999237061)
end
end
)

addEventHandler('onMarkerLeave',markerDoor,
function(hitElement)
if getElementData(hitElement,'Group') == 'PDK6' then
moveObject(Door,1000,2481.1999511719,-1742.4000244141,15.300000190735)
end
end
)

طبعا ذا الكود زي مو معروف انه يسوي بوابه تفتح لقروب معين او تيم معين

الي  ابيه تعديل بسيط انها تفتح لرتبة معينه أنا اضيفها بالاسل

مثال ابيها تفتح للكونسول فقط  يعني ادمن ماتفتحله

أرجو المساعده في ذلك وأكون ممنون لكم

فامان الله .

Link to comment
Door = createObject(980,2481.1999511719,-1742.4000244141,15.300000190735,0,0,0)
markerDoor =createMarker(2481.1000976563,-1743.0999755859,13.5,'cylinder',12,0,0,0,0)

addEventHandler('onMarkerHit',markerDoor,
function(hitElement)
local acc = getPlayerAccount ( hitElement )
if isObjectInACLGroup("user."..getAccountName(acc), aclGetGroup("Console")) then -- اسم القروب حق الرتبة
moveObject(Door,1000,2481.1999511719,-1742.4000244141,19.799999237061)
end
end
)

addEventHandler('onMarkerLeave',markerDoor,
function(hitElement)
local acc = getPlayerAccount ( hitElement )
if isObjectInACLGroup("user."..getAccountName(acc), aclGetGroup("Console")) then -- اسم القروب حق الرتبة
moveObject(Door,1000,2481.1999511719,-1742.4000244141,15.300000190735)
end
end
)

غير مجرب -

Edited by #RoLde
Link to comment
13 minutes ago, #RoLde said:

Door = createObject(980,2481.1999511719,-1742.4000244141,15.300000190735,0,0,0)
markerDoor =createMarker(2481.1000976563,-1743.0999755859,13.5,'cylinder',12,0,0,0,0)

addEventHandler('onMarkerHit',markerDoor,
function(hitElement)
local acc = getPlayerAccount ( hitElement )
if isObjectInACLGroup("user."..getAccountName(acc), aclGetGroup("Console")) then -- اسم القروب حق الرتبة
moveObject(Door,1000,2481.1999511719,-1742.4000244141,19.799999237061)
end
end
)

addEventHandler('onMarkerLeave',markerDoor,
function(hitElement)
local acc = getPlayerAccount ( hitElement )
if isObjectInACLGroup("user."..getAccountName(acc), aclGetGroup("Console")) then -- اسم القروب حق الرتبة
moveObject(Door,1000,2481.1999511719,-1742.4000244141,15.300000190735)
end
end
)

غير مجرب -

بيض الله وجهك وماقصرت أشكرك على سرعة الرد

ولاهنت

أرجو اغلاق الموضوع تمت الافادة .

Link to comment
On ٢١‏/٩‏/٢٠١٧ at 18:27, Abdul KariM said:

المفروض يكون فيه تحقق من الالمنت الي دخل الماركر

ممكن يكون سيارة وراح يصير فيه بقات

 

22 hours ago, N3xT said:

وأيضاً المفروض يكون فيه تحقق أن فيه حساب مب زائر

المفروض كذا لكن ماتحتاج كل ذا  لكن اذا عندك دزها هنا مافي مشكلة:D

Link to comment

جرب كذا :

Door = createObject(980,2481.1999511719,-1742.4000244141,15.300000190735,0,0,0)
markerDoor = createMarker(2481.1000976563,-1743.0999755859,13.5,'cylinder',12,0,0,0,0)

function doorMove ( hitElement )
local acc = getPlayerAccount ( hitElement )
    if ( getElementType ( hitElement ) == 'player' and not isGuestAccount ( acc ) and isObjectInACLGroup ( 'user.' .. getAccountName ( acc ), aclGetGroup ( 'Console' ) ) ) then
        if ( eventName == 'onMarkerHit' ) then
            moveObject ( Door, 1000, 2481.1999511719, -1742.4000244141, 19.799999237061 )
                elseif ( eventName == 'onMarkerLeave' ) then
            moveObject ( Door, 1000,2481.1999511719, -1742.4000244141,15.300000190735 )
        end
    end
end

addEventHandler ( 'onMarkerHit', markerDoor, doorMove )
addEventHandler ( 'onMarkerLeave', markerDoor, doorMove )

 

Link to comment
31 minutes ago, #,+( _xiRoc[K]; > said:

جرب كذا :


Door = createObject(980,2481.1999511719,-1742.4000244141,15.300000190735,0,0,0)
markerDoor = createMarker(2481.1000976563,-1743.0999755859,13.5,'cylinder',12,0,0,0,0)

function doorMove ( hitElement )
local acc = getPlayerAccount ( hitElement )
    if ( getElementType ( hitElement ) == 'player' and not isGuestAccount ( acc ) and isObjectInACLGroup ( 'user.' .. getAccountName ( acc ), aclGetGroup ( 'Console' ) ) ) then
        if ( eventName == 'onMarkerHit' ) then
            moveObject ( Door, 1000, 2481.1999511719, -1742.4000244141, 19.799999237061 )
                elseif ( eventName == 'onMarkerLeave' ) then
            moveObject ( Door, 1000,2481.1999511719, -1742.4000244141,15.300000190735 )
        end
    end
end

addEventHandler ( 'onMarkerHit', markerDoor, doorMove )
addEventHandler ( 'onMarkerLeave', markerDoor, doorMove )

 

اتوقع eventname 
مش معرفة 

Link to comment
3 minutes ago, MR.StoRm said:

اتوقع eventname 
مش معرفة 

https://forum.multitheftauto.com/topic/33407-list-of-predefined-variables/

 

1 minute ago, Abdul KariM said:

@#,+( _xiRoc[K]; > getPlayerAccount راح يظهر بق فيها لازم تحطها بعد التحقق من نوع الالمنت

صحيح كلامك مانتبهت كذا يصير الكود :

Door = createObject(980,2481.1999511719,-1742.4000244141,15.300000190735,0,0,0)
markerDoor = createMarker(2481.1000976563,-1743.0999755859,13.5,'cylinder',12,0,0,0,0)

function doorMove ( hitElement )
if ( getElementType ( hitElement ) == 'player' ) then
    local acc = getPlayerAccount ( hitElement )
        if ( not isGuestAccount ( acc ) and isObjectInACLGroup ( 'user.' .. getAccountName ( acc ), aclGetGroup ( 'Console' ) ) ) then
            if ( eventName == 'onMarkerHit' ) then
                moveObject ( Door, 1000, 2481.1999511719, -1742.4000244141, 19.799999237061 )
                    elseif ( eventName == 'onMarkerLeave' ) then
                moveObject ( Door, 1000,2481.1999511719, -1742.4000244141,15.300000190735 )
            end
        end
    end
end

addEventHandler ( 'onMarkerHit', markerDoor, doorMove )
addEventHandler ( 'onMarkerLeave', markerDoor, doorMove )

 

Edited by #,+( _xiRoc[K]; >
Link to comment
53 minutes ago, #,+( _xiRoc[K]; > said:

https://forum.multitheftauto.com/topic/33407-list-of-predefined-variables/

 

صحيح كلامك مانتبهت كذا يصير الكود :


Door = createObject(980,2481.1999511719,-1742.4000244141,15.300000190735,0,0,0)
markerDoor = createMarker(2481.1000976563,-1743.0999755859,13.5,'cylinder',12,0,0,0,0)

function doorMove ( hitElement )
if ( getElementType ( hitElement ) == 'player' ) then
    local acc = getPlayerAccount ( hitElement )
        if ( not isGuestAccount ( acc ) and isObjectInACLGroup ( 'user.' .. getAccountName ( acc ), aclGetGroup ( 'Console' ) ) ) then
            if ( eventName == 'onMarkerHit' ) then
                moveObject ( Door, 1000, 2481.1999511719, -1742.4000244141, 19.799999237061 )
                    elseif ( eventName == 'onMarkerLeave' ) then
                moveObject ( Door, 1000,2481.1999511719, -1742.4000244141,15.300000190735 )
            end
        end
    end
end

addEventHandler ( 'onMarkerHit', markerDoor, doorMove )
addEventHandler ( 'onMarkerLeave', markerDoor, doorMove )

 

ايضا غير معرفة ض

  • Haha 1
  • Confused 2
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...