Jump to content

login & welcome


Recommended Posts

I'd like to combine a login and a welcome window script.

This is the beginning of the serverside login lua file:

function clientAttemptLogin(username,password) 
    local userAccount = getAccount(username) 
    local tryToLog 
    if (client) then 
        tryToLog = logIn(client,userAccount,password) 
        if (tryToLog) then 
            outputChatBox("Minden van!",client) 
            triggerClientEvent(source,"clientLoginSuccess",getRootElement()) 
            triggerClientEvent(source,"( theResource )",getRootElement()) 
        else 
            outputChatBox("Ezt elkurtad!",client) 
        end 
    end 
end 

and there is the beginning of the clientside welcome:

localPlayer = getLocalPlayer() 
  
wnd_window = {} 
  
   
    function ( theResource ) 
        --outputConsole( "wnd_showServerInfo called" ) 
        --outputConsole( " source: ".. tostring( source ) ) 
        --outputConsole( " resourceStarted: ".. tostring( theResource ) ) 
        if source == getResourceRootElement( theResource ) then 
            --outputConsole( " passed if: source == resource" ) 
            local xml = xmlLoadFile( "server.xml" ) 
            local contents = xmlNodeGetValue( xml ) 
            wnd_create( "Ablakgeci", "logo.png", contents ) 
        end 
    end 
) 

Could someone please help me to fix this? Thx for any replies.

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