Jump to content

GUI Logged In :D


iFoReX

Recommended Posts

Posted

That's because you added to close it.

I'm starting to wonder if you really think what you are doing, because these are really simple errors, do you really want to learn or you're just copying it?

Posted

I have this error in debbugging and I cant register

[2012-03-21 09:28:33] Resource 'logg' changed, reloading and starting 
[2012-03-21 09:28:33] WARNING: logg/tabla_client.lua [Client] is encoded in ANSI instead of UTF-8.  Please convert your file to UTF-8. 
[2012-03-21 09:28:33] Some files in 'logg' use deprecated functions. 
[2012-03-21 09:28:33] Use the 'upgrade' command to perform a basic upgrade of resources. 
[2012-03-21 09:28:33] Starting logg 
[2012-03-21 09:28:33] logg restarted successfully 
[2012-03-21 09:28:45] ERROR: Client triggered serverside event addAccount, but event is not added serverside 

Posted

lol :stupiderror: in client-side I have addAccount and in server-side addAcount xDDD

Now u can help me with this ?

I done this man :

addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if ( source == GUIEditor_Checkbox[1] ) then 
            guiEditSetMasked ( GUIEditor_Edit[2], guiCheckBoxGetSelected ( source ) ) 
        end 
    end 
) 

But Dont edit the masked

Posted
GUIEditor_Window = {} 
GUIEditor_TabPanel = {} 
GUIEditor_Tab = {} 
GUIEditor_Button = {} 
GUIEditor_Memo = {} 
GUIEditor_Checkbox = {} 
GUIEditor_Label = {} 
GUIEditor_Edit = {} 
  
addEventHandler("onClientResourceStart",resourceRoot, 
    function() 
        GUIEditor_Window[1] = guiCreateWindow(130,156,513,341,"GUI Login-Register By ElMota",false) 
        GUIEditor_TabPanel[1] = guiCreateTabPanel(9,38,495,294,false,GUIEditor_Window[1]) 
        GUIEditor_Tab[1] = guiCreateTab("Login",GUIEditor_TabPanel[1]) 
        GUIEditor_Label[1] = guiCreateLabel(12,46,21,21,"Nick",false,GUIEditor_Tab[1]) 
        guiLabelSetColor(GUIEditor_Label[1],200, 0, 0) 
        guiSetFont(GUIEditor_Label[1],"default-bold-small") 
        GUIEditor_Edit[1] = guiCreateEdit(42,42,158,23,"",false,GUIEditor_Tab[1]) 
        guiEditSetMaxLength(GUIEditor_Edit[1],22) 
        GUIEditor_Label[2] = guiCreateLabel(8,113,63,19,"Contrase?a",false,GUIEditor_Tab[1]) 
        guiLabelSetColor(GUIEditor_Label[2],200 ,0 ,0) 
        guiSetFont(GUIEditor_Label[2],"default-bold-small") 
        GUIEditor_Edit[2] = guiCreateEdit(75,108,134,26,"",false,GUIEditor_Tab[1]) 
        guiEditSetMasked(GUIEditor_Edit[2],true) 
        guiEditSetMaxLength(GUIEditor_Edit[2],10) 
        GUIEditor_Button[1] = guiCreateButton(17,182,190,54,"Loggearme",false,GUIEditor_Tab[1]) 
        guiSetFont(GUIEditor_Button[1],"sa-header") 
        GUIEditor_Memo[1] = guiCreateMemo(260,25,222,108,"Favor Loggearse :\n\nPrivilegios de estar loggeado :\n\n- se te guardaran todos tus datos en mi sistema mySQL",false,GUIEditor_Tab[1]) 
        guiMemoSetReadOnly(GUIEditor_Memo[1],true) 
        GUIEditor_Label[3] = guiCreateLabel(213,228,268,34,"GUI Creada por ElMota CopyRight 2011-2012 (c)",false,GUIEditor_Tab[1]) 
        guiLabelSetColor(GUIEditor_Label[3],200,0,0) 
        guiSetFont(GUIEditor_Label[3],"default-bold-small") 
        GUIEditor_Checkbox[1] = guiCreateCheckBox(132,146,354,28,"Acepto los Terminos y Condiciones de este Servidor",false,false,GUIEditor_Tab[1]) 
        guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") 
        GUIEditor_Checkbox[2] = guiCreateCheckBox(28,80,194,22,"Mostrar Contrase?a",false,false,GUIEditor_Tab[1]) 
        guiSetFont(GUIEditor_Checkbox[2],"default-bold-small") 
        GUIEditor_Tab[2] = guiCreateTab("Register",GUIEditor_TabPanel[1]) 
        GUIEditor_Label[4] = guiCreateLabel(4,32,26,16,"Nick",false,GUIEditor_Tab[2]) 
        guiLabelSetColor(GUIEditor_Label[4],200,0,0) 
        guiSetFont(GUIEditor_Label[4],"default-bold-small") 
        GUIEditor_Edit[3] = guiCreateEdit(35,23,176,30,"",false,GUIEditor_Tab[2]) 
        guiEditSetMaxLength(GUIEditor_Edit[3],23) 
        GUIEditor_Label[5] = guiCreateLabel(2,80,65,22,"Contrase?a",false,GUIEditor_Tab[2]) 
        guiLabelSetColor(GUIEditor_Label[5],200,0,0) 
        guiSetFont(GUIEditor_Label[5],"default-bold-small") 
        GUIEditor_Edit[4] = guiCreateEdit(73,74,140,31,"",false,GUIEditor_Tab[2]) 
        guiEditSetMasked(GUIEditor_Edit[4],true) 
        guiEditSetMaxLength(GUIEditor_Edit[4],10) 
        GUIEditor_Label[6] = guiCreateLabel(3,128,40,16,"e-mail",false,GUIEditor_Tab[2]) 
        guiLabelSetColor(GUIEditor_Label[6],200,0,0) 
        guiSetFont(GUIEditor_Label[6],"default-bold-small") 
        GUIEditor_Edit[5] = guiCreateEdit(47,118,168,30,"",false,GUIEditor_Tab[2]) 
        guiEditSetMaxLength(GUIEditor_Edit[5],20) 
        GUIEditor_Button[2] = guiCreateButton(14,179,207,68,"Registrarme",false,GUIEditor_Tab[2]) 
        guiSetFont(GUIEditor_Button[2],"sa-header") 
        GUIEditor_Memo[2] = guiCreateMemo(243,17,240,128,"Recuerda antes De loggearte debes estar registrado aqui osino no podras jugar ^^ GUI Creada por ElMota (c)",false,GUIEditor_Tab[2]) 
        guiMemoSetReadOnly(GUIEditor_Memo[2],true) 
        GUIEditor_Checkbox[3] = guiCreateCheckBox(246,162,215,28,"Mostrar Contrase?a",false,false,GUIEditor_Tab[2]) 
        guiSetFont(GUIEditor_Checkbox[3],"default-bold-small") 
        GUIEditor_Checkbox[4] = guiCreateCheckBox(223,217,263,21,"Acepto los terminos y Condiciones de este server",false,false,GUIEditor_Tab[2]) 
        guiSetFont(GUIEditor_Checkbox[4],"default-small") 
  
        guiSetVisible(GUIEditor_Window[1], false) 
        
        addEventHandler("onClientGUIClick", GUIEditor_Button[1], clientSubmitLogin, false) 
        addEventHandler("onClientGUIClick", GUIEditor_Button[2], clientSubmitaccount, false) 
        
        showTheGUI() 
    end 
) 
  
