Wunder

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Wunder

  • Rank
    Vic

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Alright, it was my mistake... because the dbExec was still inside the for loop and thats why it was not working properly. Thanks anyway! If a moderator is here then please your can close this thread.
  2. I tried every possible solution but still its not working.
  3. Thank You, i appreciate your answer and also thanks for the tips!
  4. Greetings People! I have a little problem with my Login Panel, because if i click on the Register button then nothing happens. I just tested my MySQL connection too , but its shows that the Connection is good and nothing comes out in the Debugscript either. If anyone can help me with this then Thank you! --Here is the Code for the Register function Server Side function registerReq(player, username, password, email) local password = md5(password) local regQuery = dbPoll(dbQuery(connection, "SELECT * FROM accounts"),-1) if regQuery then for _, rows in ipairs(regQuery) do if rows["username"] == username then exports.vmInfoBox:addNotification(player,"Ezzel a felhasználóval már regisztráltak!", "error") return end if rows["serial"] == getPlayerSerial(source) then exports.vmInfoBox:addNotification(player,"Az adott Serial már regisztrálva van!", "error") return end insertinfo = dbExec(connection, "INSERT INTO accounts SET username = ?, password = ?, ip = ?, serial = ?, email = ?, banned='0', online='0', regdate=NOW()", username, password, getPlayerIP(source), getPlayerSerial(source), email, banned, online, regdate) if insertinfo then exports.vmInfoBox:addNotification(player,"Sikeres regisztráció!", "success") else exports.vmInfoBox:addNotification(player,"Valami hiba történt, keress fel egy fejlesztöt!", "error") end end end end addEvent("registerReq", true) addEventHandler("registerReq", getRootElement(), registerReq) -- This is the code for Client Side function regregisterClick(button, state) if button == "left" and state == "down" then if source == regregbutton then if string.len(DGS:dgsGetText(reguseredit)) < 5 then exports.vmInfoBox:addNotification("A felhasználónév minimum 5 karakterböl kell állnia!", "error") return end if string.len(DGS:dgsGetText(regpasswedit)) < 6 then exports.vmInfoBox:addNotification("A jelszó minimum 6 karakterböl kell állnia!", "error") return end if DGS:dgsGetText(regpasswedit) ~= DGS:dgsGetText(regpasswedit2) then exports.vmInfoBox:addNotification("A két megadott jelszó nem egyezik!", "error") return end if string.len(DGS:dgsGetText(regmailedit)) < 7 then exports.vmInfoBox:addNotification("Az email cím minimum 7 karakterböl kell állnia!", "error") return end if not string.find(DGS:dgsGetText(regmailedit), "@") and string.find(DGS:dgsGetText(regmailedit), ".") then exports.vmInfoBox:addNotification("Kérlek adj meg egy érvényes email címet!", "error") return end if DGS:dgsGetText(reguseredit) == "" and DGS:dgsGetText(regpasswedit) == "" and DGS:dgsGetText(regpasswedit2) == "" and DGS:dgsGetText(regmailedit) == "" then exports.vmInfoBox:addNotification("Ne hagyd üresen a mezöket!", "error") end triggerServerEvent("registerReq", localPlayer, localPlayer, DGS:dgsGetText(reguseredit),DGS:dgsGetText(regpasswedit),DGS:dgsGetText(regpasswedit2),DGS:dgsGetText(regmailedit)) end end end addEventHandler("onDgsMouseClick", getRootElement(), regregisterClick)
  5. Hey! I have a little problem with rendering , because i created one Window which keeps rendering multiple windows automaticaly and it causes a lagg too. Could anyone help my please? Thank You! Here is my code also. local DGS = exports.dgs local sx,sy = guiGetScreenSize() local font1 = dxCreateFont("files/forte.ttf", 10) local font2 = dxCreateFont("files/forte.ttf", 12) local colorOne = "#00a5da" local panelState = false local lp = localPlayer function onClientJoin() setElementData(lp, "online", false) setElementData(lp, "banned", false) setElementDimension(lp, math.random(1,10000)) setPlayerHudComponentVisible("all", false) setElementFrozen(lp,true) setCameraMatrix(1282.35, -1012.79, 48.56, 1520.31, -1139.02, 191.14) showChat(false) showCursor(true) loginPanel() end addEventHandler("onClientRender", root, onClientJoin) function loginPanel() if not panelState then loginwindow = DGS:dgsCreateWindow (400, 300, 250, 300, "Login Panel", false, tocolor(0,165,218,255),30,nil,tocolor(0,0,0,255),nil, tocolor(0,0,0,200), 5, true) end end I have also tried with dgsGetVisible and dgsSetVisible working out something, but its not helping.