Jump to content

thegergo02

Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About thegergo02

  • Rank
    Vic

Details

  • Location
    Japan
  • Occupation
    SCRIEPTKIDDIE

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. function _Login(username,password,thePlayer) outputChatBox( username ) outputChatBox( password ) if username and exports.tp_sql:_QuerySingle("select username from users where username = ? ",username) then if password and exports.tp_sql:_QuerySingle("select password from users where username = ? ",username) == sha256(password) then token = generateToken(35) outputChatBox( token ) user_id = exports.tp_sql:_QuerySingle("select id from users where username = ? ",username) outputChatBox(user_id) exports.tp_sql:_Exec("insert into login_tokens(token,user_id) values (?,?)",token,us
  2. function _QuerySingle(str,...) if connection then local result = _Query(str,...) if type(result) == 'table' then return result[1] end else return false end end function _Exec(str,...) if connection then local query = dbExec(connection,str,...) return query else return false end end
  3. function _Login(thePlayer,username,password) if username and exports.tp_sql:_QuerySingle("select username from users where username = ? ",username) then if password and exports.tp_sql:_QuerySingle("select password from users where username = ? ",username) == sha256(password) then token = generateToken(35) outputChatBox( token ) user_id = exports.tp_sql:_QuerySingle("select id from users where username = ? ",username) outputChatBox(user_id) exports.tp_sql:_Exec("insert into login_tokens(token,user_id) values (?,?)",token,user_id) setElementData(thePlayer,'reglog:token',sha2
×
×
  • Create New...