αвυ-wαleed Posted July 6, 2014 Share Posted July 6, 2014 صلحت بوابة تنفتح بكلمة وتقفل بكلمة وسويت جنب البوابة ماركر يطلع منه كلام حطيت اذا فتحت البوابة يختفي الماركر واذا قفلت البوابة يظهر الماركر واذا فتحت البوابة ثاني مرة ما يختفي الماركر ليه ؟؟ ابغاه كل مرة افتح يختفي وكل مرة اقفل يظهمر Link to comment
αвυ-wαleed Posted July 6, 2014 Author Share Posted July 6, 2014 أطرح كودك local abu = createMarker (x, y, z, "cylinder", 8, 255, 0, 0 ) addEventHandler ( "onMarkerHit", abu, function ( player ) if getElementType ( player ) == "player" then exports['topbarchat']:sendClientMessage ( "مرحبا بك ", player,255, 255, 0, true ) end end ) function createTheGate () myGate1 = createObject ( 980, x, y, z, 0, 0, 0) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( ) moveObject ( myGate1, 1500, x, y, z, 0, 0, 0 ) exports['topbarchat']:sendClientMessage ( "تم فتح البوابة", root,00, 255, 255, true ) destroyElement (abu) end addCommandHandler("F",openMyGate) function movingMyGateBack () moveObject ( myGate1, 1500, x, y, z, 0, 0, 0 ) exports['topbarchat']:sendClientMessage ( "تم إغلاق البوابة ", root, 0, 255, 255, true ) local abu = createMarker (x, y, z, "cylinder", 8, 255, 0, 0 ) end addCommandHandler("E",movingMyGateBack) Link to comment
jafar Posted July 6, 2014 Share Posted July 6, 2014 احذف local من فنكشن انشاء الماركر Link to comment
αвυ-wαleed Posted July 7, 2014 Author Share Posted July 7, 2014 فيه مشكلة برضو اذا كتب امر قفل الباب مرتين يجي ماركر فوق ماركر وفيه مشكلة ثانية الماركر ماتظهر وظيفتة اذا رجع ثاني مرة 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