Guest User

Untitled

a guest
Aug 10th, 2018
763
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. -- Registration here
  2. function registerPlayer(username,password,passwordConfirm)
  3. if not (username == "") then
  4. if not (password == "") then
  5. if not (passwordConfirm == "") then
  6. if password == passwordConfirm then
  7. local account = getAccount (username,password)
  8. if (account == false) then
  9. local accountAdded = addAccount(tostring(username),tostring(password))
  10. if (accountAdded) then
  11. triggerClientEvent(source,"hideRegisterWindow",getRootElement())
  12. outputChatBox ("You have been registered successfully [Username " .. username .. " Password" .. password .. "]",source,255,255,255,true )
  13. setTimer(outputChatBox,800,1,"#F00000Ahora puede ingresar con su nueva cuenta.",source,255,255,255,true )
  14. else
  15. outputChatBox ("#F00000Error!Choose username/password and try again.",source,255,255,255,true )
  16. end
  17. else
  18. outputChatBox ("#F00000Error! This account exits already!",source,255,255,255,true )
  19. end
  20. else
  21. outputChatBox ("#F00000Error! Characters doesnt match!",source,255,255,255,true)
  22. end
  23. else
  24. outputChatBox ("#F00000Error! Fortify the password!",source,255,255,255,true)
  25. end
  26. else
  27. outputChatBox ("#F00000Error! Set key!",source,255,255,255,true)
  28. end
  29. else
  30. outputChatBox ("#F00000Error! You welcome and put username and password to register!",source,255,255,255,true)
  31. end
  32. end
  33. addEvent("onRequestRegister",true)
  34. addEventHandler("onRequestRegister",getRootElement(),registerPlayer)
Add Comment
Please, Sign In to add comment