MA[S]RIY Posted June 18, 2016 Share Posted June 18, 2016 السلام عليكم شباب ابي كود مقدره دخول المركر رتبه معينه يعني الي يقدرون يدخلون الماركر يكون رتبه معينه والي مب في الرتبه ما يقدر يدخل الماركر وشكرا Link to comment
MA[S]RIY Posted June 18, 2016 Author Share Posted June 18, 2016 كده صح يا اخي isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup("Police")) then Link to comment
Adham Posted June 18, 2016 Share Posted June 18, 2016 if isObjectInACLGroup ( "user." .. getAccountName ( playerAcc ), aclGetGroup ( "Police" ) ) نقصك عرف local playerAcc = getPlayerAccount ( player ) if not isGuestAccount ( playerAcc ) then Link to comment
Me[Z]oO Posted June 18, 2016 Share Posted June 18, 2016 السلام عليكم شباب ابي كود مقدره دخول المركر رتبه معينه يعني الي يقدرون يدخلون الماركر يكون رتبه معينه والي مب في الرتبه ما يقدر يدخل الماركر وشكرا marker = createMarker(x,y,z,"cylinder",1.5,0,255,0,255) addEventHandler("onMarkerHit",root, function (mz) local accName = getAccountName ( getPlayerAccount ( mz) ) if source == marker and getElementType(mz) == "player" then if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then outputChatBox("هلا بك",mz) else outputChatBox("لست بقروب الادمن",mz) end end end) Link to comment
Abdul KariM Posted June 18, 2016 Share Posted June 18, 2016 السلام عليكم شباب ابي كود مقدره دخول المركر رتبه معينه يعني الي يقدرون يدخلون الماركر يكون رتبه معينه والي مب في الرتبه ما يقدر يدخل الماركر وشكرا marker = createMarker(x,y,z,"cylinder",1.5,0,255,0,255) addEventHandler("onMarkerHit",root, function (mz) local accName = getAccountName ( getPlayerAccount ( mz) ) if source == marker and getElementType(mz) == "player" then if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then outputChatBox("هلا بك",mz) else outputChatBox("لست بقروب الادمن",mz) end end end) ناقصك isGuestAccount + رتب كودكك Link to comment
MA[S]RIY Posted June 18, 2016 Author Share Posted June 18, 2016 طيب يا اخي سوي انت الي ناقصه Link to comment
Ahmed Ly Posted June 18, 2016 Share Posted June 18, 2016 Gp = { {"Admin"}, {"Console"}, } marker = createMarker(-460.49576,1046.28235,11.03125,"cylinder",1.5,0,255,0,255) addEventHandler("onMarkerHit",marker, function (plr) local accName = getAccountName ( getPlayerAccount ( plr) ) if isGuestAccount(accName) then outputChatBox("--") return end for _,v in ipairs (Gp) do if isObjectInACLGroup ("user."..accName, aclGetGroup (v[1]) ) then outputChatBox("هلا بك",plr,0,255,0) else outputChatBox("لست بقروب الادمن",plr,0,255,0) end end end ) Link to comment
Abdul KariM Posted June 18, 2016 Share Posted June 18, 2016 Gp = { {"Admin"}, {"Console"}, } marker = createMarker(-460.49576,1046.28235,11.03125,"cylinder",1.5,0,255,0,255) addEventHandler("onMarkerHit",marker, function (plr) local accName = getAccountName ( getPlayerAccount ( plr) ) if isGuestAccount(accName) then outputChatBox("--") return end for _,v in ipairs (Gp) do if isObjectInACLGroup ("user."..accName, aclGetGroup (v[1]) ) then outputChatBox("هلا بك",plr,0,255,0) else outputChatBox("لست بقروب الادمن",plr,0,255,0) end end end ) ناقصك تحققات بعد , و تحتاج break عشان مايكرر الوظيفة Link to comment
Ahmed Ly Posted June 18, 2016 Share Posted June 18, 2016 Gp = { {"Admin"}, {"Console"}, } marker = createMarker(-460.49576,1046.28235,11.03125,"cylinder",1.5,0,255,0,255) addEventHandler("onMarkerHit",marker, function (plr) local accName = getAccountName ( getPlayerAccount ( plr) ) if isGuestAccount(accName) then outputChatBox("--") return end for _,v in ipairs (Gp) do if isObjectInACLGroup ("user."..accName, aclGetGroup (v[1]) ) then outputChatBox("هلا بك",plr,0,255,0) else outputChatBox("لست بقروب الادمن",plr,0,255,0) end end end ) ناقصك تحققات بعد , و تحتاج break عشان مايكرر الوظيفة قصدك كذا ؟ if _ == 1 then break Link to comment
Ahmed Ly Posted June 18, 2016 Share Posted June 18, 2016 جرب هدا احسن Gp = { {"Admin"}, {"Console"} } marker = createMarker(-460.49576,1046.28235,11.03125,"cylinder",1.5,0,255,0,255) addEventHandler("onMarkerHit",marker, function (plr) local accName = getAccountName ( getPlayerAccount ( plr) ) if isGuestAccount(getPlayerAccount(plr)) then outputChatBox("--",plr,0,255,0) return end for _,v in ipairs (Gp) do if isObjectInACLGroup ("user."..accName, aclGetGroup (v[1]) ) then outputChatBox("هلا بك",plr,0,255,0) if _ == 1 then break else outputChatBox("لست بقروب الادمن",plr,0,255,0) end end end end ) Link to comment
!#NssoR_) Posted June 18, 2016 Share Posted June 18, 2016 Gp = { {"Admin"}, {"Console"} } marker = createMarker(-460.49576,1046.28235,11.03125,"cylinder",1.5,0,255,0,255) addEventHandler("onMarkerHit",marker, function (plr) if ( getElementType(plr) == 'player' ) then if isGuestAccount(getPlayerAccount(plr)) then outputChatBox("سجل دخولك",plr,0,255,0) return end local accName = getAccountName ( getPlayerAccount ( plr) ) for _,v in ipairs (Gp) do if isObjectInACLGroup ("user."..accName, aclGetGroup (v[1]) ) then outputChatBox("هلا بك",plr,0,255,0) break else outputChatBox("لست بقروب الادمن",plr,0,255,0) end end end end,false ) Link to comment
MA[S]RIY Posted June 19, 2016 Author Share Posted June 19, 2016 شباب الكود سرفر ولا كلينت Link to comment
Abdul KariM Posted June 19, 2016 Share Posted June 19, 2016 سيرفر , ماتعرف تفرق بين الكلينت والسيرفر ؟ Link to comment
MA[S]RIY Posted June 19, 2016 Author Share Posted June 19, 2016 هلا شباب شوفو هذه اكواد الماركر local Manstermarker = createMarker(1557.0914306641,-1675.5815429688,15.1953125, "cylinder", 2, 10, 10, 10) local Manstermarker2 = createMarker(246.66790771484,60.885829925537,1002.640625, "cylinder", 2, 10, 10, 10) setElementInterior(Manstermarker2, 6) addEventHandler('onMarkerHit',root, function(player) if getElementType(player) == 'player' and not isPedInVehicle(player) and source == Manstermarker then setElementInterior(player, 6) -- Interior رقم العالم الي هو setElementPosition(player, 246.68006896973,66.743522644043,1003.640625) elseif source == Manstermarker2 then setElementInterior(player, 0) -- نحطه في العالم الاصلي setElementPosition(player, 1550.4233398438,-1675.3825683594,15.399993896484) end end ) معلش ابيكوت تركبوه مع الكود Link to comment
Ahmed Ly Posted June 19, 2016 Share Posted June 19, 2016 local Manstermarker = createMarker(2482.02954,-1663.32288,13.34375, "cylinder", 2, 10, 10, 10) local Manstermarker2 = createMarker(246.66790771484,60.885829925537,1002.640625, "cylinder", 2, 10, 10, 10) setElementInterior(Manstermarker2, 6) addEventHandler('onMarkerHit',Manstermarker, function(player) local accName = getAccountName ( getPlayerAccount ( player) ) if isPedInVehicle(player) then outputChatBox("لا يمكن الدخول بـــــــــــــ سياره",player,0,255,0) return end if isGuestAccount(getPlayerAccount(player)) then outputChatBox(" يجب عليك تسجيل الدخول",player,0,255,0) return end if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then outputChatBox("هلا بك",player,0,255,0) setElementInterior(player, 6) -- Interior رقم العالم الي هو setElementPosition(player, 246.68006896973,66.743522644043,1003.640625) else outputChatBox("لست بقروب الادمن",player,0,255,0) end end ) addEventHandler('onMarkerHit',Manstermarker2, function(player) local accName = getAccountName ( getPlayerAccount ( player) ) if isGuestAccount(getPlayerAccount(player)) then outputChatBox(" يجب عليك تسجيل الدخول",player,0,255,0) return end if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then outputChatBox("هلا بك",player,0,255,0) setElementInterior(player, 0) -- نحطه في العالم الاصلي setElementPosition(player, 1550.4233398438,-1675.3825683594,15.399993896484) else outputChatBox("لست بقروب الادمن",player,0,255,0) end end ) Link to comment
N3xT Posted June 19, 2016 Share Posted June 19, 2016 ^ فيه 2 إند ناقصتك , حاط 3 تحققات وفنكشن ومستعمل 2 إند لا تسوي أنتر بين الأكواد عشان تبان الأكواد 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