Jump to content

[Login System] Impossible to register.


WolfPire

Recommended Posts

Hi, my name is WolfPire. I got a little problem that i would like to solve. If you guys could help me, i would really appreciate it.

So, i'm creating a login system. But i got a problem.

Here are the LUA files: (Dont worry about permissions i sorted that out already)

Client

sWidth,sHeight = guiGetScreenSize() 
  
function onJoin() 
    showCursor(true) 
    LoginW = guiCreateWindow(sWidth/3.3,sHeight/3.3,500,300,"Oriental Night Gaming - Login",false) 
    NameL = guiCreateLabel(28,139,35,15,"Name:",false,LoginW) 
    guiSetFont(NameL,"default-bold-small") 
    PassL = guiCreateLabel(18,180,56,15,"Password:",false,LoginW) 
    guiSetFont(PassL,"default-bold-small") 
    NameED = guiCreateEdit(78,132,233,31,"",false,LoginW) 
    PassED = guiCreateEdit(80,174,233,31,"",false,LoginW) 
    SepAD = guiCreateLabel(335,24,5,276,"|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n",false,LoginW) 
    LoginB = guiCreateButton(23,244,120,32,"Login",false,LoginW) 
    RegisterB = guiCreateButton(192,244,120,32,"Register",false,LoginW) 
    Name = guiGetText(NameED) 
    Pass = guiGetText(PassED) 
    addEventHandler("onClientGUIClick",RegisterB,RegisterC) 
    addEventHandler("onClientGUIClick",LoginB,LoginE) 
end 
  
addEventHandler("onClientResourceStart",getRootElement(),onJoin) 
  
function RegisterC() 
    destroyElement(LoginW) 
    RegisterW = guiCreateWindow(sWidth/3.3,sHeight/3.3,500,300,"Oriental Night Gaming - Register",false) 
    NameLR = guiCreateLabel(28,77,35,15,"Name:",false,RegisterW) 
    guiSetFont(NameLR,"default-bold-small") 
    PassLR = guiCreateLabel(14,120,56,15,"Password:",false,RegisterW) 
    guiSetFont(PassLR,"default-bold-small") 
    NameEDR = guiCreateEdit(78,69,233,31,"",false,RegisterW) 
    PassEDR = guiCreateEdit(80,111,233,31,"",false,RegisterW) 
    SepADR = guiCreateLabel(335,24,5,276,"|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n",false,RegisterW) 
    BackB = guiCreateButton(23,244,120,32,"Back",false,RegisterW) 
    RegisterBR = guiCreateButton(192,244,120,32,"Register",false,RegisterW) 
    ConfEDR = guiCreateEdit(80,154,233,31,"",false,RegisterW) 
    ConfLR = guiCreateLabel(18,163,56,15,"Confirm:",false,RegisterW) 
    guiSetFont(ConfLR,"default-bold-small") 
    NameR = guiGetText(NameEDR) 
    PassR = guiGetText(PassEDR) 
    addEventHandler("onClientGUIClick",BackB,LoginC) 
    addEventHandler("onClientGUIClick",RegisterBR,RegisterE) 
end 
  
function LoginC() 
    destroyElement(RegisterW) 
    LoginW = guiCreateWindow(sWidth/3.3,sHeight/3.3,500,300,"Oriental Night Gaming - Login",false) 
    NameL = guiCreateLabel(28,139,35,15,"Name:",false,LoginW) 
    guiSetFont(NameL,"default-bold-small") 
    PassL = guiCreateLabel(18,180,56,15,"Password:",false,LoginW) 
    guiSetFont(PassL,"default-bold-small") 
    NameED = guiCreateEdit(78,132,233,31,"",false,LoginW) 
    PassED = guiCreateEdit(80,174,233,31,"",false,LoginW) 
    SepAD = guiCreateLabel(335,24,5,276,"|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n",false,LoginW) 
    LoginB = guiCreateButton(23,244,120,32,"Login",false,LoginW) 
    RegisterB = guiCreateButton(192,244,120,32,"Register",false,LoginW) 
    addEventHandler("onClientGUIClick",RegisterB,RegisterC) 
    addEventHandler("onClientGUIClick",LoginB,LoginE) 
