Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function loginHandler(username, password)
- local accountCheck = exports.sql:query_assoc_single( "SELECT * FROM accounts WHERE username = '" .. username .. "' AND password=MD5('" .. password .. "')" )
- if not accountCheck then
- triggerClientEvent (source, "wrongLogin", root)
- else
- if (logIn(client, getAccount(username), password)) then
- local data = exports.sql:query_assoc_single( "SELECT * FROM accounts WHERE username = '" .. username .. "'" )
- setPlayerTeam ( username, getTeamFromName(data.team) )
- spawn(source)
- end
- end
- end
Add Comment
Please, Sign In to add comment