Jump to content

مشكلة في التسجيل


Recommended Posts

السلام عليكم ورحمة الله وبركاته

انا سويت لوحة تسجيل دخول

لكن بزر register

ما يسوي حساب جديد

الدي بق يقول لي المشكلة ب addAccount(user,pass)

الاكواد

addEvent("onReg",true) 
addEventHandler("onReg",root, 
    function (user,pass) 
        local acc = getAccount(user,pass) 
        if acc then 
            outputChatBox("[Login-System] You're account use agian!!",source,255,0,0) 
        else 
            addAccount(user,pass) 
            outputChatBox("[Login-System]: username = " .. user .. "",source,0,255,0) 
            outputChatBox("[Login-System]: password = " .. pass .. "",source,0,255,0) 
        end 
    end 
) 

Link to comment

جيب اكواد الكلينت ماأشوف مشكلة هنا

+

او

جرب

  
addEvent("onReg",true) 
addEventHandler("onReg",root, 
    function (user,pass) 
        local acc = getAccount(user,pass) 
        local Adde = addAccount(user,pass) 
        if acc then 
        if Adde then 
            outputChatBox("[Login-System]: username = " .. user .. "",source,0,255,0) 
            outputChatBox("[Login-System]: password = " .. pass .. "",source,0,255,0) 
        end 
else 
        outputChatBox("[Login-System] You're account use agian!!",source,255,0,0) 
         end 
    end 
) 
  

Edited by Guest
Link to comment

client

addEventHandler("onClientGUIClick",root, 
    function () 
        local user = guiGetText(user) 
        local pass = guiGetText(pass) 
        if ( source == login ) then 
            if user ~= "" and pass ~= "" then 
                if guiCheckBoxGetSelected(remember) then 
                    triggerServerEvent("onLoginWith",localPlayer,user,pass) 
                else 
                    triggerServerEvent("onLogin",localPlayer,user,pass) 
                end 
            else 
                outputChatBox("[Login-System] : You're don't Write Username Or Password",255,0,0) 
            end 
        elseif ( source == reg ) then 
            if user ~= "" and pass ~= "" then 
                triggerServerEvent("onReg",localPlayer,user,pass) 
            else 
                outputChatBox("[Login-System] : You're don't Write Username Or Password",255,0,0) 
            end 
        end 
    end 
) 
  

Link to comment
جيب اكواد الكلينت ماأشوف مشكلة هنا

+

او

جرب

  
addEvent("onReg",true) 
addEventHandler("onReg",root, 
    function (user,pass) 
        local acc = getAccount(user,pass) 
        local Adde = addAccount(user,pass) 
        if acc then 
        if Adde then 
            outputChatBox("[Login-System]: username = " .. user .. "",source,0,255,0) 
            outputChatBox("[Login-System]: password = " .. pass .. "",source,0,255,0) 
        end 
else 
        outputChatBox("[Login-System] You're account use agian!!",source,255,0,0) 
         end 
    end 
) 
  

Link to comment
client
addEventHandler("onClientGUIClick",root, 
    function () 
        local user = guiGetText(user) 
        local pass = guiGetText(pass) 
        if ( source == login ) then 
            if user ~= "" and pass ~= "" then 
                if guiCheckBoxGetSelected(remember) then 
                    triggerServerEvent("onLoginWith",localPlayer,user,pass) 
                else 
                    triggerServerEvent("onLogin",localPlayer,user,pass) 
                end 
            else 
                outputChatBox("[Login-System] : You're don't Write Username Or Password",255,0,0) 
            end 
        elseif ( source == reg ) then 
            if user ~= "" and pass ~= "" then 
                triggerServerEvent("onReg",localPlayer,user,pass) 
            else 
                outputChatBox("[Login-System] : You're don't Write Username Or Password",255,0,0) 
            end 
        end 
    end 
) 
  

مافي خطا اعتقد اتاكد من لوحه من عندك

Link to comment
client
addEventHandler("onClientGUIClick",root, 
    function () 
        local user = guiGetText(user) 
        local pass = guiGetText(pass) 
        if ( source == login ) then 
            if user ~= "" and pass ~= "" then 
                if guiCheckBoxGetSelected(remember) then 
                    triggerServerEvent("onLoginWith",localPlayer,user,pass) 
                else 
                    triggerServerEvent("onLogin",localPlayer,user,pass) 
                end 
            else 
                outputChatBox("[Login-System] : You're don't Write Username Or Password",255,0,0) 
            end 
        elseif ( source == reg ) then 
            if user ~= "" and pass ~= "" then 
                triggerServerEvent("onReg",localPlayer,user,pass) 
            else 
                outputChatBox("[Login-System] : You're don't Write Username Or Password",255,0,0) 
            end 
        end 
    end 
) 
  

مافي خطا اعتقد اتاكد من لوحه من عندك

متأكد من كل شيئ لكن ما يضيف حساب

وانا ضفت المود لجروب ادمن ايضاً

والدي بق يجيب خطأ ب

addAccount(user,pass)

Link to comment

طيب جرب كودي !

  
  
addEvent("onReg",true) 
addEventHandler("onReg",root, 
    function (user,pass) 
        local acc = getAccount(user,pass) 
        local Adde = addAccount(user,pass) 
        if acc then 
        if Adde then 
            outputChatBox("[Login-System]: username = " .. user .. "",source,0,255,0) 
            outputChatBox("[Login-System]: password = " .. pass .. "",source,0,255,0) 
        end 
else 
        outputChatBox("[Login-System] You're account use agian!!",source,255,0,0) 
         end 
    end 
) 
  

Link to comment
طيب جرب كودي !
  
  
addEvent("onReg",true) 
addEventHandler("onReg",root, 
    function (user,pass) 
        local acc = getAccount(user,pass) 
        local Adde = addAccount(user,pass) 
        if acc then 
        if Adde then 
            outputChatBox("[Login-System]: username = " .. user .. "",source,0,255,0) 
            outputChatBox("[Login-System]: password = " .. pass .. "",source,0,255,0) 
        end 
else 
        outputChatBox("[Login-System] You're account use agian!!",source,255,0,0) 
         end 
    end 
) 
  

هريسة

صار يجي لما اضغط على تسجيل

[Login-System] You're account use agian!!

وهذا يعني بأن الحساب موجود وجربت ادخل به يجيني غير مووجود

Link to comment
addEvent("onReg",true) 
addEventHandler("onReg",getRootElement(), 
function (user,pass) 
    if not (user == "") then 
        if not (pass == "") then 
                    local account = getAccount (user, pass) 
                    if (account ~= true) then 
                        local accountAdded = addAccount(tostring(user),tostring(pass)) 
                        if (accountAdded) then 
                        logIn (source, account, pass) 
                        triggerClientEvent (source,"hidep",getRootElement()) 
                        outputChatBox("[Login-System]: Username = " .. user .. "",source,0,255,0)    
                        outputChatBox("[Login-System]: Password = " .. pass .. "",source,0,255,0)                        
                    else 
                        outputChatBox("[Login-System] Use an Another Account",source,255,0,0) -- أستخدم حساب أخر , هذا الحساب مستخدم 
                    end 
        else 
                        outputChatBox("[Login-System] Please write a Password !",source,255,0,0) -- يجب كتابة رقم سري 
        end 
    else 
                        outputChatBox("[Login-System] Please write an Account !",source,255,0,0) -- يجب كتابة أسم حساب 
    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...