Sziasztok!
Nem tudok belépni ezeket írja Console-ban:
https://p1.picsto.re/gNXqB.PNGhttps://p1.picsto.re/UdRet.PNGA file:
function playerRegister(player, username, password, password2)
local md5password = md5(password)
if(password~=password2)then
triggerClientEvent(\"info\",player,\"A felhasználónév túl rövid!\", \"red\")
return
end
if(string.len(username)<5)then
triggerClientEvent(\"info\",player,\"A felhasználónév túl rövid!\", \"red\")
return
end
if(string.len(password)<5)then
triggerClientEvent(\"info\", player, \"A jelszó túl rövid!\", \"red\")
return
end
serial = getPlayerSerial(player)
dbQuery(function(qh, player, username, md5password)
local a, b, c = dbPoll(qh, 0)
if b > 0 then
outputChatBox(\"Neked már van accountod\")
regisztalhat = false
return
end
end, {player,username,md5password}, mysql:getConnection(), (\"SELECT * FROM characters WHERE charactername=\'\" .. safecharname .. \"\' AND account=\'\" .. mysql:escape_string(id) .. \"\' AND cked = 0\")
dbQuery(function(qh, player, username, md5password)
local result, rows, errorMsg = dbPoll(qh, 0)
if not regisztalhat then return end
if rows > 0 then
exports.sg_box:addNotification(\"Ez a felhasználónév már foglalt!\",\"red\")
else
local _, id = mysql:query_free(\"INSERT INTO accounts SET serial = \'\".. serial ..\"\', username = \'\"..tostring(username)..\"\', password = \'\"..tostring(md5password)..\"\'\", true)
exports.sg_box:addNotification(\"Sikeresen regisztráltál!\",\"green\")
end
end, {player,username,md5password}, mysql:getConnection(), \"SELECT * FROM accounts WHERE username = ? LIMIT 1\", username)
end
addEvent(\"playerRegister\", true)
addEventHandler(\"playerRegister\", getRootElement(), playerRegister)
Előre is köszi a segítséget!