Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function regi()
- local lekeres = triggerClientEvent(localPlayer, "gettext1", localPlayer)
- outputChatBox("0", thePlayer)
- local lekeres2 = triggerClientEvent(localPlayer, "gettext2", localPlayer)
- outputChatBox("1", thePlayer)
- if lekeres2 == "" then
- outputChatBox("2", thePlayer)
- outputChatBox("#87CEFA[FayMTA]#d9d9d9 Írj be egy felhasználót!",255,255,255,true)
- else
- outputChatBox("3", thePlayer)
- local username = nil
- local hozzaadott = mysql_query(handler,"SELECT * FROM accounts WHERE username = " .. username .. ";")
- outputChatBox("4", thePlayer)
- local gettext = lekeres
- outputChatBox("5", thePlayer)
- if not (hozzaadott) == (gettext) then
- outputChatBox("6", thePlayer)
- local szoveg1 = triggerClientEvent(localPlayer, "gettext1", localPlayer)
- outputChatBox("7", thePlayer)
- local szoveg2 = triggerClientEvent(localPlayer, "gettext2", localPlayer)
- outputChatBox("8", thePlayer)
- local hozzaadva = addAccount(szoveg1,szoveg2)
- outputChatBox("9", thePlayer)
- if hozzaadva then
- outputChatBox("9", thePlayer)
- outputChatBox("#87CEFA[FayMTA]#d9d9d9 Account regisztrálva!",255,255,255,true)
- local felh = triggerClientEvent(localPlayer, "gettext1", localPlayer)
- local password = triggerClientEvent(localPlayer, "gettext2", localPlayer)
- outputChatBox("lokál oké", thePlayer)
- local query = "INSERT INTO accounts SET username='" .. felh .. "', password='".. password .."'"
- if query then
- outputChatBox("query megy", thePlayer)
- else
- outputChatBox("query nem megy", thePlayer)
- end
- else
- outputChatBox("script hiba", thePlayer)
- end
- else
- outputChatBox("#87CEFA[FayMTA]#d9d9d9 A felhasználó már regisztrálva van.",255,255,255,true)
- end
- end
- end
- addEvent("regisztralt", true)
- addEventHandler("regisztralt", getRootElement(), regi)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement