Artisz Posted August 11, 2016 Share Posted August 11, 2016 Hi! I don't know how can I do this, I have some problem with this. Here is the code, when the player is logging in: addEvent("onPlayerAttemptLogin",true) addEventHandler("onPlayerAttemptLogin",root, function(username,password) if (exports["secret_main"]:singleQuery("SELECT * FROM accounts WHERE username=? LIMIT 1",string.lower(username))) then local accData = exports["secret_main"]:singleQuery("SELECT * FROM accounts WHERE username=? AND password=? LIMIT 1",string.lower(username),sha256(password)) if (accData) then local banQuery = dbQuery( kapcsolat, "SELECT * FROM `tiltasok` WHERE `felhasznalo`=?? LIMIT 1", accData.id) local banQueryEredmeny, sorokSzama = dbPoll ( banQuery, -1 ) if(sorokSzama ~= 0) then local banData = exports["secret_main"]:singleQuery("SELECT * FROM `tiltasok` WHERE `felhasznalo`=? LIMIT 1",accData.id) if(tostring(banData.meddig) <= tostring(getRealTime())) then dbExec(kapcsolat, "DELETE FROM `tiltasok` WHERE felhasznalo='??'", accData.id) else kickPlayer(source, "Ki vagy tiltva a szerverről!") end elseif(sorokSzama == 0) then -- ..........ETC.. -- ..........ETC.. -- ..........ETC.. And it isn't kick me, when I am banned. I can logging in. How can I do it? Link to comment
ozulus Posted August 11, 2016 Share Posted August 11, 2016 `felhasznalo`=?? change to `felhasznalo`=? Link to comment
Artisz Posted August 11, 2016 Author Share Posted August 11, 2016 It's still bad. It's delete the ban from mysql, and I can connected, however I am banned 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