السلام عليكم كيفكم شباب
الحين انا ابي اسوي لوحة تسجيل اوكي سويت النافذة بس صار معي مشكلة
GUIEditor_Window = {}
GUIEditor_TabPanel = {}
GUIEditor_Tab = {}
GUIEditor_Button = {}
GUIEditor_Memo = {}
GUIEditor_Label = {}
GUIEditor_Image = {}
GUIEditor_Window[1] = guiCreateWindow(32,17,747,551,"لوحة التسجيل",false)
GUIEditor_TabPanel[1] = guiCreateTabPanel(9,26,729,499,false,GUIEditor_Window[1])
GUIEditor_Tab[1] = guiCreateTab("تسجيل دخول",GUIEditor_TabPanel[1])
GUIEditor_Memo[1] = guiCreateMemo(14,321,203,37,"",false,GUIEditor_Tab[1])
GUIEditor_Memo[2] = guiCreateMemo(57,22,5,6,"",false,GUIEditor_Memo[1])
GUIEditor_Memo[3] = guiCreateMemo(330,-55,5,5,"",false,GUIEditor_Memo[1])
GUIEditor_Label[1] = guiCreateLabel(72,300,239,16,"اسم الحساب:",false,GUIEditor_Tab[1])
guiSetAlpha(GUIEditor_Label[1],1)
guiSetFont(GUIEditor_Label[1],"default-bold-small")
GUIEditor_Label[2] = guiCreateLabel(90,388,224,18,"الباسورد",false,GUIEditor_Tab[1])
guiSetFont(GUIEditor_Label[2],"default-bold-small")
GUIEditor_Button[1] = guiCreateButton(265,339,338,85,"تسجيل",false,GUIEditor_Tab[1])
guiSetFont(GUIEditor_Button[1],"default-bold-small")
GUIEditor_Image[1] = guiCreateStaticImage(10,19,718,192,"images/mtalogo.png",false,GUIEditor_Tab[1])
GUIEditor_Memo[4] = guiCreateMemo(14,412,203,37,"",false,GUIEditor_Tab[1])
GUIEditor_Tab[2] = guiCreateTab("انشاء حساب ",GUIEditor_TabPanel[1])
GUIEditor_Memo[5] = guiCreateMemo(244,94,208,43,"",false,GUIEditor_Tab[2])
GUIEditor_Label[3] = guiCreateLabel(294,13,198,26,"انشاء حساب جديد",false,GUIEditor_Tab[2])
guiSetFont(GUIEditor_Label[3],"default-bold-small")
GUIEditor_Label[4] = guiCreateLabel(306,71,102,15,"اسم الحساب",false,GUIEditor_Tab[2])
guiSetFont(GUIEditor_Label[4],"default-bold-small")
GUIEditor_Memo[6] = guiCreateMemo(243,230,208,43,"",false,GUIEditor_Tab[2])
GUIEditor_Label[5] = guiCreateLabel(324,204,204,27,"الباسورد",false,GUIEditor_Tab[2])
guiSetFont(GUIEditor_Label[5],"default-bold-small")
GUIEditor_Memo[7] = guiCreateMemo(243,331,208,43,"",false,GUIEditor_Tab[2])
GUIEditor_Label[6] = guiCreateLabel(305,309,202,24,"تائكيد الباسورد",false,GUIEditor_Tab[2])
GUIEditor_Button[2] = guiCreateButton(493,406,161,41,"الغاء",false,GUIEditor_Tab[2])
GUIEditor_Button[3] = guiCreateButton(654,447,5,5,"",false,GUIEditor_Tab[2])
GUIEditor_Button[4] = guiCreateButton(51,408,161,41,"انشاء حساب جديد",false,GUIEditor_Tab[2])
guiSetVisible (GUIEditor_Window[1], false)
function OpenWin()
if guiGetVisible ( GUIEditor_Window[1] ) then
guiSetVisible ( GUIEditor_Window[1], false )
showCursor(false)
guiSetInputEnabled(false)
else
guiSetVisible ( GUIEditor_Window[1], true )
showCursor(true)
guiSetInputEnabled(true)
end
end
bindKey("F2", "down", OpenWin)
تشفون هذا الكود حق النافذة انا شفت كود نافذة بتاع لوحة تسجيل اخرة لقيتو مختلفف تمااااااااااامن اشيئ
-----------------------------
playSound("join.mp3", false)
GUIEditor = {
button = {},
staticimage = {},
checkbox = {},
label = {},
edit = {},
}
GUIEditor.staticimage[5] = guiCreateStaticImage(153, 164, 515, 243, "images/window.png", false)
GUIEditor.staticimage[6] = guiCreateStaticImage(-28, -8, 590, 15, "images/tab.png", false, GUIEditor.staticimage[5])
GUIEditor.label[11] = guiCreateLabel(460, 295, 15, 15, "", false, GUIEditor.staticimage[5])
GUIEditor.label[12] = guiCreateLabel(252, 10, 15, 302, "|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n|\n", false, GUIEditor.staticimage[5])
GUIEditor.label[13] = guiCreateLabel(36, 16, 184, 45, " Login", false, GUIEditor.staticimage[5])
guiSetFont(GUIEditor.label[13], "sa-header")
GUIEditor.label[14] = guiCreateLabel(291, 16, 184, 45, " Register", false, GUIEditor.staticimage[5])
guiSetFont(GUIEditor.label[14], "sa-header")
GUIEditor.edit[5] = guiCreateEdit(42, 78, 168, 20, "", false, GUIEditor.staticimage[5])
GUIEditor.label[15] = guiCreateLabel(75, 63, 98, 15, " Name", false, GUIEditor.staticimage[5])
GUIEditor.label[16] = guiCreateLabel(75, 108, 98, 15, " Password", false, GUIEditor.staticimage[5])
GUIEditor.edit[6] = guiCreateEdit(42, 123, 168, 20, "", false, GUIEditor.staticimage[5])
guiEditSetMasked(GUIEditor.edit[6], true)
GUIEditor.label[18] = guiCreateLabel(340, 61, 98, 15, " Name", false, GUIEditor.staticimage[5])
GUIEditor.edit[7] = guiCreateEdit(301, 76, 168, 20, "", false, GUIEditor.staticimage[5])
GUIEditor.label[19] = guiCreateLabel(340, 106, 98, 15, " Password", false, GUIEditor.staticimage[5])
GUIEditor.edit[8] = guiCreateEdit(301, 121, 168, 20, "", false, GUIEditor.staticimage[5])
guiEditSetMasked(GUIEditor.edit[8], true)
GUIEditor.button[1] = guiCreateButton(65, 153, 103, 30, "Login", false, GUIEditor.staticimage[5])
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
GUIEditor.button[2] = guiCreateButton(335, 151, 103, 30, "Register", false, GUIEditor.staticimage[5])
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA")
--fucntionen--
showChat(false)
showCursor(true)
function closseLoginPanel ()
guiSetVisible(GUIEditor.staticimage[5],false)
showCursor(false)
end
addEvent("closeLoginPanel",true)
addEventHandler("closeLoginPanel",getRootElement(),closseLoginPanel)
----Register button----
function onRegisterKlick ()
local username = guiGetText(GUIEditor.edit[7])
local password = guiGetText(GUIEditor.edit[8])
if username ~= "" and password ~= "" then
triggerServerEvent("register",getLocalPlayer(),getLocalPlayer(),username,password)
showCursor(false)
showChat(true)
end
end
addEventHandler("onClientGUIClick",GUIEditor.button[2],onRegisterKlick,false)
---Login button---
function onLoginKlick ()
local username = guiGetText(GUIEditor.edit[5])
local password = guiGetText(GUIEditor.edit[6])
if username ~= "" and password ~= "" then
triggerServerEvent("login",getLocalPlayer(),getLocalPlayer(),username,password)
showCursor(false)
showChat(true)
end
end
addEventHandler("onClientGUIClick",GUIEditor.button[1],onLoginKlick,false)
تشوفن هذا الكود و شوفو الكود حقي + ابي شرح يعني مصلن كود حقت البرمجة تبع التسجيل كيف اربطو بزر يعين
function register_func ( player, username, passwort)
local acc = addAccount(username,passwort)
if acc then
logIn(player,acc,passwort)
outputChatBox("#FFFFFF[iNFO]#FF9900Du hast Dich Erfolgreich Registriert!",player,255,255,255,true)
triggerClientEvent(player,"closeLoginPanel",player)
else
outputChatBox("#FFFFFF[iNFO]#FF9900Ein Account Mit diesen Namen Existiert bereits bitte benutze einen anderen!",player,255,255,255,true)
end
هل كود كيف اربطو بزر في النافذة و شكرا انا اسف طلب كبير اسف شكرا