GUIEditor = {button = {},window = {},label = {},edit = {}}
pass = '1212'
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window [ 1 ] = guiCreateWindow(522, 239, 307, 180, "فتح البوابة الخاصة", false)
guiSetVisible ( GUIEditor.window [ 1 ] , false )
GUIEditor.edit [ 1 ] = guiCreateEdit(82, 70, 150, 34, "", false, GUIEditor.window [ 1 ])
GUIEditor.button [ 1 ] = guiCreateButton(118, 114, 78, 34, "فتح البوابة", false, GUIEditor.window [ 1 ])
GUIEditor.label [ 1 ] = guiCreateLabel(82, 40, 155, 20, " ضع كلمة المرور هنا لفتح البوابة", false, GUIEditor.window [ 1 ])
addEventHandler('onClientGUIClick',GUIEditor.button [ 1 ] , openDoor , false )
end
)
Door3 = createObject(2900,-2485.61157,-615.84094,132.56523,0,358,202)
markerDoor3 = createMarker(-2484.16626,-615.90326,132.56483-1,'cylinder',1.5,0,0,0,255)
addEventHandler('onClientMarkerHit',markerDoor3,
function ( hitElement )
if ( hitElement == localPlayer ) then
guiSetVisible ( GUIEditor.window [ 1 ] , true )
showCursor ( true )
end
end
)
function openDoor ( )
if ( guiGetText ( GUIEditor.edit [ 1 ] ) == pass ) then
moveObject(Door3,4000,-2485.31323,-615.99457,145.46979)
guiSetVisible ( GUIEditor.window [ 1 ] , false )
showCursor ( false )
outputChatBox('Welcome!',255,0,0,true)
else
outputChatBox('Error!',255,0,0,true)
end
end
addEventHandler('onClientMarkerLeave',markerDoor3,
function ( hitElement )
moveObject(Door3,4000,-2485.61157,-615.84094,132.56523)
end
)
ترا عدلت الاحداثيات لاني كنت آجرب