1LoL1 Posted August 22, 2017 Share Posted August 22, 2017 Always when i login i see message Welcome Back! but when i login with new account i don't see message and i'am not spawned.. Can anyone help me please? function lacc (_, acc) local account = getAccountName(acc) local result = dbQuery (database, "SELECT * FROM SERVER WHERE Account = ?", account) local poll, rows = dbPoll(result, -1) if rows == 1 then if getAccountData(acc, "NewUser") then spawnPlayer(source, x, y, z, 0, 0, 0, 0) outputChatBox("Welcome Back!") else spawnPlayer(source, x, y, z, 0, 0, 0, 0) setAccountData(acc, "NewUser", "NewUser") outputChatBox("Welcome (NewUser)") end end end addEventHandler("onPlayerLogin", getRootElement(), lacc) Link to comment
Administrators Lpsd Posted August 23, 2017 Administrators Share Posted August 23, 2017 Because there is either 0 results in rows or more than 1. So there are either 0 accounts in the database, or duplicate accounts Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now