Search the Community
Showing results for tags 'closebutten'.
-
I maked a Password based gate script with dx and normal gui pic This resource is working properly but i have a problem iwant to setup close butten and gui visible set to marker pls help me this is client side GUIEditor = { button = {}, edit = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.button[1] = guiCreateButton(534, 370, 265, 54, "OPEN THE GATE", false) GUIEditor.button[2] = guiCreateButton(872, 429, 62, 37, "Close", false) GUIEditor.edit[1] = guiCreateEdit(463, 269, 250, 43, "", false) addEventHandler ( "onClientGUIClick", GUIEditor.button[1], checkPassword ) guiEditSetMasked ( GUIEditor.edit[1], true ) end ) password = "1234" function checkPassword () local text = guiGetText ( GUIEditor.edit[1] ) if text == password then triggerServerEvent ( "openGate", resourceRoot) else outputChatBox ( "Password Incorrect!" ) end end this is the server side local gate = createObject(980,-2423.94385, -609.48846, 132.56250, 0, 0, 0) function open() moveObject(gate, 980,-2414.95703, -603.12976, 132.56250, 0, 0, 0) end addEvent( "openGate", true ) addEventHandler( "openGate", resourceRoot, open ) <meta> <meta> <info type="script" name="psswd based gate" author="heshan" version="1.0.0"></info> <script src="my2.lua" type="client" ></script> <script src="my2s.lua" type="server" ></script> </meta> pls help