Moin,
Ich habe ein Proplem. Egal was für Passwort ich her nehme ich kann mich einloggen?
Ich wäre sehr dankbar wenn ihr mir weiter helfen Könnt
Lua
function longer(username,pass)
local function queryCallback(query)
local result = dbPoll(query,0)
if result then
for _,row in pairs(result) do
local Passa = row["Passwort"]
local x = row["X"]
local y = row["Y"]
local z = row["Z"]
local SKINI = row["SKIN"]
outputChatBox(Passa)
local passe = md5(pass)
end
end
end
dbQuery(queryCallback, MySQLConnection, "SELECT * FROM user WHERE `Username` = '"..username.."'")
if passe == Passa then
spawnPlayer (source, x, y, 50, 0,SKINI, 0, 0) -- spawns player with random skin
fadeCamera (source, true)
setCameraTarget (source, source)
outputChatBox("JA")
else
triggerClientEvent ( "Loginn", source )
outputChatBox("Nein")
end
end
addEvent("Login_ww",true)
addEventHandler( "Login_ww", root, longer )
Alles anzeigen
Lua: Client
function logs()
createEditBox( "6", 0.3375, 0.4966666666666667, 0.2225, 0.0266666666666667, true, "", false, 10, "arial", false, 0, { 0, 200, 0, 180 }, true, { 255, 255, 255, 180 }, 2, true, 60, true, "max. 10", { 0, 0, 0, 40 }, true, 3, "arial", true, true, {0, 114, 210}, false )
end
function dxButtonClic(_,state)
local pass = getText("6")
local username = getPlayerName(localPlayer)
if state == "down" then
if dxhover( 519, 277, 607, 310) then
triggerServerEvent ( "Login_ww",getLocalPlayer(),username,pass)
showCursor(false)
removeEventHandler("onClientClick", getRootElement(), dxButtonClic)
removeEventHandler("onClientRender",root,Login_W)
deleteEditBox("6")
end
end
end
function Login_Windows()
logs()
addEventHandler("onClientRender",root,Login_W)
addEventHandler("onClientClick", getRootElement(), dxButtonClic)
showCursor(true)
end
addEvent( "Loginn", true )
addEventHandler( "Login", localPlayer, Login_Windows())
Alles anzeigen