Jump to content

[SQL] NEED HELP


Recommended Posts

    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

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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...