end 
  
function LoginE() 
    LP = getLocalPlayer() 
    Name = guiGetText(NameED) 
    Pass = guiGetText(PassED) 
    triggerServerEvent("login",getRootElement(),LP,Name,Pass) 
end 
  
function RegisterE() 
    NameR = guiGetText(NameEDR) 
    PassR = guiGetText(PassEDR) 
    triggerServerEvent("register",getRootElement(),NameR,PassR,Confirm) 
end 
  
addEvent("agree",true) 
addEventHandler("agree",getRootElement(), 
function() 
    destroyElement(LoginW) 
    WelcomeW = guiCreateWindow(0.2188,0.1325,0.5445,0.7725,"Oriental Night Game - Agreement",true) 
    guiWindowSetMovable(WelcomeW,false) 
    guiWindowSetSizable(WelcomeW,false) 
    EngL = guiCreateLabel(18,31,41,16,"English:",false,WelcomeW) 
    MemoEng = guiCreateMemo(20,54,653,224,"Thank you for joining \"Oriental Night Gaming\"!\n\nThis is a server in development and it's just starting, so please be patient while we complete the development and add all the new functions and resources that will make this server a better one!\n\nFor now, please enjoy our Freeroam play, but follow these rules:\n\n1. Do not kill players while using a Jetpack\n2. You are not allowed to kill a player while you're in a vehicle and the player you want to kill is on foot (Get off the vehicle and kill it)\n3. Absolutely NO SPAWN KILLING, if they spawn, let them spawn normally, do not camp them or the present admin will ban you permanently.\n4. No HeliKill (Do not kill with the chopper razors) NOTE: The vehicle weapons have been disabled.\n5. Do not disrespect admins! (If the admin disrespects you, report it!)\n6. No admin impresionation! (Do not copy their names, if they are admins, they will do an admin function or appear in a team)\n7. No Ramming (Do not step on people with a car)\n_______________________________________________\n\nThis is the Member List so far:\n\n- WolfPire\n- Cross\n- MoonLight\n- Toxiccastle\n- Land\n\nDo not accept copy's!\n_______________________________________________\n\nThat's all! Accept if you agree and enjoy our server! =)",false,WelcomeW) 
    guiMemoSetReadOnly(MemoEng,true) 
    MemoEsp = guiCreateMemo(20,334,653,224,"Gracias por entrar a \"Oriental Night Gaming\"!\n\nEste servidor esta en desarrollo y solo esta empezando, asi que por favor se paciente mientras completamos el desarrollo y anadimos todas las nuevas funciones y recursos que haran de este server uno mejor!\n\nPor ahora, disfruta de nuestro juego Freeroam, pero sigue estas reglas:\n\n1. No mates a otros jugadores mientras usas un Jetpack\n2. No tienes permitido matar a otro jugador mientras estas en un auto y el otro jugador a pie (Salte del auto y matalo)\n3. Absolutamente NO MATAR GENTE DONDE APARECEN, si aparecen, dejalos aparecer normalmente, no los esperes o el admin presente te baneara permanentemente.\n4. No matar con el helicoptero (No los mates con las aspas de el helicoptero) NOTA: Las armas de los vehiculos estan desactivadas.\n5. No le faltes el respeto a los admins! (Si el admin te falta el respeto, reportalo!)\n6. No falsifiques a un admin! (No copies sus nombres, si ellos son admins, ellos haran alguna funcion admin o apareceran en algun equipo)\n7. No pises a los demas (No los pises con un auto)\n\n_______________________________________________\n\nEsta es la Lista de Miembros hasta ahora:\n\n- WolfPire\n- Cross\n- MoonLight\n- Toxiccastle\n- Land\n\nNo aceptes copias!\n_______________________________________________\n\nEso es todo! Acepta nuetras reglas si estas de acuerdo y disfruta nuestro server! =)",false,WelcomeW) 
    guiMemoSetReadOnly(MemoEsp,true) 
    Line = guiCreateLabel(21,278,654,20,"______________________________________________________________________________________________________________",false,WelcomeW) 
    guiLabelSetColor(Line,0,255,0) 
    EspL = guiCreateLabel(18,303,44,16,"Espanol:",false,WelcomeW) 
    AcceptB = guiCreateButton(24,568,220,36,"Accept / Aceptar",false,WelcomeW) 
    addEventHandler("onClientGUIClick",AcceptB,AcceptC) 
end 
) 
  
