Jump to content

logIn errors. ?


Aristates

Recommended Posts

Agbb8z.png

            function Click(AristatesTik, state2, x2, y2) 
                if AristatesTik == "left" and state2 == "down" then 
                    if x2 >= screenW * 0.3812 and y2 >= screenH * 0.5417 and x2 <= screenW * 0.3812+screenW * 0.5125 and y2 <= screenH * 0.5417+screenH * 0.5983 then    
text = guiGetText(edtBx) 
textpass = guiGetText(edtBx2) 
if string.format(#text) ~= "" and string.format(#textpass) then 
triggerServerEvent("test", getLocalPlayer(), text, textpass) 
                    end 
                end 
            end 
            end 
            addEventHandler("onClientClick", root, Click) 
  

addEvent("test", true) 
addEventHandler("test", root, 
    function(text, textpass, player) 
        local account = getAccount(text, textpass) 
        if account then 
            if logIn(player, text, textpass) then 
                outputChatBox("You are now Logged In", player) 
            else 
                outputChatBox("unkown Name.") 
            end 
        else 
           outputChatBox("pasword as Wrong") 
        end 
    end 
) 

Link to comment

You don't need to pass parameter or source. Use

client 

addEvent("test", true) 
addEventHandler("test", root, 
    function(text, textpass) 
        local account = getAccount(text, textpass) 
        if account then 
            if logIn(client, text, textpass) then 
                outputChatBox("You are now Logged In", client) 
            else 
                outputChatBox("unkown Name.", client) 
            end 
        else 
           outputChatBox("pasword as Wrong", client) 
        end 
    end 
) 

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