شباب شو مشكله لوحه تسجيل دخول هذه ما تشتغل
كلنت
GUIEditor = {
edit = {},
memo = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
login = guiCreateButton(27, 158, 131, 62, "", false)
guiSetAlpha(login, 0.00)
register = guiCreateButton(13, 488, 135, 60, "", false)
guiSetAlpha(register, 0.00)
GUIEditor.memo[1] = guiCreateMemo(592, 5, 201, 580, "Wellcome To Server Iraql\n\nProngram :\n\n1 - Hassan\n\n\n\n-------------------------------\nOwners Server :\n\n1 - MX\n\n2 - Abo.zarba\n\n-------------------------------\nThank you for your access server\n------------------------------------\n\n\nServer Youth Iraqi", false)
guiMemoSetReadOnly(GUIEditor.memo[1], true)
GUIEditor.edit[1] = guiCreateEdit(152, 38, 169, 22, "", false)
GUIEditor.edit[2] = guiCreateEdit(151, 92, 169, 22, "", false)
guiEditSetMasked(GUIEditor.edit[2], true)
GUIEditor.edit[3] = guiCreateEdit(142, 415, 169, 22, "", false)
GUIEditor.edit[4] = guiCreateEdit(144, 456, 169, 22, "", false)
guiEditSetMasked(GUIEditor.edit[4], true)
end
)
local sx,sy = guiGetScreenSize()
function Dx()
dxDrawRectangle(sx*0.3413,sy*0.3550,sx*0.3137,sy*0.2667)
dxDrawImage(0, 0, 799, 595, ":guieditor/images/examples/progress.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawText("UserName :", 26, 33, 157, 65, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "top", false, false, false, false, false)
dxDrawText("Password :", 25, 85, 156, 117, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "top", false, false, false, false, false)
dxDrawLine(27 - 1, 158 - 1, 27 - 1, 220, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(157, 158 - 1, 27 - 1, 158 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(27 - 1, 220, 157, 220, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(157, 220, 157, 158 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(27, 158, 130, 62, tocolor(255, 0, 0, 255), false)
dxDrawText("Login", 25, 157, 156, 220, tocolor(168, 15, 239, 255), 1.00, "pricedown", "center", "center", false, false, false, false, false)
dxDrawText("Register ", 23, 353, 166, 403, tocolor(119, 11, 241, 255), 1.00, "pricedown", "left", "top", false, false, false, false, false)
dxDrawText("UserName :", 16, 409, 120, 435, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "top", false, false, false, false, false)
dxDrawText("Password :", 16, 450, 120, 476, tocolor(255, 255, 255, 255), 1.00, "pricedown", "left", "top", false, false, false, false, false)
dxDrawLine(15 - 1, 489 - 1, 15 - 1, 547, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(148, 489 - 1, 15 - 1, 489 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(15 - 1, 547, 148, 547, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(148, 547, 148, 489 - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(15, 489, 133, 58, tocolor(95, 230, 21, 255), false)
dxDrawText("Register", 13, 489, 147, 548, tocolor(25, 39, 225, 255), 1.00, "pricedown", "center", "center", false, false, false, false, false)
end
------------------------------------------------------
addEventHandler ( "onClientGUIClick", root, function ( )
if ( source == login ) then
UserName = guiGetText ( GUIEditor.edit[1] )
PassWord = guiGetText ( GUIEditor.edit[2] )
triggerServerEvent ( "Register", localPlayer, Username, Password )
elseif ( source == register ) then
UserName = guiGetText ( GUIEditor.edit[3] )
PassWord = guiGetText ( GUIEditor.edit[4] )
triggerServerEvent ( "Login", localPlayer, Username, Password )
end
end )
addEvent("Hidewindow",true)
addEventHandler("Hidewindow",root,
function ()
guiSetVisible(malek505,false)
showCursor(false)
showChat(true)
fadeCamera(false,5)
end
)
----------------------------------------------
bindKey ( "F7", "down",
function ()
if removeEventHandler("onClientRender",root,Dx) then
removeEventHandler("onClientRender",root,Dx)
showCursor(false)
else
showCursor(true)
addEventHandler("onClientRender",root,Dx)
end
end)
سيرفر
addEvent ( "Register", true )
addEventHandler ( "Register", root, function ( Username, Password )
local AccountAdded = addAccount ( Username, Password )
if ( AccountAdded ) then
outputChatBox ( "تم التسجيل بنجاح", source, 255, 255, 255, true )
else
outputChatBox ( "لم يتم تسجيل الدخول تحقق من معلومات حسابك او هذا الحساب موجود بالفعل", source, 255, 0, 0, true )
end
end )
addEvent ( "Login", true )
addEventHandler ( "Login", root, function ( Username, Password )
local Account = getAccount ( Username, Password )
local Logined = logIn ( source, Account, Password ) -- هنا جرب كذا اذا ماضبط شيل كلمة باسورد
if ( Logined ) then
outputChatBox ( "تم التسجيل بنجاح", source, 255, 255, 255, true )
else
outputChatBox ( "لم يتم تسجيل الدخول تحقق من معلومات حسابك او هذا الحساب موجود بالفعل", source, 255, 0, 0, true )
end
end )
ميتا
وكمان ابيه لما يدخل السيرفر تطلعله الوحه لو سمحتو صلحول ايااه