Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2016-07-28, 14:09


xDanioPLx

LuA






Wiek: 24
Na forum: 4416 dni
Posty: 24
Nick w MP: xDanioPLx

Piwa: 885

Respekt: 40

Ostrzeżeń: 100%
Cze??,mam problem z panelem logowania a w?a?ciwie jak pr?buje sie zarejestrowa? to wyskakuje oto ten b??d za pomoc daje :piwo: + R*

Kod:
c-side
gui nie podaje bo nie potrzeba.

addEventHandler ("onClientResourceStart"getResourceRootElement(getThisResource()), 
function()
addEventHandler ("onClientRender"getRootElement(), panelek)
guiSetVisible (logujtrue)
guiSetVisible (rejestrujtrue)
guiSetVisible (logintrue)
guiSetVisible (haslotrue)
showCursor (true)
end
)



function zaloguj(buttonstate)
       if button == "left" and state == "up" then
        local username guiGetText(login)
         local password guiGetText(haslo)
          if username and password then
            triggerServerEvent("submitLogin"getRootElement(), localPlayerusernamepassword)
          else
         guiSetText(niedogodnosci"Wpisz swoj login i haslo!")
      end    
   end
end
addEventHandler("onClientGUIClick"logujzalogujfalse)

function zarejestuj(buttonstate)
    if button == "left" and state == "up" then
        local username guiGetText(login)
        local password guiGetText(haslo)
        if username and password then
            if (string.len(username)>=4then
                if (string.len(password)>=4then        
                triggerServerEvent(getLocalPlayer(), "submitRegister"getRootElement(), usernamepassword)
                else
                guiSetText(niedogodnosci"Has?o uzytkownika musi zawiera? co najmniej 4 znaki.")
                end   
            else
            guiSetText(niedogodnosci"Login uzytkownika musi zawierac co najmniej 4 znaki.")    
            end
        else
        guiSetText(niedogodnosci"Wpisz sw?j login i has?o.")
        end
    end 
end
addEventHandler("onClientGUIClick"rejestrujzarejestujfalse)

function hideLoginWindow()
removeEventHandler ("onClientRender"getRootElement(), panelek)
guiSetVisible (logujfalse)
guiSetVisible (rejestruj,false)
guiSetVisible (loginfalse)
guiSetVisible (haslofalse)
showCursor (false)
end
addEvent("hideLoginWindow"true)
addEventHandler("hideLoginWindow"getResourceRootElement(getThisResource()), hideLoginWindow)


B?ad w debugu
http://screenshot.sh/mFdKMOBoePGRP

Podpis

Los Santos Gaming MTA-60%

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-28, 15:28


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

triggerServerEvent(getLocalPlayer(), "submitRegister"getRootElement(), usernamepassword)

na
triggerServerEvent("submitRegister"getLocalPlayer(), usernamepassword)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-28, 15:54


xDanioPLx

LuA






Wiek: 24
Na forum: 4416 dni
Posty: 24
Nick w MP: xDanioPLx

Piwa: 885

Respekt: 40

Ostrzeżeń: 100%
nie dzia?a wsykakuje ten error http://screenshot.sh/mGwl3zP53jpuV

Podpis

Los Santos Gaming MTA-60%

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-28, 15:54


Jacob

Głupiomądry






Wiek: 28
Na forum: 5502 dni
Posty: 967
Nick w MP: Jacob

Piwa: 786

Respekt: 212,3
Respekt: 212,3Respekt: 212,3

Nie masz dodanego eventu po stronie pliku serwerowego.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-28, 15:58


xDanioPLx

LuA






Wiek: 24
Na forum: 4416 dni
Posty: 24
Nick w MP: xDanioPLx

Piwa: 885

Respekt: 40

Ostrzeżeń: 100%
Ustawi?em tak
triggerServerEvent (localPlayer"submitRegister",getRootElement(),usernamepassword)
ale teraz wyskakuje warning ten http://screenshot.sh/mFdKMOBoePGRP

[ Dodano: 2016-07-28, 15:59 ]
s-side

function Loguj_Server(gracz,usernamepassword)
    local account getAccount(usernamepassword)
    if (account ~= falsethen
        if (logIn(graczaccountpassword) == truethen
            triggerClientEvent(gracz,"hideLoginWindow",getRootElement())
            outputChatBox("[GameWorld] Pomyslnie zalogowano na konto",gracz,255,255,255,true)
        else
        outputChatBox("[GameWorld] System nie moze za?adowac konta przepraszamy za utrudnienia.",gracz,255,255,255,true)
        end
    else
    outputChatBox("[GameWorld] Poda?es z?y login lub has?o.",gracz,255,255,255,true)
    end
end

addEvent("submitLogin",true)
addEventHandler("submitLogin",getRootElement(),Loguj_Server)

function Rejestruj_Server(gracz,usernamepassword)
    local account getAccount(usernamepassword)
    if (account ~= falsethen
    outputChatBox("[GameWorld] Takie konto ju? istnieje na serwerze prosze wybra? inne.",gracz,255,255,255,true)
    else
            account addAccount(usernamepassword)

            setElementData(gracz,"konto_login",username)
            outputChatBox("[GameWorld] Konto zosta?o pomyslnie zarejstrowane."gracz02550)

    end
end 

function setCameraOnPlayerJoin()
     fadeCamera(sourcetrue10)
     setCameraMatrix(source, -2013.90920.4858.83, -918.4247436523499.881813049316)
end
addEventHandler("onPlayerJoin"getRootElement(), setCameraOnPlayerJoin)


Podpis

Los Santos Gaming MTA-60%

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-28, 17:59


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

function Loguj_Server(gracz,usernamepassword)
    local account getAccount(usernamepassword)
    if (account ~= falsethen
        if (logIn(graczaccountpassword) == truethen
            triggerClientEvent(gracz,"hideLoginWindow",getRootElement())
            outputChatBox("[GameWorld] Pomyslnie zalogowano na konto",gracz,255,255,255,true)
        else
        outputChatBox("[GameWorld] System nie moze za?adowac konta przepraszamy za utrudnienia.",gracz,255,255,255,true)
        end
    else
    outputChatBox("[GameWorld] Poda?es z?y login lub has?o.",gracz,255,255,255,true)
    end
end

addEvent("submitLogin",true)
addEventHandler("submitLogin",getRootElement(),Loguj_Server)

function Rejestruj_Server(gracz,usernamepassword)
    local account getAccount(usernamepassword)
    if (account ~= falsethen
    outputChatBox("[GameWorld] Takie konto ju? istnieje na serwerze prosze wybra? inne.",gracz,255,255,255,true)
    else
            account addAccount(usernamepassword)

            setElementData(gracz,"konto_login",username)
            outputChatBox("[GameWorld] Konto zosta?o pomyslnie zarejstrowane."gracz02550)

    end
end 
addEvent("submitRegister"true)
addEventHandler("submitRegister",getRootElement(), Rejestruj_Server)

function setCameraOnPlayerJoin()
     fadeCamera(sourcetrue10)
     setCameraMatrix(source, -2013.90920.4858.83, -918.4247436523499.881813049316)
end
addEventHandler("onPlayerJoin"getRootElement(), setCameraOnPlayerJoin)


Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-28, 18:01


xDanioPLx

LuA






Wiek: 24
Na forum: 4416 dni
Posty: 24
Nick w MP: xDanioPLx

Piwa: 885

Respekt: 40

Ostrzeżeń: 100%
Dzieki stawiam :piwo: i R* !:)
Temat do zamkniecia.

Podpis

Los Santos Gaming MTA-60%

Postaw piwo autorowi tego posta
 

 
Tagi: panel :: logowania
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Panel Logowania Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku