Üdv!
Akadt egy kis problémám megint
a login panelemnél nem működik a regpanel és a regpanelt előhívó gomb
local en1 = getLocalPlayer()
local valami1 = 0
function logpanelkeszites()
if(valami1 == 1) then return end
valami1 = 1
showCursor(true)
guiSetInputMode(\"no_binds_when_editing\")
rX,rY = guiGetScreenSize()
width,height = 564,379
X = (rX/2) - (width/2)
Y = (rY/2) - (height/2)
logpanel = guiCreateStaticImage(X,Y,width,height,\"login.png\",false)
--------------------------------------------------------------------
jeledit = guiCreateEdit(45,135,200,40,\"\",false,logpanel)
felhedit = guiCreateEdit(45,200,200,40,\"\",false,logpanel)
bejelentkezesgomb = guiCreateButton(62,265,150,43,\"\",false,logpanel)
regisztraciogomb = guiCreateButton(230,340,150,40,\"\",false,logpanel)
guiSetAlpha(bejelentkezesgomb,0.00)
guiSetAlpha(regisztraciogomb,0.00)
--------------------------------------------------------------------
rX,rY = guiGetScreenSize()
width,height = 564,379
X = (rX/2) - (width/2)
Y = (rY/2) - (height/2)
regpanel = guiCreateStaticImage(X,Y,width,height,\"register.png\",false)
---------------------------------------------------------------------
felh1 = guiCreateEdit(15,197,363,23,\"\",false,regpanel)
jel1 = guiCreateEdit(15,249,363,23,\"\",false,regpanel)
jel2 = guiCreateEdit(15,300,363,23,\"\",false,regpanel)
regisztraciosgomb = guiCreateButton (16,375,364,29,\"\",false,regpanel)
visszagomb = guiCreateButton (16,413,364,29,\"\",false,regpanel)
----------------------------------------------------------------------
guiSetVisible(logpanel,true)
guiSetVisible(regpanel,false)
showCursor(true)
end
function regisztrigomb ()
guiSetVisible(logpanel,false)
guiSetVisible(regpanel,true)
showCursor(true)
end
addEventHandler(\"onClientGUIClick\",regisztraciogomb,regisztrigomb)
addEventHandler(\"onClientGUIClick\", regisztraciosgomb, function()
local text1, text2 = guiGetText(jel1), guiGetText(jel2)
if(text1 ~= text2) then exports.iosalert:alert(\"Nem egyezik a két jelszó!\") return end
if(text1 == \"\") or (text2 == \"\") then return end
triggerServerEvent(\"onFelhasznaloRegisztracio\", en1, text1)
end, false)
addEventHandler(\"onClientGUIClick\", bejelentkezesgomb, function()
local text1 = guiGetText(jeledit)
if(text1 == \"\") then return end
triggerServerEvent(\"onFelhasznaloBejelentkezes\", en1, text1)
end,false)
addEventHandler(\"onClientResourceStart\", getResourceRootElement(), function()
logpanelkeszites()
end)
addEvent(\"onFelhasznaloEllenorzese\", true)
addEvent(\"onSikeresBejelentkezes\", true)
addEventHandler(\"onSikeresBejelentkezes\", getRootElement(), function()
destroyElement(logpanel)
valami1 = 0
showCursor(false)
exports.iosalert:alert(\"Sikeresen Bejelentkeztél!\")
fadeCamera(true)
end)