addEventHandler ( "onClientGUIClick", root, 
    function ( ) 
        if ( source == GUIEditor_Checkbox[2] ) then 
            guiEditSetMasked ( GUIEditor_Edit[2], guiCheckBoxGetSelected ( source ) ) 
        elseif ( source == GUIEditor_Checkbox[3] ) then 
            guiEditSetMasked ( GUIEditor_Edit[4], guiCheckBoxGetSelected ( source ) )            
        end 
    end 
) 
  
function showTheGUI() 
    outputChatBox("Bienvenido a mi Servidor de MTA porfavor Loggeate.") 
  
    -- if the GUI was successfully created, then show the GUI to the player 
    if (GUIEditor_Window[1] ~= nil) then 
        guiSetVisible(GUIEditor_Window[1], true) 
    else 
        -- if the GUI hasnt been properly created, tell the player 
        outputChatBox("An unexpected error has occurred and the log in GUI has not been created.") 
    end 
  
    -- enable the players cursor (so they can select and click on the components) 
    showCursor(true) 
    -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening 
    guiSetInputEnabled(true) 
end 
  
function clientSubmitLogin ( button, state ) 
    if ( button == "left" and state == "up" ) then 
        local username = guiGetText(GUIEditor_Edit[1]) 
        local password = guiGetText(GUIEditor_Edit[2]) 
  
        -- if the username and password both exist 
        if ( username and password ) then 
            triggerServerEvent("submitLogin", localPlayer, username, password) 
  
            guiSetInputEnabled(false) 
            guiSetVisible(GUIEditor_Window[1], false) 
            showCursor(false) 
        else 
           outputChatBox("Porfavor pon tu Nick y tu Contrase?a.") 
        end 
    end 
end 
  
function clientSubmitaccount ( button, state ) 
    if ( button == "left" and state == "up" ) then 
        local username = guiGetText(GUIEditor_Edit[3]) 
        local password = guiGetText(GUIEditor_Edit[4]) 
  
        -- if the username and password both exist 
        if ( username and password ) then 
            triggerServerEvent("addAccount", localPlayer, username, password) 
  
            guiSetInputEnabled(false) 
            guiSetVisible(GUIEditor_Window[1], false) 
            showCursor(false) 
        else 
           outputChatBox("Porfavor pon tu Nick y tu Contraseña.") 
        end 
    end 
end 

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...