Sfa7 Posted February 11, 2013 Share Posted February 11, 2013 (edited) تمت الافاده Edited February 11, 2013 by Guest Link to comment
==>ҭᾄlᾄl Posted February 11, 2013 Share Posted February 11, 2013 سلالام عليكم..شباب بغيت اسوي باب يفتح بـ زر تاب وابيه يفتح لـ قروب كونسل وحاولت وماقدرت يخرب الكود مادري وش قصته ي ليت واحد يعدلياه يعني انا الحين خليت الباب يفتح بـ حرف تاب بس مابي اي واحد يجي يضغط تاب يفتحله لا ابي فقط الكونسل اذا ضغط يفتحله وبس و يليت بـ اسرع وقت local object = createObject ( 2963, 298.60000610352, -1616.5, 4870.2001953125, 0, 0, 270.25 ) local marker = createMarker ( 298.60000610352, -1616.5, 4870.2001953125, 'cylinder', 4, 0, 0, 0, 0 ) local open = false function onStart() for i,v in ipairs(getElementsByType("player")) do bindKey (v,"tab","down",openANDcloseFun) end end addEventHandler ( "onResourceStart",getResourceRootElement(),onStart) function onJoin( ) bindKey (source,"tab","down",openANDcloseFun) end addEventHandler ( "onPlayerJoin", getRootElement(), onJoin ) function openANDcloseFun( player ) if ( isElementWithinMarker(player,marker) ) then if ( open ) then moveObject ( object, 1500, 302.29998779297, -1616.4000244141, 4870.2001953125 ) else moveObject ( object, 1500, 298.60000610352, -1616.5, 4870.2001953125 ) end open = not open end end اانا عندي الكود بس ماعرف وين احطه بـ الكود في فووق فـ اطلب مساعدتكم local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..accName, aclGetGroup("Console")) then local object = createObject ( 2963, 298.60000610352, -1616.5, 4870.2001953125, 0, 0, 270.25 ) local marker = createMarker ( 298.60000610352, -1616.5, 4870.2001953125, 'cylinder', 4, 0, 0, 0, 0 ) local open = false function onStart() for i,v in ipairs(getElementsByType("player")) do bindKey (v,"tab","down",openANDcloseFun) end end addEventHandler ( "onResourceStart",getResourceRootElement(),onStart) function onJoin( ) bindKey (source,"tab","down",openANDcloseFun) end addEventHandler ( "onPlayerJoin", getRootElement(), onJoin ) function openANDcloseFun( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..accName, aclGetGroup("Console")) then if ( isElementWithinMarker(player,marker) ) then if ( open ) then moveObject ( object, 1500, 302.29998779297, -1616.4000244141, 4870.2001953125 ) else moveObject ( object, 1500, 298.60000610352, -1616.5, 4870.2001953125 ) end open = not open end end end Link to comment
===|OSAMA|=== Posted February 11, 2013 Share Posted February 11, 2013 ^ كذآ لو بيسوي شي يجي بالشات , رح يصير لما يضغط تاب وهو بخارج الماركر يجيه انه لازم يكون كونسل هو كودكـ صح , لكن يفضل انك تحطها إذا كان بالماركر عشآن لو مسوي زر ثاني بتاب ما يصير فيه تخربط # يصصير كذآ -- Server Side ! local object = createObject ( 2963, 298.60000610352, -1616.5, 4870.2001953125, 0, 0, 270.25 ) local marker = createMarker ( 298.60000610352, -1616.5, 4870.2001953125, 'cylinder', 4, 0, 0, 0, 0 ) local open = false function onStart() for i,v in ipairs(getElementsByType("player")) do bindKey (v,"tab","down",openANDcloseFun) end end addEventHandler ( "onResourceStart",getResourceRootElement(),onStart) function onJoin( ) bindKey (source,"tab","down",openANDcloseFun) end addEventHandler ( "onPlayerJoin", getRootElement(), onJoin ) function openANDcloseFun( player ) if isElementWithinMarker(player,marker) then local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup("user."..accName, aclGetGroup("Console")) then if open then moveObject ( object, 1500, 302.29998779297, -1616.4000244141, 4870.2001953125 ) else moveObject ( object, 1500, 298.60000610352, -1616.5, 4870.2001953125 ) end open = not open else outputChatBox ( "* You must be 'Console' !", player, 210, 0, 0, true ) end end end Link to comment
Sfa7 Posted February 11, 2013 Author Share Posted February 11, 2013 لووول يعطيكم العااافيه مشكووورين كفوو اسامه ض2 وكفو طلال Link to comment
===|OSAMA|=== Posted February 11, 2013 Share Posted February 11, 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