Jump to content

مساعدة بسيطة


Recommended Posts

صلحت بوابة تنفتح بكلمة وتقفل بكلمة

وسويت جنب البوابة ماركر يطلع منه كلام

حطيت اذا فتحت البوابة يختفي الماركر

واذا قفلت البوابة يظهر الماركر

واذا فتحت البوابة ثاني مرة ما يختفي الماركر ليه ؟؟

ابغاه كل مرة افتح يختفي وكل مرة اقفل يظهمر

Link to comment
أطرح كودك
  
  
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...