Jump to content

LoginPanel Problem


Matevsz

Recommended Posts

@Edit

now, i have 0 errors, but black screen :(

Please see whether you work you.

http://speedy.sh/Kvcqh/LoginPanel.zip

in file login_client.lua is this function:

  
  
function openLogin(colorCode) 
    loginData.loginState = "login" 
    local resource = getResourceFromName("race") 
    if resource then 
        loginData.font,loginData.fontScale,loginData.colorData = call(resource,"getRaceSettings") 
        loginData.font = dxCreateFont(":race/common/race_font.ttf",sY/20,true) or "default-bold" 
        if not loginData.fontScale then loginData.fontScale = sY/100 end 
        if not loginData.colorData then loginData.colorData = {0,176,255} end 
    end 
    if colorCode then 
        local r,g,b = getColorFromString(colorCode) 
        if r and g  and b then 
            loginData.colorData = {r,g,b} 
        end 
    end 
    dxLib.font = loginData.font 
    dxLibCreateEdit(loginData.loginEdit,0,0,sX*0.1,sY*0.04,"Nazwa użytkownika","person",20,20,20,loginData.loginAlpha,false,false) 
    dxLibCreateEdit(loginData.passwordEdit,0,0,sX*0.1,sY*0.04,"Twoje hasło","password",20,20,20,loginData.loginAlpha,false,true) 
    loginData.animState = true 
    loginData.animTick = getTickCount() 
    loginData.loginAlpha = 0 
    loginData.backgroundAlpha = 255 
    showChat(false) 
    showCursor(true) 
    addEventHandler("onClientRender",getRootElement(),renderLoginInterface) 
    addEventHandler("onClientRender",getRootElement(),renderLoginMessages) 
    loadXMLData() 
    setElementData(localPlayer,"loginState",true,false) 
end 
addEvent("onServerWantIniteteLoginPanel",true) 
addEventHandler("onServerWantIniteteLoginPanel",getRootElement(),openLogin) 
  

Login panel will not open without gamemode "race" as a remodel to run without the gamemode "race"?

Link to comment

I remove but it does not do anything

I think you need to remove something from the login client.lua (race)

My meta.xml:

  
<meta> 
     
    <file src="loginImage/background.jpg" /> 
    <file src="loginImage/background2.jpg" /> 
     
    <file src="loginImage/password.png" /> 
    <file src="loginImage/person.png" /> 
    <file src="loginImage/button.png" /> 
     
    <file src="loginImage/switchBackground.png" /> 
    <file src="loginImage/switchCenter.png" /> 
    <file src="loginImage/switchSlide.png" /> 
     
     
    <script src="dx_lib.lua" type="client" /> 
    <script src="login_client.lua" type="client" /> 
     
    <script src="login_server.lua" type="server" /> 
</meta> 
  

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