SHARE
TWEET

Untitled

a guest Jan 24th, 2020 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function loginP()
  2.         pingreso = guiCreateWindow(0.26, 0.34, 0.50, 0.35, "Panel de Ingreso | Mini Juegos (MJ)", true)
  3.         guiWindowSetSizable(pingreso, false)
  4.  
  5.         usuarioL = guiCreateLabel(0.27, 0.29, 0.14, 0.06, "Usuario", true, pingreso)
  6.         guiSetFont(usuarioL, "default-bold-small")
  7.         guiLabelSetVerticalAlign(usuarioL, "center")
  8.         campouserL = guiCreateEdit(0.35, 0.29, 0.32, 0.09, "", true, pingreso)
  9.         claveL = guiCreateLabel(0.25, 0.41, 0.14, 0.06, "ContraseƱa", true, pingreso)
  10.         guiSetFont(claveL, "default-bold-small")
  11.         guiLabelSetVerticalAlign(claveL, "center")
  12.         campoclaveL = guiCreateEdit(0.38, 0.41, 0.32, 0.09, "", true, pingreso)
  13.         botondeiAuto = guiCreateCheckBox(0.72, 0.36, 0.24, 0.07, "Inicio Automatico", false, true, pingreso)
  14.         guiSetFont(botondeiAuto, "default-bold-small")
  15.         labeldebienvenida = guiCreateLabel(0.02, 0.07, 0.24, 0.08, "Bienvenido a", true, pingreso)
  16.         guiSetFont(labeldebienvenida, "default-bold-small")
  17.         jugadoresconectados = guiCreateLabel(0.69, 0.09, 0.25, 0.07, "Jugadores Conectados", true, pingreso)
  18.         guiSetText(jugadoresconectados,tostring(#getElementsByType("player")))
  19.         guiSetFont(jugadoresconectados, "default-bold-small")
  20.         botonloginL = guiCreateButton(0.05, 0.85, 0.25, 0.11, "Logearse", true, pingreso)
  21.         registrobotonL = guiCreateButton(169, 228, 129, 30, "Registrarse", false, pingreso)
  22.         invitadoL = guiCreateButton(323, 228, 129, 30, "Logearse sin Registrarse", false, pingreso)
  23.         showCursor(true)
  24.  
  25.      addEventHandler("onClientGUIClick", registroR, function()
  26.       user = guiGetText(campouserL)
  27.       clave = guiGetText(campoclaveL)
  28.       triggerServerEvent("UserLogeado", getLocalPlayer(), user, clave)
  29.       end)
  30.  
  31.        addEventHandler("onClientGUIClick", registrobotonL, function()
  32.       guiSetVisible(pingreso, false)
  33.       registro()
  34.       end)
  35.      
  36.  
  37.     end
  38.     addEvent("abrirPanel", true)
  39.     addEventHandler("abrirPanel", getLocalPlayer(), loginP)
  40.  
  41.  
  42.  
  43.     function registro()
  44.         registropanel = guiCreateWindow(0.32, 0.28, 0.38, 0.41, "Panel de Registro | Mini Juegos", true)
  45.         guiWindowSetSizable(registropanel, false)
  46.         showCursor(true)
  47.  
  48.         ruser = guiCreateLabel(0.19, 0.22, 0.27, 0.08, "Usuario", true, registropanel)
  49.         guiSetFont(ruser, "default-bold-small")
  50.         rclave = guiCreateLabel(0.18, 0.35, 0.22, 0.08, "clave", true, registropanel)
  51.         guiSetFont(rclave, "default-bold-small")
  52.         campoclaveR = guiCreateEdit(0.34, 0.33, 0.32, 0.10, "", true, registropanel)
  53.         rclave2 = guiCreateLabel(0.16, 0.50, 0.23, 0.08, "clave", true, registropanel)
  54.         guiSetFont(rclave2, "default-bold-small")
  55.         campoclave2R = guiCreateEdit(0.34, 0.48, 0.32, 0.10, "", true, registropanel)
  56.         campousuarioR = guiCreateEdit(0.31, 0.20, 0.32, 0.10, "", true, registropanel)
  57.         regresoR = guiCreateButton(0.06, 0.82, 0.28, 0.13, "Regresar", true, registropanel)
  58.         registroR = guiCreateButton(0.37, 0.82, 0.28, 0.13, "Registrarse", true, registropanel)
  59.         InvitadoR = guiCreateButton(0.69, 0.82, 0.28, 0.13, "Iniciar como Invitado", true, registropanel)
  60.        guiEditSetMasked(rclave, true)
  61.        guiEditSetMasked(rclave2, true)
  62.         end
  63.        
  64.      addEventHandler("onClientGUIClick", registroR, function()
  65.       user = guiGetText(campousuarioR)
  66.       clave = guiGetText(campoclaveR)
  67.       confirmarC = guiGetText(campoclave2R)
  68.       if(clave==confirmarC) then
  69.       triggerServerEvent("RegistrarUsuario", getLocalPlayer(), user, clave)
  70.       end
  71.       end)
  72.        
  73.        
  74.     addEventHandler("onClientGUIClick", regresoR, function()
  75.       guiSetVisible(registropanel, false)
  76.       loginP()
  77.  
  78.       end)
  79.    
  80.    
  81.    
  82.     addEvent("cerrarPanel", true)
  83.     addEventHandler("cerrarPanel", getLocalPlayer(), function()
  84.     guiSetVisible(registropanel, false)
  85.     showCursor(false)
  86.     end)
  87.    
  88.    
  89.         addEvent("cerrarPanel2", true)
  90.     addEventHandler("cerrarPanel2", getLocalPlayer(), function()
  91.     guiSetVisible(pingreso, false)
  92.     showCursor(false)
  93.     end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top