Jump to content

تصحيح


Recommended Posts

marker = createMarker ( 1538.8000488281, -1627.8000488281, 13.39999961853, "cylinder", 5, 255, 0, 0, 170 ) 
door = createObject(2990, 1540.5, -1627.6999511719, 16.299999237061,0,0,272) 
  
GUIEditor_Button = {} 
GUIEditor_Label = {} 
  
wido = guiCreateWindow(267,343,319,121,"By yazan",false) 
guiSetVisible(wido,false) 
GUIEditor_Button[1] = guiCreateButton(24,63,137,49,"open",false,wido) 
GUIEditor_Button[2] = guiCreateButton(164,64,132,48,"clos",false,wido) 
GUIEditor_Label[1] = guiCreateLabel(106,30,97,23,"لفتح او اغلق الباب",false,wido) 
  
addEventHandler("onClientMarkerHit",marker, 
  function (player) 
    if (getElementType (player) == "player") and (player == localPlayer)  then 
    guiSetVisible(wido,true) 
    showCursor(true) 
        end 
     
    addEventHandler ( "onClientMarkerLeave", marker, 
    function ( leftElement ) 
        if ( guiGetVisible ( wido ) == true ) and ( getElementType ( leftElement ) == "player" ) then 
            guiSetVisible (wido, false ) 
            showCursor ( false ) 
        end 
  
addEventHandler( "onClientGUIClick", root, 
 function () 
         if ( source == GUIEditor_Button[1] ) then 
 moveObject(door, 5000, -2646.6999511719, 1359.3000488281, 7.8000001907349) 
           guiSetVisible(wido,false) 
outputChatBox('#FFFF00 تم فتح الباب',255, 255, 0, true ) 
          elseif ( source == GUIEditor_Button[2] ) then 
 moveObject(door, 5000, 1540.5, -1627.6999511719, 16.299999237061) 
          guiSetVisible(wido,false) 
outputChatBox('#FFFF00 تم غلق الباب',255, 255, 0, true ) 
  
 end 
   end 
    end 
     end 
      end 

Link to comment

marker = createMarker ( 1538.8000488281, -1627.8000488281, 13.39999961853 , "cylinder", 4, 255, 0, 0, 170 ) 
door = createObject(2990, 1540.5, -1627.6999511719, 16.299999237061,0,0,272) 
  
  
GUIEditor_Button = {} 
GUIEditor_Label = {} 
  
wido = guiCreateWindow(267,343,319,121,"By yazan",false) 
guiSetVisible(wido,false) 
GUIEditor_Button[1] = guiCreateButton(24,63,137,49,"open",false,wido) 
GUIEditor_Button[2] = guiCreateButton(164,64,132,48,"clos",false,wido) 
GUIEditor_Label[1] = guiCreateLabel(106,30,97,23,"لفتح او اغلق الباب",false,wido) 
  
addEventHandler("onClientMarkerHit",marker, 
  function (player) 
    if (getElementType (player) == "player") and (player == localPlayer)  then 
    guiSetVisible(wido,true) 
    showCursor(true) 
                                 end 
                end 
) 
    addEventHandler ( "onClientMarkerLeave", marker, 
    function ( leftElement ) 
        if ( guiGetVisible ( wido ) == true and  getElementType ( leftElement ) == "player"  and ( leftElement) == localPlayer) then 
            guiSetVisible (wido, false ) 
            showCursor ( false ) 
                       end 
end 
) 
  
addEventHandler( "onClientGUIClick", root, 
 function () 
         if ( source == GUIEditor_Button[1] ) then 
 moveObject(door, 5000, -2646.6999511719, 1359.3000488281, 7.8000001907349) 
           guiSetVisible(wido,false) 
outputChatBox('#FFFF00 تم فتح الباب',255, 255, 0, true ) 
          elseif ( source == GUIEditor_Button[2] ) then 
 moveObject(door, 5000, 1540.5, -1627.6999511719, 16.299999237061) 
          guiSetVisible(wido,false) 
outputChatBox('#FFFF00 تم غلق الباب',255, 255, 0, true ) 
               end 
     end 
) 
  
Link to comment

-- Client Side -_-" !

marker = createMarker ( 1538.8000488281, -1627.8000488281, 13.39999961853, "cylinder", 5, 255, 0, 0, 170 ) 
door = createObject ( 2990, 1540.5, -1627.6999511719, 16.299999237061, 0, 0, 272 ) 
  
GUIEditor_Button = {} 
GUIEditor_Label = {} 
  
wido = guiCreateWindow ( 267, 343, 319, 121, "By yazan", false ) 
guiSetVisible ( wido, false ) 
GUIEditor_Button[1] = guiCreateButton ( 24, 63, 137, 49, "open", false, wido ) 
GUIEditor_Button[2] = guiCreateButton ( 164, 64, 132, 48, "close", false, wido ) 
GUIEditor_Label[1] = guiCreateLabel ( 106, 30, 97, 23, "لفتح او اغلق الباب", false, wido ) 
  
addEventHandler ( "onClientMarkerHit", marker, 
    function ( player ) 
        if ( player == localPlayer )  then 
            guiSetVisible ( wido, true ) 
            showCursor ( true ) 
        end 
    end 
) 
     
addEventHandler ( "onClientMarkerLeave", marker, 
    function ( leftElement ) 
        if ( leftElement == localPlayer ) and ( guiGetVisible ( wido ) == true ) then 
            guiSetVisible ( wido, false ) 
            showCursor ( false ) 
        end 
    end  
) 
  
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if ( source == GUIEditor_Button[1] ) then 
            moveObject ( door, 5000, -2646.6999511719, 1359.3000488281, 7.8000001907349 ) 
            guiSetVisible ( wido, false ) 
            outputChatBox ( '#FFFF00 تم فتح الباب', 255, 255, 0, true ) 
        elseif ( source == GUIEditor_Button[2] ) then 
            moveObject ( door, 5000, 1540.5, -1627.6999511719, 16.299999237061 ) 
            guiSetVisible ( wido, false ) 
            outputChatBox ( '#FFFF00 تم غلق الباب', 255, 255, 0, true ) 
        end 
    end 
) 

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...