الخطا بالتريقر باخر سطر 4 ونفس الشي بسطر 11 اللي هو
guiGetText(GUIEditor.edit[1]) -- لليوزر
guiGetText(GUIEditor.edit[2]) -- للباس
والصحيح
guiGetText(GUIEditor.edit[2]) -- لليوزر
guiGetText(GUIEditor.edit[3]) -- للباس
على كل حال بعطيك الاكواد وجربها
-- Client --
GUIEditor = {
button = {},
edit = {},
label = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
malek505 = guiCreateWindow(138, 112, 769, 577, "× = [ Login / Register ] = ×", false)
guiWindowSetSizable(malek505, false)
guiSetAlpha(malek505, 1.00)
guiSetProperty(malek505, "CaptionColour", "FF00A1FF")
GUIEditor.label[1] = guiCreateLabel(214, 37, 312, 50, "×حيآإكم الله في سيرفر سعودي زومبي×\n×يجب عليك تسجيل لحف الوقت والفلوس واللفل×\n×شكرا لك على اختيار سيرفرنا×", false, malek505)
guiSetFont(GUIEditor.label[1], "default-bold-small")
guiLabelSetColor(GUIEditor.label[1], 245, 255, 0)
guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false)
guiLabelSetVerticalAlign(GUIEditor.label[1], "center")
GUIEditor.label[2] = guiCreateLabel(16, 46, 133, 47, " [ S.Z ]", false, malek505)
guiSetFont(GUIEditor.label[2], "sa-header")
guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false)
GUIEditor.label[3] = guiCreateLabel(617, 47, 133, 47, " [ S.Z ]", false, malek505)
guiSetFont(GUIEditor.label[3], "sa-header")
guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false)
GUIEditor.edit[1] = guiCreateEdit(9, 104, 751, 15, "", false, malek505)
guiEditSetReadOnly(GUIEditor.edit[1], true)
GUIEditor.label[4] = guiCreateLabel(180, 209, 60, 15, "UserName", false, malek505)
guiSetFont(GUIEditor.label[4], "default-bold-small")
GUIEditor.edit[2] = guiCreateEdit(250, 209, 240, 17, "", false, malek505)
GUIEditor.label[5] = guiCreateLabel(180, 262, 60, 15, "PassWord", false, malek505)
guiSetFont(GUIEditor.label[5], "default-bold-small")
GUIEditor.edit[3] = guiCreateEdit(250, 262, 240, 17, "", false, malek505)
GUIEditor.button[1] = guiCreateButton(97, 369, 163, 28, "Login .. =>", false, malek505)
GUIEditor.button[2] = guiCreateButton(307, 369, 163, 28, "<=..Play Gust .. =>", false, malek505)
GUIEditor.button[3] = guiCreateButton(528, 369, 163, 28, "<= .. Register", false, malek505)
GUIEditor.edit[4] = guiCreateEdit(9, 440, 750, 15, "", false, malek505)
GUIEditor.label[6] = guiCreateLabel(231, 518, 269, 18, "قال الله تعال \"{SMILIES_PATH}/icon_sad.gif\" alt=\"\" title=\"Sad\" />( مَا يَلْفِظُ مِنْ قَوْلٍ إِلَّا لَدَيْهِ رَقِيبٌ عَتِيدٌ))", false, malek505)
end
)
addEventHandler("onClientGUIClick",root,
function ()
if source == GUIEditor.button[1] then
triggerServerEvent("onLogin",getLocalPlayer(),guiGetText(GUIEditor.edit[2]),guiGetText(GUIEditor.edit[3]) )
elseif source == GUIEditor.button[2] then
guiSetVisible(malek505,false)
showCursor(false)
showChat(true)
fadeCamera(true,5)
elseif source == GUIEditor.button[3] then
triggerServerEvent("onReg",getLocalPlayer(),guiGetText(GUIEditor.edit[2]),guiGetText(GUIEditor.edit[3]))
end
end
)
addEvent("Hidewindow",true)
addEventHandler("Hidewindow",root,
function ()
guiSetVisible(malek505,false)
showCursor(false)
showChat(true)
fadeCamera(true,5)
end
)
-- Server --
addEvent("onLogin", true)
addEventHandler("onLogin",root,
function (user, pass)
local account = getAccount ( user, pass )
local acc = getPlayerAccount(source)
if (isGuestAccount(acc)) then
if (account) then
logIn(source,account,pass)
outputChatBox ( "You Successfully Logged in !", source, 255, 255, 0 , true )
triggerClientEvent (source, "Hidewindow", source)
else
outputChatBox ( "Wrong username or password !", source, 255, 0, 0 , true)
end
else
outputChatBox ( "You Are Already Logged in !", source, 255, 255, 0 , true )
triggerClientEvent (source, "Hidewindow", source)
end
end
)
addEvent("onReg", true)
addEventHandler("onReg",root,
function ( user, pass )
local account = getAccount ( user, pass )
local acc = getPlayerAccount(source)
if (isGuestAccount(acc)) then
if not (account) then
addAccount(user,pass)
outputChatBox ( "You have Successfully Registered !", source, 255, 255, 0 , true)
else
outputChatBox ( "This account allready exists !", source, 255, 255, 0 , true)
end
else
outputChatBox ( "Register Error !", source, 255, 0, 0 , true)
triggerClientEvent (source, "Hidewindow", source)
end
end
)
الله يعطيك الف الف عافية زبط بس ي خوي لوقين زبط ريجستر م زبط