Scorpio Posted May 2, 2013 Share Posted May 2, 2013 السلام عليكم ابي كود ماركلين الأول لما يلمسو "الأدمن" ينتقل الى الماركر الثاني ولما يلمس الثاني يرجع ثاني للمكان + ابي كود الي استخدمو في ماركر ويطلعلي نافذة وشكراً لكل الي راح يساعدوني + لا تجلسو تقولو روح تعلم البرمجة انا تعلمت لكن 10\4 Link to comment
فاّرس Posted May 2, 2013 Share Posted May 2, 2013 createMarker getElementType isObjectInACLGroup getAccountName getPlayerAccount setElementPosition "onMarkerHit" guiSetVisible حاول تسوي ونصحح لك Link to comment
jafar Posted May 2, 2013 Share Posted May 2, 2013 (edited) Edit : -- الطلب الأول createMarker getElementType isObjectInACLGroup -- Server Only getAccountName -- Server Only getPlayerAccount -- Server Only setElementPosition setElementInterior -- الطلب الثاني guiSetVisible -- Client Only "onClientMarkerHit" -- Client Only getLocalPlayer () Edited May 2, 2013 by Guest Link to comment
Scorpio Posted May 2, 2013 Author Share Posted May 2, 2013 -- الطلب الأول createMarker getElementType isObjectInACLGroup -- Server Only getAccountName -- Server Only getPlayerAccount -- Server Only isGuestAccount -- Server Only setElementPosition setElementInterior -- الطلب الثاني guiSetVisible -- Client Only "onClientMarkerHit" -- Client Only ابي الكود لأني ما اعرف اكون الأكواد او اسويها Link to comment
فاّرس Posted May 2, 2013 Share Posted May 2, 2013 Marker = {} Marker[1] = createMarker(...) function Hit (player) if (getElementType(player) == 'player' ) then local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then setElementPosition(player,x,y,z) else outputChatBox("* Error : You're Not Admin") end end end addEventHandler("onMarkerHit",Marker[1],Hit) ^ هذا مثآل, وانت سو الماركر الثاني بس غير الاحداثيآت Edit# : سويت له الاول حق النافذه خلوه يحاول, Link to comment
Scorpio Posted May 2, 2013 Author Share Posted May 2, 2013 Marker = {} Marker[1] = createMarker(...) function Hit (player) if (getElementType(player) == 'player' ) then local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ( "user." .. accName, aclGetGroup ( "Admin" ) ) then setElementPosition(player,x,y,z) else outputChatBox("* Error : You're Not Admin") end end end addEventHandler("onMarkerHit",Marker[1],Hit) ^ هذا مثآل, وانت سو الماركر الثاني بس غير الاحداثيآت Edit# : سويت له الاول حق النافذه خلوه يحاول, ما عرفت + انا مستخدم كود بس ما ينقل يارت تشوفو المشكلة x, y, z = 2487.6398925781, -1666.7453613281, 13.34375 size = 1.5 Xtogo, Ytogo, Ztogo = 2496.6491699219, -1683.1557617188, 13.356028556824 r, g, b = 255, 255, 0 Groups = { 'Admin', 'Console' } ----------- marker = createMarker ( x, y, z - 1, 'arrow', size, r, g, b, 255 ); function geGroup ( ) for _,g in next, Groups do return g end end addEventHandler ( 'onMarkerHit', marker, function ( player ) if getElementType ( player ) == 'player' then local accountName = getAccountName ( getPlayerAccount ( player ) ); if isObjectInACLGroup ( 'user.'..accountName, aclGetGroup ( getGroup ( ) ) ) then setElementPosition ( player, Xtogo, Ytogo, Ztogo ); outputChatBox ( 'مرحبا بك داخل البيت', player ); else outputChatBox ( 'هذه ممتلكات خاصة للسيرفر', player ); end end end ); Link to comment
فاّرس Posted May 2, 2013 Share Posted May 2, 2013 وش تبي تسوي الحين ؟ عشآن نقدر نفيدك؟ Link to comment
iPrestege Posted May 2, 2013 Share Posted May 2, 2013 جربه كذآ : local x, y, z = 2487.6398925781, -1666.7453613281, 13.34375 local size = 1.5 local Xtogo, Ytogo, Ztogo = 2496.6491699219, -1683.1557617188, 13.356028556824 local r, g, b = 255, 255, 0 local marker = createMarker ( x, y, z - 1, 'arrow', size, r, g, b, 255 ) addEventHandler("onMarkerHit",marker, function ( element ) if ( getElementType ( element ) == ( "player" ) ) then if not ( GetPlayerACLGroup ( element , "Console" ) or GetPlayerACLGroup ( element , "Admin" ) ) then outputChatBox("ممتلكات خاصة للسيرفر",player) return end setElementPosition ( element , Xtogo, Ytogo, Ztogo ) outputChatBox("مرحبا بك داخل البيت",player) end end ) function GetPlayerACLGroup ( player , Group ) if ( not player or not Group ) then return end if ( not getPlayerAccount ( player ) ) then return end if ( isGuestAccount ( getPlayerAccount ( player ) ) ) then return end if ( not aclGetGroup ( tostring ( Group ) ) ) then return end if ( isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( player ) ) , aclGetGroup ( tostring ( Group ) ) ) ) then return player,Group else return false end end Link to comment
Scorpio Posted May 2, 2013 Author Share Posted May 2, 2013 جربه كذآ : local x, y, z = 2487.6398925781, -1666.7453613281, 13.34375 local size = 1.5 local Xtogo, Ytogo, Ztogo = 2496.6491699219, -1683.1557617188, 13.356028556824 local r, g, b = 255, 255, 0 local marker = createMarker ( x, y, z - 1, 'arrow', size, r, g, b, 255 ) addEventHandler("onMarkerHit",marker, function ( element ) if ( getElementType ( element ) == ( "player" ) ) then if not ( GetPlayerACLGroup ( element , "Console" ) or GetPlayerACLGroup ( element , "Admin" ) ) then outputChatBox("ممتلكات خاصة للسيرفر",player) return end setElementPosition ( element , Xtogo, Ytogo, Ztogo ) outputChatBox("مرحبا بك داخل البيت",player) end end ) function GetPlayerACLGroup ( player , Group ) if ( not player or not Group ) then return end if ( not getPlayerAccount ( player ) ) then return end if ( isGuestAccount ( getPlayerAccount ( player ) ) ) then return end if ( not aclGetGroup ( tostring ( Group ) ) ) then return end if ( isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( player ) ) , aclGetGroup ( tostring ( Group ) ) ) ) then return player,Group else return false end end مشكور ظبت معايا لكن ابيه لما ينتقل الى المكان يكون فيه ماركر ثاني Link to comment
iPrestege Posted May 2, 2013 Share Posted May 2, 2013 حياكـ الله .. الى هنا انتهت مهمتي اللي ودهـ يكمل معه يكـمل .. ذذ Link to comment
Scorpio Posted May 2, 2013 Author Share Posted May 2, 2013 حياكـ الله .. الى هنا انتهت مهمتي اللي ودهـ يكمل معه يكـمل .. ذذ اسف اني تعبتك معي مشكور 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