السلام عليكم انا سويت لوحة تسجيل دخول دي اكس المشكلة هي ان عندما اسجل الدخول اللوحة لا تختفي اخوكم جديد بالبرمجة اتمني المساعدة كود إخفاء لوحة دي اكس
GUIEditor = {
checkbox = {},
edit = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
editname = guiCreateButton(566, 239, 110, 26, "Login", false)
guiSetAlpha(editname, 0.00)
editpw = guiCreateButton(567, 282, 110, 26, "Register", false)
guiSetAlpha(editpw, 0.00)
editplaygust = guiCreateButton(567, 326, 110, 26, "playgust", false)
guiSetAlpha(editplaygust, 0.00)
GUIEditor.checkbox[1] = guiCreateCheckBox(407, 265, 146, 17, "Remember Username", false, false)
guiSetFont(GUIEditor.checkbox[1], "default-bold-small")
GUIEditor.checkbox[2] = guiCreateCheckBox(407, 311, 146, 20, "Remember Password", false, false)
guiSetFont(GUIEditor.checkbox[2], "default-bold-small")
GUIEditor.edit[1] = guiCreateEdit(201, 260, 200, 27, "", false)
GUIEditor.edit[2] = guiCreateEdit(201, 307, 200, 27, "", false)
end
)
addEventHandler("onClientRender", root,
function ()
dxDrawRectangle(99, 184, 627, 42, tocolor(81, 2, 63, 255), false)
dxDrawRectangle(122, 226, 579, 178, tocolor(5, 0, 4, 200), false)
dxDrawRectangle(559, 226, 127, 151, tocolor(2, 1, 1, 253), false)
dxDrawLine(567 - 1, 239 - 1, 567 - 1, 265, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(676, 239 - 1, 567 - 1, 239 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(567 - 1, 265, 676, 265, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(676, 265, 676, 239 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(567, 239, 109, 26, tocolor(81, 2, 63, 224), false)
dxDrawLine(567 - 1, 282 - 1, 567 - 1, 308, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(676, 282 - 1, 567 - 1, 282 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(567 - 1, 308, 676, 308, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(676, 308, 676, 282 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(567, 282, 109, 26, tocolor(81, 2, 63, 224), false)
dxDrawLine(567 - 1, 326 - 1, 567 - 1, 352, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(676, 326 - 1, 567 - 1, 326 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(567 - 1, 352, 676, 352, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(676, 352, 676, 326 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(567, 326, 109, 26, tocolor(81, 2, 63, 224), false)
dxDrawText("Username:", 132, 266, 299, 297, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false)
dxDrawText("Password:", 132, 313, 299, 344, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false)
dxDrawText("Login", 604, 243, 691, 259, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false)
dxDrawText("Register", 599, 287, 686, 303, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false)
dxDrawText("Playgust", 599, 330, 686, 346, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false)
dxDrawText("Alex Login panel", 264, 190, 583, 216, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, false, false)
end
)
triggerServerEvent("onGetSave",localPlayer)
showCursor ( true )
addEvent("onPutSave",true)
addEventHandler("onPutSave",root,
function (puser,ppass)
guiSetText(user,puser)
guiSetText(pass,ppass)
end
)
addEventHandler("onClientGUIClick",root,
function ()
local user = guiGetText(GUIEditor.edit[1])
local pass = guiGetText(GUIEditor.edit[2])
if ( source == editname ) then
if user ~= "" and pass ~= "" then
if guiCheckBoxGetSelected(remember) then
triggerServerEvent("onLoginWith",localPlayer,user,pass)
else
triggerServerEvent("onLogin",localPlayer,user,pass)
end
else
outputChatBox("* You Must Write Username Or Password",255,0,0)
end
elseif ( source == editpw ) then
if user ~= "" and pass ~= "" then
triggerServerEvent("onReg",localPlayer,user,pass)
else
outputChatBox("* You Must Write Username Or Password",255,0,0)
end
end
end
)