Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TabelCamera = {
- { 2106.1381835938, 1152.7486572266, 98.61360168457, 2107.0009765625, 1152.3186035156, 98.348075866699 }, -- النخيل
- { -2804.1530761719, 2143.0659179688, 137.36129760742, -2803.7312011719, 2142.1677246094, 137.23782348633 }, -- الجسر
- { 2461.38671875, -1650.3624267578, 31.155199050903, 2462.0615234375, -1651.0014648438, 30.786020278931 } -- حارة سي جي
- }
- GUIEditor = {
- checkbox = {},
- staticimage = {},
- edit = {},
- button = {},
- window = {},
- label = {}
- }
- addEventHandler("onClientResourceStart", resourceRoot,
- function()
- triggerServerEvent ( "On", localPlayer )
- local screenW, screenH = guiGetScreenSize()
- GUIEditor.window[1] = guiCreateWindow((screenW - 590) / 2, (screenH - 428) / 2, 590, 428, "Login System", false)
- guiWindowSetSizable(GUIEditor.window[1], false)
- GUIEditor.staticimage[1] = guiCreateStaticImage(9, 23, 571, 232, "Login.png", false, GUIEditor.window[1])
- GUIEditor.edit[1] = guiCreateEdit(178, 283, 233, 23, "", false, GUIEditor.window[1])
- GUIEditor.label[1] = guiCreateLabel(178, 259, 233, 24, "UserName:", false, GUIEditor.window[1])
- guiSetFont(GUIEditor.label[1], "default-bold-small")
- guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false)
- guiLabelSetVerticalAlign(GUIEditor.label[1], "center")
- GUIEditor.label[2] = guiCreateLabel(178, 306, 233, 24, "PassWord:", false, GUIEditor.window[1])
- guiSetFont(GUIEditor.label[2], "default-bold-small")
- guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false)
- guiLabelSetVerticalAlign(GUIEditor.label[2], "center")
- GUIEditor.edit[2] = guiCreateEdit(178, 330, 233, 23, "", false, GUIEditor.window[1])
- GUIEditor.checkbox[1] = guiCreateCheckBox(178, 354, 107, 16, "Show Password", false, false, GUIEditor.window[1])
- guiSetFont(GUIEditor.checkbox[1], "default-bold-small")
- GUIEditor.checkbox[2] = guiCreateCheckBox(326, 354, 85, 16, "Rember Me", false, false, GUIEditor.window[1])
- guiSetFont(GUIEditor.checkbox[2], "default-bold-small")
- GUIEditor.button[1] = guiCreateButton(178, 380, 113, 27, "Register", false, GUIEditor.window[1])
- guiSetFont(GUIEditor.button[1], "default-bold-small")
- guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF")
- GUIEditor.button[2] = guiCreateButton(298, 380, 113, 27, "Login", false, GUIEditor.window[1])
- guiSetFont(GUIEditor.button[2], "default-bold-small")
- guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFFFF")
- guiEditSetMasked(GUIEditor.edit[2], true)
- showChat ( false )
- setTimer ( function ( )
- fadeCamera ( true )
- local x, y, z, x1, y1, z1 = unpack ( TabelCamera [ math.random ( #TabelCamera ) ] )
- setCameraMatrix ( x, y, z, x1, y1, z1 )
- guiSetVisible ( GUIEditor.window[1], true )
- end, 2500, 1 )
- showCursor ( true )
- end
- )
- addEventHandler ( "onClientGUIClick", root,
- function ( )
- if guiCheckBoxGetSelected ( GUIEditor.checkbox[1] ) then
- guiEditSetMasked ( GUIEditor.edit[2], false )
- else
- guiEditSetMasked ( GUIEditor.edit[2], true )
- end
- if source == GUIEditor.button[1] then
- if not guiGetText ( GUIEditor.edit[1] ) ~= "" and guiGetText ( GUIEditor.edit[2] ) ~= "" then
- triggerServerEvent ( "onRegister", localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) )
- else
- exports ["guimessages"] : outputClient ( "# - [ #ffffff * Worng Username Or Password#ff0000 ] - #" , 255, 0, 0, true )
- end
- elseif source == GUIEditor.button[2] then
- if not guiGetText ( GUIEditor.edit[1] ) ~= "" and guiGetText ( GUIEditor.edit[2] ) ~= "" then
- if guiCheckBoxGetSelected ( GUIEditor.checkbox[2] ) then
- triggerServerEvent ( "onLogin", localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ), "True" )
- else
- triggerServerEvent ( "onLogin", localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ), "False" )
- end
- else
- exports ["guimessages"] : outputClient ( "# - [ #ffffff * Worng Username Or Password#ff0000 ] - #" , 255, 0, 0, true )
- end
- end
- end
- )
- addEvent ( "Yes", true )
- addEventHandler ( "Yes", root,
- function ( )
- showCursor ( false )
- guiSetVisible ( GUIEditor.window[1], false )
- showChat ( true )
- setCameraTarget ( localPlayer )
- end
- )
- addEvent ( "setInfo", true )
- addEventHandler ( "setInfo", root,
- function ( UserName, PassWord )
- guiSetText ( GUIEditor.edit[1], UserName )
- guiSetText ( GUIEditor.edit[2], PassWord )
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement