tdthanatorn22 Posted July 31, 2013 Share Posted July 31, 2013 (edited) ------delete---------- Edited August 3, 2013 by Guest Link to comment
xXMADEXx Posted July 31, 2013 Share Posted July 31, 2013 Why dont you just use the default MTA functions? There more efficient. Link to comment
tdthanatorn22 Posted July 31, 2013 Author Share Posted July 31, 2013 (edited) -delete- Edited August 3, 2013 by Guest Link to comment
xXMADEXx Posted July 31, 2013 Share Posted July 31, 2013 use these for your database stuff: https://wiki.multitheftauto.com/wiki/Se ... _functions Link to comment
tdthanatorn22 Posted July 31, 2013 Author Share Posted July 31, 2013 use these for your database stuff:https://wiki.multitheftauto.com/wiki/Se ... _functions sry man uhh.. I'm a newbiw how i can ? Link to comment
Wei Posted July 31, 2013 Share Posted July 31, 2013 He's using MTA Venux made by AeroXBird. You must set the sql resource at first place at mtaserver.conf Link to comment
tdthanatorn22 Posted July 31, 2013 Author Share Posted July 31, 2013 He's using MTA Venux made by AeroXBird.You must set the sql resource at first place at mtaserver.conf omg it's work thak you Link to comment
tdthanatorn22 Posted July 31, 2013 Author Share Posted July 31, 2013 (edited) -delete- Edited August 3, 2013 by Guest Link to comment
Wei Posted July 31, 2013 Share Posted July 31, 2013 local function connect( ) -- retrieve the settings local server = get( "server" ) or "127.0.0.1" -- server local user = get( "user" ) or "root" -- username local password = get( "password" ) or "21242722" -- password local db = get( "database" ) or "rpvx" -- database local port = get( "port" ) or 3306 local socket = get( "socket" ) or nil Link to comment
tdthanatorn22 Posted July 31, 2013 Author Share Posted July 31, 2013 (edited) -delete- Edited August 3, 2013 by Guest Link to comment
tdthanatorn22 Posted July 31, 2013 Author Share Posted July 31, 2013 When register i got this log INFO: Column count doesn't match value count at row 1 Link to comment
Wei Posted July 31, 2013 Share Posted July 31, 2013 Did you execute .sql file in phpmyadmin ? Link to comment
tdthanatorn22 Posted July 31, 2013 Author Share Posted July 31, 2013 (edited) -delete- Edited August 3, 2013 by Guest Link to comment
Wei Posted July 31, 2013 Share Posted July 31, 2013 replace the function attemptRegister in s_account.lua with this one function attemptRegister(thePlayer, username, password) if ( username ~= "" and password ~= "" ) then local success, error = exports.sql:query_free("INSERT INTO `accounts` VALUES('', '".. tostring(username) .."', '".. md5( tostring( password ) ) .."', '".. getPlayerSerial(thePlayer) .."', '0','0')") if ( error ) then return outputDebugString( error ) else return outputChatBox("Successfully registered your account!", thePlayer, 100, 0, 100) end end end Link to comment
tdthanatorn22 Posted July 31, 2013 Author Share Posted July 31, 2013 replace the function attemptRegister in s_account.lua with this one function attemptRegister(thePlayer, username, password) if ( username ~= "" and password ~= "" ) then local success, error = exports.sql:query_free("INSERT INTO `accounts` VALUES('', '".. tostring(username) .."', '".. md5( tostring( password ) ) .."', '".. getPlayerSerial(thePlayer) .."', '0','0')") if ( error ) then return outputDebugString( error ) else return outputChatBox("Successfully registered your account!", thePlayer, 100, 0, 100) end end end oh yeah I luv u very muchhhhhhh lol so much thanks 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