function AcceptC() 
    destroyElement(WelcomeW) 
    showCursor(false) 
end 

________________________________________________________________________________________________________

Server

addEvent("login",true) 
addEventHandler("login",getRootElement(), 
function(thePlayer, Name, Pass) 
            local account = getAccount ( Name , Pass) 
        if ( account ~= false ) then -- If the account exists. 
            logIn ( thePlayer, account, Pass ) 
            outputChatBox ( "Successfully Logged in! Welcome to Oriental Night Gaming!", thePlayer, 0, 255, 0 ) 
            spawnPlayer(thePlayer,2175.8217773438,1285.7143554688,42.224067687988,0,math.random(0,288),0,0) 
            fadeCamera (thePlayer, true) 
            setCameraTarget (thePlayer, thePlayer) 
            triggerClientEvent("agree",getRootElement()) 
                else 
            outputChatBox ( "ERROR: Wrong username or password!", thePlayer, 255, 0, 0 ) -- Output they got the details wrong. 
    end 
end 
) 
  
addEvent("register",true) 
addEventHandler("register",getRootElement(), 
function(thePlayer, NameR, PassR, Confirm) 
    if not (NameR == "") then 
        if not (PassR == "") then 
            if not (Confirm == "") then 
                if PassR == Confirm then 
                    local account = getAccount (NameR,PassR) 
                    if (account == false) then 
                        local accountAdded = addAccount(tostring(NameR),tostring(PassR)) 
                        if (accountAdded) then 
                            outputChatBox ("You've successfully registred! [Name:" .. NameR .. "| Password:" .. PassR .. "]",thePlayer,0,255,0,true ) 
                            setTimer(outputChatBox,800,1,"Try to login now! Remember this information to login!",thePlayer,0,255,0,true ) 
                        else 
                            outputChatBox ("ERROR: Please use another Name/Password.",thePlayer,255,0,0,true) 
                        end 
                    else 
                        outputChatBox ("ERROR: A player with that name already exist.",thePlayer,255,0,0,true) 
                    end 
                else 
                    outputChatBox ("ERROR: The passwords don't match.",thePlayer,255,0,0,true) 
                end 
            else 
                outputChatBox ("ERROR: Please confirm your password.",thePlayer,255,0,0,true) 
            end 
        else 
            outputChatBox ("ERROR: Please put a password.",thePlayer,255,0,0,true) 
        end 
    else 
        outputChatBox ("ERROR: Please put a name.",thePlayer,255,0,0,true) 
    end 
end 
) 
  
function onDeath() 
    setTimer(spawnPlayer,5000,1,source,2175.8217773438,1285.7143554688,42.224067687988,0,math.random(0,288),0,0) 
end 
  
addEventHandler("onPlayerWasted",getRootElement(),onDeath) 
  

The problem in the server resides in the "register" event... I can't get it to work.. i put my username, password and confirm but nothing pops up and at the second time, it says that the user already exist!

"ERROR: en2/en_s.lua:29: attempt to concatenate local 'PassR' (a nil value)"

Link to comment

-- client side:

sWidth,sHeight = guiGetScreenSize() 
  
