tdthanatorn22 Posted July 31, 2013 Posted July 31, 2013 (edited) ------delete---------- Edited August 3, 2013 by Guest
xXMADEXx Posted July 31, 2013 Posted July 31, 2013 Why dont you just use the default MTA functions? There more efficient.
tdthanatorn22 Posted July 31, 2013 Author Posted July 31, 2013 (edited) -delete- Edited August 3, 2013 by Guest
xXMADEXx Posted July 31, 2013 Posted July 31, 2013 use these for your database stuff: https://wiki.multitheftauto.com/wiki/Se ... _functions
tdthanatorn22 Posted July 31, 2013 Author 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 ?
Wei Posted July 31, 2013 Posted July 31, 2013 He's using MTA Venux made by AeroXBird. You must set the sql resource at first place at mtaserver.conf
tdthanatorn22 Posted July 31, 2013 Author 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
tdthanatorn22 Posted July 31, 2013 Author Posted July 31, 2013 (edited) -delete- Edited August 3, 2013 by Guest
Wei Posted July 31, 2013 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
tdthanatorn22 Posted July 31, 2013 Author Posted July 31, 2013 (edited) -delete- Edited August 3, 2013 by Guest
tdthanatorn22 Posted July 31, 2013 Author Posted July 31, 2013 When register i got this log INFO: Column count doesn't match value count at row 1
tdthanatorn22 Posted July 31, 2013 Author Posted July 31, 2013 (edited) -delete- Edited August 3, 2013 by Guest
Wei Posted July 31, 2013 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
tdthanatorn22 Posted July 31, 2013 Author 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
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