Jump to content

خطا في لوحة تسجيل


Recommended Posts

: .. بسيرفر سايد الى onReg استبدل حدث

addEvent ( "onReg", true ) 
addEventHandler ( "onReg", root, function ( user, pass ) 
    if ( user and pass and type ( user ) == "string" and type ( pass ) == "string" ) then 
        local account = getAccount ( user ) 
        if ( not account ) then 
            local account = addAccount ( user, pass ) 
            if ( account ) then 
                if ( not logIn ( source, account, pass ) ) then 
                    return outputChatBox ( "Login Error!", source, 255, 0, 0 ) 
                end 
                triggerClientEvent ( source, "Hidewindow", source ) 
            else 
                 return outputChatBox ( "Register Error !", source, 255, 0, 0 ) 
             end 
        else 
             return outputChatBox ( "Account is registered", source, 255, 0, 0 ) 
           end 
      end 
    return false 
end ) 
Link to comment

الوجن اشتغل

بس مشكلة في عمل حساب

مايسوي شئ اطغط علية مايسوي شئ

استخدمت كود زاحف مايسوي شئ

بس لما احط كودك يا ماكس

يقول

ERROR: xXlogin\server.lua28:attemt to concalenate local 'pass' (a nill value) 

يقول كذا في الريجستر

Link to comment

انسخ ذا سيرفر . .

addEvent('onlogin', true) 
addEventHandler('onlogin',root, 
    function (user, pass) 
        local account = getAccount ( user, pass ) 
    if ( account ~= true ) then 
        if (logIn ( source, account, pass ) == true) then 
            outputChatBox ( "You Logged in Sucessfuly!", source, 255, 255, 0 , true ) 
            triggerClientEvent (source, "Hidewindow", source) 
        else 
            outputChatBox ( "Login Error!", source, 255, 0, 0 ) 
        end 
    else 
        outputChatBox ( "Wrong username or password!", source, 255, 0, 0 ) 
    end 
    end 
) 
  
  
addEvent('onReg',true) 
addEventHandler('onReg',root, 
    function (user,pass) 
        local account = getAccount(user,pass) 
        if ( account ) then 
            outputChatBox("* This Account is Already Used",source,255,0,0) 
            triggerClientEvent (source, "Hidewindow", source) 
        else 
            addAccount(user,pass) 
            outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", source, 255, 255, 0 , true ) 
            triggerClientEvent (source, "Hidewindow", source) 
        end 
    end 
) 
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...