function onJoin() 
    showCursor(true) 
    LoginW = guiCreateWindow(sWidth/3.3,sHeight/3.3,500,300,"Oriental Night Gaming - Login",false) 
    NameL = guiCreateLabel(28,139,35,15,"Name:",false,LoginW) 
    guiSetFont(NameL,"default-bold-small") 
    PassL = guiCreateLabel(18,180,56,15,"Password:",false,LoginW) 
    guiSetFont(PassL,"default-bold-small") 
    NameED = guiCreateEdit(78,132,233,31,"",false,LoginW) 
    PassED = guiCreateEdit(80,174,233,31,"",false,LoginW) 
    SepAD = guiCreateLabel(335,24,5,276,"|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n",false,LoginW) 
    LoginB = guiCreateButton(23,244,120,32,"Login",false,LoginW) 
    RegisterB = guiCreateButton(192,244,120,32,"Register",false,LoginW) 
    Name = guiGetText(NameED) 
    Pass = guiGetText(PassED) 
    addEventHandler("onClientGUIClick",RegisterB,RegisterC) 
    addEventHandler("onClientGUIClick",LoginB,LoginE) 
end 
  
addEventHandler("onClientResourceStart",getRootElement(),onJoin) 
  
function RegisterC() 
    destroyElement(LoginW) 
    RegisterW = guiCreateWindow(sWidth/3.3,sHeight/3.3,500,300,"Oriental Night Gaming - Register",false) 
    NameLR = guiCreateLabel(28,77,35,15,"Name:",false,RegisterW) 
    guiSetFont(NameLR,"default-bold-small") 
    PassLR = guiCreateLabel(14,120,56,15,"Password:",false,RegisterW) 
    guiSetFont(PassLR,"default-bold-small") 
    NameEDR = guiCreateEdit(78,69,233,31,"",false,RegisterW) 
    PassEDR = guiCreateEdit(80,111,233,31,"",false,RegisterW) 
    SepADR = guiCreateLabel(335,24,5,276,"|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n",false,RegisterW) 
    BackB = guiCreateButton(23,244,120,32,"Back",false,RegisterW) 
    RegisterBR = guiCreateButton(192,244,120,32,"Register",false,RegisterW) 
    ConfEDR = guiCreateEdit(80,154,233,31,"",false,RegisterW) 
    ConfLR = guiCreateLabel(18,163,56,15,"Confirm:",false,RegisterW) 
    guiSetFont(ConfLR,"default-bold-small") 
    NameR = guiGetText(NameEDR) 
    PassR = guiGetText(PassEDR) 
    addEventHandler("onClientGUIClick",BackB,LoginC) 
    addEventHandler("onClientGUIClick",RegisterBR,RegisterE) 
end 
  
function LoginC() 
    destroyElement(RegisterW) 
    LoginW = guiCreateWindow(sWidth/3.3,sHeight/3.3,500,300,"Oriental Night Gaming - Login",false) 
    NameL = guiCreateLabel(28,139,35,15,"Name:",false,LoginW) 
    guiSetFont(NameL,"default-bold-small") 
    PassL = guiCreateLabel(18,180,56,15,"Password:",false,LoginW) 
    guiSetFont(PassL,"default-bold-small") 
    NameED = guiCreateEdit(78,132,233,31,"",false,LoginW) 
    PassED = guiCreateEdit(80,174,233,31,"",false,LoginW) 
    SepAD = guiCreateLabel(335,24,5,276,"|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n",false,LoginW) 
    LoginB = guiCreateButton(23,244,120,32,"Login",false,LoginW) 
    RegisterB = guiCreateButton(192,244,120,32,"Register",false,LoginW) 
    addEventHandler("onClientGUIClick",RegisterB,RegisterC) 
    addEventHandler("onClientGUIClick",LoginB,LoginE) 
end 
  
function LoginE() 
    local Name = guiGetText(NameED) 
    local Pass = guiGetText(PassED) 
    triggerServerEvent("login",localPlayer,localPlayer,Name,Pass) 
end 
  
function RegisterE() 
    local NameR = guiGetText(NameEDR) 
    local PassR = guiGetText(PassEDR) 
    local Confirm = guiGetText(ConfEDR) 
    triggerServerEvent("register",localPlayer,localPlayer,NameR,PassR,Confirm) 
end 
  
