Advertisement
Guest User

Untitled

a guest
Apr 13th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.76 KB | None | 0 0
  1. TabelCamera = {
  2. { 2106.1381835938, 1152.7486572266, 98.61360168457, 2107.0009765625, 1152.3186035156, 98.348075866699 }, -- النخيل
  3. { -2804.1530761719, 2143.0659179688, 137.36129760742, -2803.7312011719, 2142.1677246094, 137.23782348633 }, -- الجسر
  4. { 2461.38671875, -1650.3624267578, 31.155199050903, 2462.0615234375, -1651.0014648438, 30.786020278931 } -- حارة سي جي
  5. }
  6.  
  7. GUIEditor = {
  8. checkbox = {},
  9. staticimage = {},
  10. edit = {},
  11. button = {},
  12. window = {},
  13. label = {}
  14. }
  15. addEventHandler("onClientResourceStart", resourceRoot,
  16. function()
  17. triggerServerEvent ( "On", localPlayer )
  18. local screenW, screenH = guiGetScreenSize()
  19. GUIEditor.window[1] = guiCreateWindow((screenW - 590) / 2, (screenH - 428) / 2, 590, 428, "Login System", false)
  20. guiWindowSetSizable(GUIEditor.window[1], false)
  21.  
  22. GUIEditor.staticimage[1] = guiCreateStaticImage(9, 23, 571, 232, "Login.png", false, GUIEditor.window[1])
  23. GUIEditor.edit[1] = guiCreateEdit(178, 283, 233, 23, "", false, GUIEditor.window[1])
  24. GUIEditor.label[1] = guiCreateLabel(178, 259, 233, 24, "UserName:", false, GUIEditor.window[1])
  25. guiSetFont(GUIEditor.label[1], "default-bold-small")
  26. guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false)
  27. guiLabelSetVerticalAlign(GUIEditor.label[1], "center")
  28. GUIEditor.label[2] = guiCreateLabel(178, 306, 233, 24, "PassWord:", false, GUIEditor.window[1])
  29. guiSetFont(GUIEditor.label[2], "default-bold-small")
  30. guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false)
  31. guiLabelSetVerticalAlign(GUIEditor.label[2], "center")
  32. GUIEditor.edit[2] = guiCreateEdit(178, 330, 233, 23, "", false, GUIEditor.window[1])
  33. GUIEditor.checkbox[1] = guiCreateCheckBox(178, 354, 107, 16, "Show Password", false, false, GUIEditor.window[1])
  34. guiSetFont(GUIEditor.checkbox[1], "default-bold-small")
  35. GUIEditor.checkbox[2] = guiCreateCheckBox(326, 354, 85, 16, "Rember Me", false, false, GUIEditor.window[1])
  36. guiSetFont(GUIEditor.checkbox[2], "default-bold-small")
  37. GUIEditor.checkbox[3] = guiCreateCheckBox(178, 312, 82, 12, "Auto Login", true, false, GUIEditor.window[1])
  38. guiSetFont(GUIEditor.checkbox[3], "default-bold-small")
  39. GUIEditor.button[1] = guiCreateButton(178, 380, 113, 27, "Register", false, GUIEditor.window[1])
  40. guiSetFont(GUIEditor.button[1], "default-bold-small")
  41. guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF")
  42. GUIEditor.button[2] = guiCreateButton(298, 380, 113, 27, "Login", false, GUIEditor.window[1])
  43. guiSetFont(GUIEditor.button[2], "default-bold-small")
  44. guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFFFF")
  45. guiEditSetMasked(GUIEditor.edit[2], true)
  46. showChat ( false )
  47. setTimer ( function ( )
  48. fadeCamera ( true )
  49. local x, y, z, x1, y1, z1 = unpack ( TabelCamera [ math.random ( #TabelCamera ) ] )
  50. setCameraMatrix ( x, y, z, x1, y1, z1 )
  51. guiSetVisible ( GUIEditor.window[1], true )
  52. end, 2500, 1 )
  53. showCursor ( true )
  54.  
  55. end
  56. )
  57.  
  58.  
  59. addEventHandler ( "onClientGUIClick", root,
  60. function ( )
  61. if guiCheckBoxGetSelected ( GUIEditor.checkbox[1] ) then
  62. guiEditSetMasked ( GUIEditor.edit[2], false )
  63. else
  64. guiEditSetMasked ( GUIEditor.edit[2], true )
  65. end
  66. if source == GUIEditor.button[1] then
  67. if not guiGetText ( GUIEditor.edit[1] ) ~= "" and guiGetText ( GUIEditor.edit[2] ) ~= "" then
  68. triggerServerEvent ( "onRegister", localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) )
  69. else
  70. exports ["guimessages"] : outputClient ( "# - [ #ffffff * Worng Username Or Password#ff0000 ] - #" , 255, 0, 0, true )
  71. end
  72. elseif source == GUIEditor.button[2] then
  73. if not guiGetText ( GUIEditor.edit[1] ) ~= "" and guiGetText ( GUIEditor.edit[2] ) ~= "" then
  74. if guiCheckBoxGetSelected ( GUIEditor.checkbox[2] ) then
  75. triggerServerEvent ( "onLogin", localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ), "True" )
  76. else
  77. triggerServerEvent ( "onLogin", localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ), "False" )
  78. end
  79. else
  80. exports ["guimessages"] : outputClient ( "# - [ #ffffff * Worng Username Or Password#ff0000 ] - #" , 255, 0, 0, true )
  81. end
  82. end
  83. end
  84. )
  85.  
  86. addEvent ( "Yes", true )
  87. addEventHandler ( "Yes", root,
  88. function ( )
  89. showCursor ( false )
  90. guiSetVisible ( GUIEditor.window[1], false )
  91. showChat ( true )
  92. setCameraTarget ( localPlayer )
  93. end
  94. )
  95.  
  96. addEvent ( "setInfo", true )
  97. addEventHandler ( "setInfo", root,
  98. function ( UserName, PassWord )
  99. guiSetText ( GUIEditor.edit[1], UserName )
  100. guiSetText ( GUIEditor.edit[2], PassWord )
  101. end
  102. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement