Advertisement
Guest User

Untitled

a guest
Apr 9th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.58 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.button[1] = guiCreateButton(178, 380, 113, 27, "Register", false, GUIEditor.window[1])
  38. guiSetFont(GUIEditor.button[1], "default-bold-small")
  39. guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFFFFFF")
  40. GUIEditor.button[2] = guiCreateButton(298, 380, 113, 27, "Login", false, GUIEditor.window[1])
  41. guiSetFont(GUIEditor.button[2], "default-bold-small")
  42. guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFFFFFF")
  43. guiEditSetMasked(GUIEditor.edit[2], true)
  44. showChat ( false )
  45. setTimer ( function ( )
  46. fadeCamera ( true )
  47. local x, y, z, x1, y1, z1 = unpack ( TabelCamera [ math.random ( #TabelCamera ) ] )
  48. setCameraMatrix ( x, y, z, x1, y1, z1 )
  49. guiSetVisible ( GUIEditor.window[1], true )
  50. end, 2500, 1 )
  51. showCursor ( true )
  52.  
  53. end
  54. )
  55.  
  56.  
  57. addEventHandler ( "onClientGUIClick", root,
  58. function ( )
  59. if guiCheckBoxGetSelected ( GUIEditor.checkbox[1] ) then
  60. guiEditSetMasked ( GUIEditor.edit[2], false )
  61. else
  62. guiEditSetMasked ( GUIEditor.edit[2], true )
  63. end
  64. if source == GUIEditor.button[1] then
  65. if not guiGetText ( GUIEditor.edit[1] ) ~= "" and guiGetText ( GUIEditor.edit[2] ) ~= "" then
  66. triggerServerEvent ( "onRegister", localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ) )
  67. else
  68. exports ["guimessages"] : outputClient ( "# - [ #ffffff * Worng Username Or Password#ff0000 ] - #" , 255, 0, 0, true )
  69. end
  70. elseif source == GUIEditor.button[2] then
  71. if not guiGetText ( GUIEditor.edit[1] ) ~= "" and guiGetText ( GUIEditor.edit[2] ) ~= "" then
  72. if guiCheckBoxGetSelected ( GUIEditor.checkbox[2] ) then
  73. triggerServerEvent ( "onLogin", localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ), "True" )
  74. else
  75. triggerServerEvent ( "onLogin", localPlayer, guiGetText ( GUIEditor.edit[1] ), guiGetText ( GUIEditor.edit[2] ), "False" )
  76. end
  77. else
  78. exports ["guimessages"] : outputClient ( "# - [ #ffffff * Worng Username Or Password#ff0000 ] - #" , 255, 0, 0, true )
  79. end
  80. end
  81. end
  82. )
  83.  
  84. addEvent ( "Yes", true )
  85. addEventHandler ( "Yes", root,
  86. function ( )
  87. showCursor ( false )
  88. guiSetVisible ( GUIEditor.window[1], false )
  89. showChat ( true )
  90. setCameraTarget ( localPlayer )
  91. end
  92. )
  93.  
  94. addEvent ( "setInfo", true )
  95. addEventHandler ( "setInfo", root,
  96. function ( UserName, PassWord )
  97. guiSetText ( GUIEditor.edit[1], UserName )
  98. guiSetText ( GUIEditor.edit[2], PassWord )
  99. end
  100. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement