Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local playerSerial = getPlayerSerial(source)
- if username and password then
- dbQuery(function(queryHandler, source, username, password)
- local result, rows = dbPoll(queryHandler, -1)
- for _, data in ipairs(result) do
- if data["Username"] == username and data["Password"] == password then
- if tonumber(data["Online"]) == (0) then
- if data["Serial"] == playerSerial then
- dbExec(mysql:getConnection(), "UPDATE accounts SET Online = '1' WHERE Username = ?", username)
- else
- outputChatBox("A kiválasztott account nem a te serialodhoz van társítva!", source)
- return
- end
- end
- else
- outputChatBox("A kiválasztott account nem található.", source)
- end
- end
- end, {source, username, password}, mysql:getConnection(), "SELECT * FROM accounts WHERE Username=? AND Password=?", username, password)
- else
- outputChatBox("Nem adtad meg a felhasználónevet vagy a jelszót!", source)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement