function loginAccount(login, password)
local performLogin = exports.TR_mysql:query("SELECT UID, password, username, tutorial FROM `accounts` WHERE `login` = ? LIMIT 1", login)
if performLogin and performLogin[1] then
if passwordVerify(password, performLogin[1]["password"]) then
if isPlayerLogged(performLogin[1]["UID"]) then triggerClientEvent(client, "loginResponseServer", resourceRoot, "Esta conta já está logada.", "error") return end
if performLogin[1].usernane then
setPlayerName(client, performLogin[1].username)
end
setElementData(client, "tempUID", performLogin[1].UID)
exports.TR_mysql:query("UPDATE accounts SET isOnline = 1, lastOnline = NOW() WHERE `UID` = ? LIMIT 1", performLogin[1].UID)
triggerClientEvent(client, "loginPlayer", resourceRoot, performLogin[1].username, performLogin[1].tutorial)
exports.TR_mysql:query("UPDATE `accounts` SET `lastOnline` = NOW() WHERE UID = ? LIMIT 1;", performLogin[1].UID)
else
triggerClientEvent(client, "loginResponseServer", resourceRoot, "A senha inserida está incorreta.", "error")
end
else
triggerClientEvent(client, "loginResponseServer", resourceRoot, "Esse usuário não existe.", "error")
end
end
addEvent("loginAccount", true)
addEventHandler("loginAccount", resourceRoot, loginAccount)
ERROR IN COMMAND:
Bad argument @ 'passwordVerify' [Expected string at argument 2, got nill]
I am unable to use passwordVerify