addEvent("agree",true) 
addEventHandler("agree",getRootElement(), 
function() 
    destroyElement(LoginW) 
    WelcomeW = guiCreateWindow(0.2188,0.1325,0.5445,0.7725,"Oriental Night Game - Agreement",true) 
    guiWindowSetMovable(WelcomeW,false) 
    guiWindowSetSizable(WelcomeW,false) 
    EngL = guiCreateLabel(18,31,41,16,"English:",false,WelcomeW) 
    MemoEng = guiCreateMemo(20,54,653,224,"Thank you for joining \"Oriental Night Gaming\"!\n\nThis is a server in development and it's just starting, so please be patient while we complete the development and add all the new functions and resources that will make this server a better one!\n\nFor now, please enjoy our Freeroam play, but follow these rules:\n\n1. Do not kill players while using a Jetpack\n2. You are not allowed to kill a player while you're in a vehicle and the player you want to kill is on foot (Get off the vehicle and kill it)\n3. Absolutely NO SPAWN KILLING, if they spawn, let them spawn normally, do not camp them or the present admin will ban you permanently.\n4. No HeliKill (Do not kill with the chopper razors) NOTE: The vehicle weapons have been disabled.\n5. Do not disrespect admins! (If the admin disrespects you, report it!)\n6. No admin impresionation! (Do not copy their names, if they are admins, they will do an admin function or appear in a team)\n7. No Ramming (Do not step on people with a car)\n_______________________________________________\n\nThis is the Member List so far:\n\n- WolfPire\n- Cross\n- MoonLight\n- Toxiccastle\n- Land\n\nDo not accept copy's!\n_______________________________________________\n\nThat's all! Accept if you agree and enjoy our server! =)",false,WelcomeW) 
    guiMemoSetReadOnly(MemoEng,true) 
    MemoEsp = guiCreateMemo(20,334,653,224,"Gracias por entrar a \"Oriental Night Gaming\"!\n\nEste servidor esta en desarrollo y solo esta empezando, asi que por favor se paciente mientras completamos el desarrollo y anadimos todas las nuevas funciones y recursos que haran de este server uno mejor!\n\nPor ahora, disfruta de nuestro juego Freeroam, pero sigue estas reglas:\n\n1. No mates a otros jugadores mientras usas un Jetpack\n2. No tienes permitido matar a otro jugador mientras estas en un auto y el otro jugador a pie (Salte del auto y matalo)\n3. Absolutamente NO MATAR GENTE DONDE APARECEN, si aparecen, dejalos aparecer normalmente, no los esperes o el admin presente te baneara permanentemente.\n4. No matar con el helicoptero (No los mates con las aspas de el helicoptero) NOTA: Las armas de los vehiculos estan desactivadas.\n5. No le faltes el respeto a los admins! (Si el admin te falta el respeto, reportalo!)\n6. No falsifiques a un admin! (No copies sus nombres, si ellos son admins, ellos haran alguna funcion admin o apareceran en algun equipo)\n7. No pises a los demas (No los pises con un auto)\n\n_______________________________________________\n\nEsta es la Lista de Miembros hasta ahora:\n\n- WolfPire\n- Cross\n- MoonLight\n- Toxiccastle\n- Land\n\nNo aceptes copias!\n_______________________________________________\n\nEso es todo! Acepta nuetras reglas si estas de acuerdo y disfruta nuestro server! =)",false,WelcomeW) 
    guiMemoSetReadOnly(MemoEsp,true) 
    Line = guiCreateLabel(21,278,654,20,"______________________________________________________________________________________________________________",false,WelcomeW) 
    guiLabelSetColor(Line,0,255,0) 
    EspL = guiCreateLabel(18,303,44,16,"Espanol:",false,WelcomeW) 
    AcceptB = guiCreateButton(24,568,220,36,"Accept / Aceptar",false,WelcomeW) 
    addEventHandler("onClientGUIClick",AcceptB,AcceptC) 
end 
) 
  
function AcceptC() 
    destroyElement(WelcomeW) 
    showCursor(false) 
end 

Link to comment
-- client side:
sWidth,sHeight = guiGetScreenSize() 
  
function onJoin() 
    showCursor(true) 
    LoginW = guiCreateWindow(sWidth/3.3,sHeight/3.3,500,300,"Oriental Night Gaming - Login",false) 
    NameL = guiCreateLabel(28,139,35,15,"Name:",false,LoginW) 
    guiSetFont(NameL,"default-bold-small") 
    PassL = guiCreateLabel(18,180,56,15,"Password:",false,LoginW) 
    guiSetFont(PassL,"default-bold-small") 
    NameED = guiCreateEdit(78,132,233,31,"",false,LoginW) 
    PassED = guiCreateEdit(80,174,233,31,"",false,LoginW) 
    SepAD = guiCreateLabel(335,24,5,276,"|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n",false,LoginW) 
    LoginB = guiCreateButton(23,244,120,32,"Login",false,LoginW) 
    RegisterB = guiCreateButton(192,244,120,32,"Register",false,LoginW) 
    Name = guiGetText(NameED) 
    Pass = guiGetText(PassED) 
    addEventHandler("onClientGUIClick",RegisterB,RegisterC) 
    addEventHandler("onClientGUIClick",LoginB,LoginE) 
end 
  
addEventHandler("onClientResourceStart",getRootElement(),onJoin) 
  
function RegisterC() 
    destroyElement(LoginW) 
    RegisterW = guiCreateWindow(sWidth/3.3,sHeight/3.3,500,300,"Oriental Night Gaming - Register",false) 
    NameLR = guiCreateLabel(28,77,35,15,"Name:",false,RegisterW) 
    guiSetFont(NameLR,"default-bold-small") 
    PassLR = guiCreateLabel(14,120,56,15,"Password:",false,RegisterW) 
    guiSetFont(PassLR,"default-bold-small") 
    NameEDR = guiCreateEdit(78,69,233,31,"",false,RegisterW) 
    PassEDR = guiCreateEdit(80,111,233,31,"",false,RegisterW) 
    SepADR = guiCreateLabel(335,24,5,276,"|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n",false,RegisterW) 
    BackB = guiCreateButton(23,244,120,32,"Back",false,RegisterW) 
    RegisterBR = guiCreateButton(192,244,120,32,"Register",false,RegisterW) 
    ConfEDR = guiCreateEdit(80,154,233,31,"",false,RegisterW) 
    ConfLR = guiCreateLabel(18,163,56,15,"Confirm:",false,RegisterW) 
    guiSetFont(ConfLR,"default-bold-small") 
    NameR = guiGetText(NameEDR) 
    PassR = guiGetText(PassEDR) 
    addEventHandler("onClientGUIClick",BackB,LoginC) 
    addEventHandler("onClientGUIClick",RegisterBR,RegisterE) 
end 
  
function LoginC() 
    destroyElement(RegisterW) 
    LoginW = guiCreateWindow(sWidth/3.3,sHeight/3.3,500,300,"Oriental Night Gaming - Login",false) 
    NameL = guiCreateLabel(28,139,35,15,"Name:",false,LoginW) 
    guiSetFont(NameL,"default-bold-small") 
    PassL = guiCreateLabel(18,180,56,15,"Password:",false,LoginW) 
    guiSetFont(PassL,"default-bold-small") 
    NameED = guiCreateEdit(78,132,233,31,"",false,LoginW) 
    PassED = guiCreateEdit(80,174,233,31,"",false,LoginW) 
    SepAD = guiCreateLabel(335,24,5,276,"|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n",false,LoginW) 
    LoginB = guiCreateButton(23,244,120,32,"Login",false,LoginW) 
    RegisterB = guiCreateButton(192,244,120,32,"Register",false,LoginW) 
    addEventHandler("onClientGUIClick",RegisterB,RegisterC) 
    addEventHandler("onClientGUIClick",LoginB,LoginE) 
end 
  
function LoginE() 
    local Name = guiGetText(NameED) 
    local Pass = guiGetText(PassED) 
    triggerServerEvent("login",localPlayer,localPlayer,Name,Pass) 
end 
  
function RegisterE() 
    local NameR = guiGetText(NameEDR) 
    local PassR = guiGetText(PassEDR) 
    local Confirm = guiGetText(ConfEDR) 
    triggerServerEvent("register",localPlayer,localPlayer,NameR,PassR,Confirm) 
end 
  
