Witam , posiadam panel i mam dwa problem , poniewa? nie wiem jak przerobi? by panel logowania zapisywa? konta i has?a w XML a drugi to ?e po na ci?nieniu przycisku Zarejestruj nie rejestruje konta.
Server:
[code]function onZaloguj ( player, user, pass )
local account = getAccount ( user, pass )
if ( account ~= false ) then
if (logIn ( player, account, pass ) == true) then
triggerClientEvent (player,"ZamknijOkno", getRootElement())
else
outputChatBox ( "Z?y Login!", player, 255, 255, 0 ) -- Output they got the details wrong.
end
else
outputChatBox ( "Wrong username or password!", player, 255, 255, 0 ) -- Output they got the details wrong.
end
end
addEvent( "onZaloguj", true )
addEventHandler( "onZaloguj", getRootElement(), onZaloguj )
function onZarejestruj ( player, user, pass,player )
local account = getAccount ( user, pass )
if ( account ~= false ) then
if (logIn ( player, account, pass ) == true) then
triggerClientEvent ( "ZamknijOkno", getRootElement())
else
outputChatBox ( "Z?y Login!", player,255,0, 0 ) -- Output they got the details wrong.
end
else
account = addAccount ( user, pass )
outputChatBox ( "Zarejestrowales sie!", player,255,255, 0 )
if (logIn ( player, account, pass ) == true) then
triggerClientEvent ( "ZamknijOkno", getRootElement())
else
outputChatBox ( "B?ad przy Rejestracji!...