Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. function regi()
  2. local lekeres = triggerClientEvent(localPlayer, "gettext1", localPlayer)
  3. outputChatBox("0", thePlayer)
  4. local lekeres2 = triggerClientEvent(localPlayer, "gettext2", localPlayer)
  5. outputChatBox("1", thePlayer)
  6. if lekeres2 == "" then
  7. outputChatBox("2", thePlayer)
  8. outputChatBox("#87CEFA[FayMTA]#d9d9d9 Írj be egy felhasználót!",255,255,255,true)
  9. else
  10. outputChatBox("3", thePlayer)
  11. local username = nil
  12. local hozzaadott = mysql_query(handler,"SELECT * FROM accounts WHERE username = " .. username .. ";")
  13. outputChatBox("4", thePlayer)
  14. local gettext = lekeres
  15. outputChatBox("5", thePlayer)
  16. if not (hozzaadott) == (gettext) then
  17. outputChatBox("6", thePlayer)
  18. local szoveg1 = triggerClientEvent(localPlayer, "gettext1", localPlayer)
  19. outputChatBox("7", thePlayer)
  20. local szoveg2 = triggerClientEvent(localPlayer, "gettext2", localPlayer)
  21. outputChatBox("8", thePlayer)
  22. local hozzaadva = addAccount(szoveg1,szoveg2)
  23. outputChatBox("9", thePlayer)
  24. if hozzaadva then
  25. outputChatBox("9", thePlayer)
  26. outputChatBox("#87CEFA[FayMTA]#d9d9d9 Account regisztrálva!",255,255,255,true)
  27. local felh = triggerClientEvent(localPlayer, "gettext1", localPlayer)
  28. local password = triggerClientEvent(localPlayer, "gettext2", localPlayer)
  29. outputChatBox("lokál oké", thePlayer)
  30. local query = "INSERT INTO accounts SET username='" .. felh .. "', password='".. password .."'"
  31. if query then
  32. outputChatBox("query megy", thePlayer)
  33. else
  34. outputChatBox("query nem megy", thePlayer)
  35. end
  36. else
  37. outputChatBox("script hiba", thePlayer)
  38. end
  39. else
  40. outputChatBox("#87CEFA[FayMTA]#d9d9d9 A felhasználó már regisztrálva van.",255,255,255,true)
  41. end
  42. end
  43. end
  44. addEvent("regisztralt", true)
  45. addEventHandler("regisztralt", getRootElement(), regi)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement