Ahmed Tawfek Posted August 20, 2016 Share Posted August 20, 2016 السلام عليكم و رحمة الله و بركاته عايز اعمل بوابه و بالمكان ميدخلوش مثلاً غير الادمن و الكونسل ايه الحاجات الي احتاجها Link to comment
Vunili Posted August 20, 2016 Share Posted August 20, 2016 createObject isObjectInACLGroup moveObject Link to comment
Ahmed Tawfek Posted August 20, 2016 Author Share Posted August 20, 2016 مكان مخصوص زي المقرات يدخله الكونسول و الادمن Link to comment
Mhmd.z Posted August 20, 2016 Share Posted August 20, 2016 createObject createMarker "onMarkerHit" "onMarkerLeave" isObjectInACLGroup moveObject Link to comment
Rockyz Posted August 20, 2016 Share Posted August 20, 2016 ممكن مثال اطرح محاولتك اعدلها لك Link to comment
^iiEcoo'x_) Posted August 20, 2016 Share Posted August 20, 2016 انصحك باستخدام الكول شيب اذا مسوي مثل المقر Link to comment
#Alwaeli Posted August 20, 2016 Share Posted August 20, 2016 تفضل . AllowedGroups القروب الي تريده يفتح له البوابة حط اسمه في local AllowedGroups = {"Console","Admin"}; local x,y,z = -720.03876, 971.34381 ,12.13281 local time = 800 local Gate = createObject(980, x,y,z, 0, 0,90) local MarkerBeb = createMarker(x,y,z-1, "cylinder", 10, 0, 0, 0, 0) function isPlayerInAllowedGroups(player) if not isGuestAccount(getPlayerAccount(player)) then for k,v in ipairs ( AllowedGroups ) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) ) then return true end end end end function MoveGate(player) if getElementType(player) == "player" then if isPlayerInAllowedGroups( player ) then moveObject(Gate, time, -720.03876, 971.34381+4 ,12.13281) else end end end addEventHandler("onMarkerHit", MarkerBeb, MoveGate) function MoveBack(player) if getElementType(player) == "player" then if isPlayerInAllowedGroups( player ) then moveObject(Gate, time, -720.03876, 971.34381 ,12.13281) end end end addEventHandler("onMarkerLeave", MarkerBeb, MoveBack) Link to comment
Ahmed Tawfek Posted August 20, 2016 Author Share Posted August 20, 2016 تفضل . AllowedGroups القروب الي تريده يفتح له البوابة حط اسمه في local AllowedGroups = {"Console","Admin"}; local x,y,z = -720.03876, 971.34381 ,12.13281 local time = 800 local Gate = createObject(980, x,y,z, 0, 0,90) local MarkerBeb = createMarker(x,y,z-1, "cylinder", 10, 0, 0, 0, 0) function isPlayerInAllowedGroups(player) if not isGuestAccount(getPlayerAccount(player)) then for k,v in ipairs ( AllowedGroups ) do if ( isObjectInACLGroup("user." .. getAccountName(getPlayerAccount(player)), aclGetGroup(v)) ) then return true end end end end function MoveGate(player) if getElementType(player) == "player" then if isPlayerInAllowedGroups( player ) then moveObject(Gate, time, -720.03876, 971.34381+4 ,12.13281) else end end end addEventHandler("onMarkerHit", MarkerBeb, MoveGate) function MoveBack(player) if getElementType(player) == "player" then if isPlayerInAllowedGroups( player ) then moveObject(Gate, time, -720.03876, 971.34381 ,12.13281) end end end addEventHandler("onMarkerLeave", MarkerBeb, MoveBack) تسلم ايدك 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