Guest User

Untitled

a guest
Jun 8th, 2018
452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. function loginHandler(username, password)
  2.     local accountCheck = exports.sql:query_assoc_single( "SELECT * FROM accounts WHERE username = '" .. username .. "' AND password=MD5('" .. password .. "')" )
  3.     if not accountCheck then
  4.         triggerClientEvent (source, "wrongLogin", root)    
  5.     else
  6.     if (logIn(client, getAccount(username), password)) then
  7.     local data = exports.sql:query_assoc_single( "SELECT * FROM accounts WHERE username = '" .. username .. "'" )
  8.     setPlayerTeam ( username, getTeamFromName(data.team) )
  9.     spawn(source)
  10.         end
  11.     end
  12. end
Add Comment
Please, Sign In to add comment