addEvent("agree",true) 
addEventHandler("agree",getRootElement(), 
function() 
    destroyElement(LoginW) 
    WelcomeW = guiCreateWindow(0.2188,0.1325,0.5445,0.7725,"Oriental Night Game - Agreement",true) 
    guiWindowSetMovable(WelcomeW,false) 
    guiWindowSetSizable(WelcomeW,false) 
    EngL = guiCreateLabel(18,31,41,16,"English:",false,WelcomeW) 
    MemoEng = guiCreateMemo(20,54,653,224,"Thank you for joining \"Oriental Night Gaming\"!\n\nThis is a server in development and it's just starting, so please be patient while we complete the development and add all the new functions and resources that will make this server a better one!\n\nFor now, please enjoy our Freeroam play, but follow these rules:\n\n1. Do not kill players while using a Jetpack\n2. You are not allowed to kill a player while you're in a vehicle and the player you want to kill is on foot (Get off the vehicle and kill it)\n3. Absolutely NO SPAWN KILLING, if they spawn, let them spawn normally, do not camp them or the present admin will ban you permanently.\n4. No HeliKill (Do not kill with the chopper razors) NOTE: The vehicle weapons have been disabled.\n5. Do not disrespect admins! (If the admin disrespects you, report it!)\n6. No admin impresionation! (Do not copy their names, if they are admins, they will do an admin function or appear in a team)\n7. No Ramming (Do not step on people with a car)\n_______________________________________________\n\nThis is the Member List so far:\n\n- WolfPire\n- Cross\n- MoonLight\n- Toxiccastle\n- Land\n\nDo not accept copy's!\n_______________________________________________\n\nThat's all! Accept if you agree and enjoy our server! =)",false,WelcomeW) 
    guiMemoSetReadOnly(MemoEng,true) 
    MemoEsp = guiCreateMemo(20,334,653,224,"Gracias por entrar a \"Oriental Night Gaming\"!\n\nEste servidor esta en desarrollo y solo esta empezando, asi que por favor se paciente mientras completamos el desarrollo y anadimos todas las nuevas funciones y recursos que haran de este server uno mejor!\n\nPor ahora, disfruta de nuestro juego Freeroam, pero sigue estas reglas:\n\n1. No mates a otros jugadores mientras usas un Jetpack\n2. No tienes permitido matar a otro jugador mientras estas en un auto y el otro jugador a pie (Salte del auto y matalo)\n3. Absolutamente NO MATAR GENTE DONDE APARECEN, si aparecen, dejalos aparecer normalmente, no los esperes o el admin presente te baneara permanentemente.\n4. No matar con el helicoptero (No los mates con las aspas de el helicoptero) NOTA: Las armas de los vehiculos estan desactivadas.\n5. No le faltes el respeto a los admins! (Si el admin te falta el respeto, reportalo!)\n6. No falsifiques a un admin! (No copies sus nombres, si ellos son admins, ellos haran alguna funcion admin o apareceran en algun equipo)\n7. No pises a los demas (No los pises con un auto)\n\n_______________________________________________\n\nEsta es la Lista de Miembros hasta ahora:\n\n- WolfPire\n- Cross\n- MoonLight\n- Toxiccastle\n- Land\n\nNo aceptes copias!\n_______________________________________________\n\nEso es todo! Acepta nuetras reglas si estas de acuerdo y disfruta nuestro server! =)",false,WelcomeW) 
    guiMemoSetReadOnly(MemoEsp,true) 
    Line = guiCreateLabel(21,278,654,20,"______________________________________________________________________________________________________________",false,WelcomeW) 
    guiLabelSetColor(Line,0,255,0) 
    EspL = guiCreateLabel(18,303,44,16,"Espanol:",false,WelcomeW) 
    AcceptB = guiCreateButton(24,568,220,36,"Accept / Aceptar",false,WelcomeW) 
    addEventHandler("onClientGUIClick",AcceptB,AcceptC) 
end 
) 
  
function AcceptC() 
    destroyElement(WelcomeW) 
    showCursor(false) 
end 

Wow! Thank you very much! =) I owe you one!

_________

Sos groso, sabelo ;3

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...