Jump to content

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


Recommended Posts

function registerPlayer(username,password,passwordConfirm)

      --[[for k,v in ipairs(getAccounts()) do

            if getAccountData(v, "Serial") == getPlayerSerial(source) then

                  noa = noa+1

            end

      end]]

      local noa = dbPoll(dbQuery(dbb, "SELECT value FROM userdata WHERE value = ? AND key= ?", getPlayerSerial(source), "Serial"), -1)

      if #noa < 2 then

            if not (username == "") then

                  if not (password == "") then

                        if not (passwordConfirm == "") then

                              if password == passwordConfirm then

                                    local account = getAccount (username,password)

                                    if (account == false) then

                                          local accountAdded = addAccount(tostring(username),tostring(password))

                                          if (accountAdded) then

                                                setAccountData(accountAdded, "Serial", getPlayerSerial(source))

                                                triggerClientEvent(source,"hideRegisterWindow",getRootElement())

                                                exports["guimessages"]:outputServer(source, "* You have sucessfuly registered! [Username: " .. username .. " #| Password: " .. password .. "]", 255, 255, 255)

                                                setTimer(outputChatBox,800,1,"#0000FF* #FFFFFFYou can now login with your new account.",source,255,255,255,true )

                                          else

                                                exports["guimessages"]:outputServer(source,"* An unknown error has occured! Please choose a different username/password and try again.",

ذي لوحة حساب بس ما تسجل ايش الغلط ممكن مساعدة

Link to comment
  • 2 weeks later...

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