iMr ~ MnHmAr Posted January 10, 2016 Share Posted January 10, 2016 انا ضفت ل لوحة التسجيل قبله يجي دآيره تدور بعدين تجي صور و تنزل على تحت بعدين تجي الوحه حقت التسجيل ض2 بس فيه مشكله الدي بوق http://cdn.top4top.co/p_9iwll1.png كلنت والي تحت سيرفر GUIEditor = { checkbox = {}, edit = {}, button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 635) / 2, (screenH - 481) / 2, 635, 481, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(84, 45, 448, 49, "xX=[لـوحـة تسجيل آلسـيـرفـر]=Xx", false, GUIEditor.window[1]) local font0_seguisym = guiCreateFont("seguisym.ttf", 21) guiSetFont(GUIEditor.label[1], font0_seguisym) guiLabelSetColor(GUIEditor.label[1], 57, 247, 151) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) showCursor(true) fadeCamera(false,5) GUIEditor.button[1] = guiCreateButton(136, 328, 142, 44, "=[ Register ] =", false, GUIEditor.window[1]) local font1_seguisym = guiCreateFont("seguisym.ttf", 10) guiSetFont(GUIEditor.button[1], font1_seguisym) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFB5E945") GUIEditor.label[2] = guiCreateLabel(21, 142, 144, 42, "آسـم آلمـسـتـخـدم", false, GUIEditor.window[1]) local font2_seguisym = guiCreateFont("seguisym.ttf", 15) guiSetFont(GUIEditor.label[2], font2_seguisym) guiLabelSetColor(GUIEditor.label[2], 240, 171, 63) guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) GUIEditor.label[3] = guiCreateLabel(21, 220, 144, 42, "كـلـمـة آلمــرور", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], font2_seguisym) guiLabelSetColor(GUIEditor.label[3], 240, 171, 63) guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) GUIEditor.edit[1] = guiCreateEdit(185, 142, 205, 39, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(185, 220, 205, 39, "", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(302, 328, 142, 44, "=[ Login ] =", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], font1_seguisym) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFB5E945") GUIEditor.checkbox[1] = guiCreateCheckBox(185, 284, 117, 25, "حفظ آلبيآنآت", false, false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(222, 391, 142, 44, "=[ Guest ] =", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], font1_seguisym) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFB5E945") end ) addEventHandler("onClientResourceStart", resourceRoot, function() showChat(false) fadeCamera(false); end) function dxDrawlogo() dxDrawImage( 318, 360, 129, 134, "logo.png", 0,0,0) dxDrawText("please wait ...", 260, 303, 529, 339, tocolor(255, 255, 255, 255), 1.20, "default-bold", "center", "top", false, false, false, false, false) end local rot = 9 function dxDrawLoading() rot = rot + 2 if rot > 360 then rot = 0 end dxDrawText(" مرحبا بكم في السيرفر", 162 - 1, 147 - 1, 669 - 1, 199 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawText(" مرحبا بكم في السيرفر", 162 + 1, 147 - 1, 669 + 1, 199 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawText(" مرحبا بكم في السيرفر", 162 - 1, 147 + 1, 669 - 1, 199 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawText(" مرحبا بكم في السيرفر", 162 + 1, 147 + 1, 669 + 1, 199 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawText(" مرحبا بكم في السيرفر", 162, 147, 669, 199, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawImage( 318, 360, 129, 134, "load.png", rot) dxDrawText("Loading ....", 271, 303, 529, 339, tocolor(255, 255, 255, 255), 1.20, "default-bold", "center", "top", false, false, false, false, false) end addEventHandler("onClientRender", root, dxDrawLoading); removeEventHandler("onClientRender", root, dxDrawLoading); addEventHandler("onClientRender", root, dxDrawLoading); setTimer( function () addEventHandler("onClientRender", root, dxDrawlogo); removeEventHandler("onClientRender", root, dxDrawLoading); end,6000,1) setTimer(function () removeEventHandler("onClientRender", root, dxDrawlogo); if isPedInVehicle(localPlayer) then destroyElement(getPedOccupiedVehicle(localPlayer)) end dx = true fadeCamera(true); addEventHandler("onClientGUIClick", guiRoot, function() if source == GUIEditor.button[2] then local Name = guiGetText(GUIEditor.edit[1]) local Pass = guiGetText(GUIEditor.edit[2]) if Name and string.len(tostring(Name)) >= 1 then if Pass and string.len(tostring(Pass)) >= 3 then triggerServerEvent("OnLogin", getLocalPlayer(), Name, Pass) else outputChatBox("* Error : Password Need To Be 3 number or up .", 255, 0, 0, true) end else outputChatBox("* Error : User Name Need To Be 1 or up .", 255, 0, 0, true) end elseif source == GUIEditor.button[1] then local Name = guiGetText(GUIEditor.edit[1]) local Pass = guiGetText(GUIEditor.edit[2]) if Name and string.len(tostring(Name)) >= 1 then if Pass and string.len(tostring(Pass)) >= 3 then triggerServerEvent("OnRegister", getLocalPlayer(), Name, Pass) else outputChatBox("* Error : Password Need To Be 3 number or up .", 255, 0, 0, true) end else outputChatBox("* Error : User Name Need To Be 1 or up .", 255, 0, 0, true) end elseif source == GUIEditor.checkbox[1] then if guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true then triggerServerEvent("OnSave", localPlayer, guiGetText(GUIEditor.edit[1]), guiGetText(GUIEditor.edit[2])) end elseif source == GUIEditor.button[3] then triggerEvent("Play",localPlayer) end end) addEvent("Hidewindow",true) addEventHandler("Hidewindow",root, function () guiSetVisible(GUIEditor.window[1],false) showCursor(false) fadeCamera(true,5) end ) addEvent("Play",true) addEventHandler("Play",root,function() guiSetVisible( GUIEditor.window[1], false) showCursor(false) end) addEvent("UpRememberUser", true) addEventHandler("UpRememberUser", root, function(User, Pass) guiSetText(GUIEditor.edit[1], User) guiSetText(GUIEditor.edit[2], Pass) guiCheckBoxSetSelected(GUIEditor.checkbox[1], true) end) addEvent("onClose", true) addEventHandler("onClose", root, function () showItemsLog_ = false guiSetVisible ( GUIEditor.label[3], false ) guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) guiSetInputEnabled ( false ) end) local againStartMove = 100 local endMove = 400 addEventHandler("onClientRender",root,function() local x,y = guiGetPosition(GUIEditor.label[1],false) guiSetPosition(GUIEditor.label[1],x + 2,y,false) if ( x >= endMove ) then guiSetPosition(GUIEditor.label[1],againStartMove,y,false) end end ) addEventHandler("onPlayerJoin", root, function () spawnPlayer(source,326.87582397461,2542.5478515625,16.806928634644,0,46,0,1) setCameraTarget(source,source) fadeCamera(source,true) setElementData(source,"new",true) end ) function getPlayerSkin(player) return getElementData(player,"skin") end function getPlayerXYZ(player) local x,y,z = getElementData(player,"x"),getElementData(player,"y"),getElementData(player,"z") return x,y,z end -- Login Register System executeSQLQuery("CREATE TABLE IF NOT EXISTS players_save( serial TEXT, user TEXT, pass TEXT)") function AddPlayer(serial,user,pass) executeSQLQuery("INSERT INTO players_save(serial,user,pass) VALUES(?,?,?)",serial,user,pass) end function isPlayerSave(serial) local sel = executeSQLQuery("SELECT serial FROM players_save WHERE serial=?",serial) if sel == 0 then return false else return true end end function getUserAndPass(serial) local user,pass = "","" if isPlayerSave(serial) then local sel = executeSQLQuery("SELECT * FROM players_save WHERE serial=?",serial) for i,player in ipairs(sel) do if i == 1 then user = player.user pass = player.pass end end return user,pass end return false end addEvent("onGetSave",true) addEventHandler("onGetSave",root, function () local serial = getPlayerSerial(source) if isPlayerSave(serial) then local user,pass = getUserAndPass(serial) triggerClientEvent(source,"onPutSave",source,user,pass) end end ) addEvent("onLoginWith",true) addEventHandler("onLoginWith",root, function (user,pass) local acc = getAccount(user,pass) local serial = getPlayerSerial(source) if acc then logIn(source,acc,pass) outputChatBox("* You Have Been Successfuly Login",source,0,255,0) AddPlayer(serial,user,pass) triggerClientEvent(source,"onCl",source) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent("onLogin",true) addEventHandler("onLogin",root, function (user,pass) local acc = getAccount(user,pass) if acc then logIn(source,acc,pass) outputChatBox("* You Have Been Successfuly Login",source,0,255,0) triggerClientEvent(source,"onCl",source) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent("onReg",true) addEventHandler("onReg",root, function (user,pass) local acc = getAccount(user,pass) if acc then outputChatBox("* This Account is Already Exist",source,255,0,0) else addAccount(user,pass) outputChatBox("* Username = " .. user .. "",source,0,255,0) outputChatBox("* Password = " .. pass .. "",source,0,255,0) end end ) -- End addEventHandler("onPlayerWasted",root, function () if getElementData(source,"new") == true then setTimer(function(player) spawnPlayer(player,326.87582397461,2542.5478515625,16.806928634644,0,46,0,1) setCameraTarget(player,player) fadeCamera(player,true) end,3500,1,source) else setTimer(function(player) local x,y,z = getPlayerXYZ(player) spawnPlayer(player,x,y,z,0,getPlayerSkin(player),0,0) setCameraTarget(player,player) fadeCamera(player,true) end,3500,1,source) end end ) addEvent("SpawnPlayer",true) addEventHandler("SpawnPlayer",root, function () local x,y,z = getPlayerXYZ(source) spawnPlayer(source,x,y,z,0,getPlayerSkin(source),0,0) setCameraTarget(source,source) fadeCamera(source,true) showChat(source,true) end ) Link to comment
iMr ~ MnHmAr Posted January 11, 2016 Author Share Posted January 11, 2016 انا ضفت ل لوحة التسجيل قبله يجي دآيره تدوربعدين تجي صور و تنزل على تحت بعدين تجي الوحه حقت التسجيل ض2 بس فيه مشكله الدي بوق http://cdn.top4top.co/p_9iwll1.png كلنت والي تحت سيرفر GUIEditor = { checkbox = {}, edit = {}, button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 635) / 2, (screenH - 481) / 2, 635, 481, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(84, 45, 448, 49, "xX=[لـوحـة تسجيل آلسـيـرفـر]=Xx", false, GUIEditor.window[1]) local font0_seguisym = guiCreateFont("seguisym.ttf", 21) guiSetFont(GUIEditor.label[1], font0_seguisym) guiLabelSetColor(GUIEditor.label[1], 57, 247, 151) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) showCursor(true) fadeCamera(false,5) GUIEditor.button[1] = guiCreateButton(136, 328, 142, 44, "=[ Register ] =", false, GUIEditor.window[1]) local font1_seguisym = guiCreateFont("seguisym.ttf", 10) guiSetFont(GUIEditor.button[1], font1_seguisym) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFB5E945") GUIEditor.label[2] = guiCreateLabel(21, 142, 144, 42, "آسـم آلمـسـتـخـدم", false, GUIEditor.window[1]) local font2_seguisym = guiCreateFont("seguisym.ttf", 15) guiSetFont(GUIEditor.label[2], font2_seguisym) guiLabelSetColor(GUIEditor.label[2], 240, 171, 63) guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) GUIEditor.label[3] = guiCreateLabel(21, 220, 144, 42, "كـلـمـة آلمــرور", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], font2_seguisym) guiLabelSetColor(GUIEditor.label[3], 240, 171, 63) guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) GUIEditor.edit[1] = guiCreateEdit(185, 142, 205, 39, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(185, 220, 205, 39, "", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(302, 328, 142, 44, "=[ Login ] =", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], font1_seguisym) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFB5E945") GUIEditor.checkbox[1] = guiCreateCheckBox(185, 284, 117, 25, "حفظ آلبيآنآت", false, false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(222, 391, 142, 44, "=[ Guest ] =", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], font1_seguisym) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFB5E945") end ) addEventHandler("onClientResourceStart", resourceRoot, function() showChat(false) fadeCamera(false); end) function dxDrawlogo() dxDrawImage( 318, 360, 129, 134, "logo.png", 0,0,0) dxDrawText("please wait ...", 260, 303, 529, 339, tocolor(255, 255, 255, 255), 1.20, "default-bold", "center", "top", false, false, false, false, false) end local rot = 9 function dxDrawLoading() rot = rot + 2 if rot > 360 then rot = 0 end dxDrawText(" مرحبا بكم في السيرفر", 162 - 1, 147 - 1, 669 - 1, 199 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawText(" مرحبا بكم في السيرفر", 162 + 1, 147 - 1, 669 + 1, 199 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawText(" مرحبا بكم في السيرفر", 162 - 1, 147 + 1, 669 - 1, 199 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawText(" مرحبا بكم في السيرفر", 162 + 1, 147 + 1, 669 + 1, 199 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawText(" مرحبا بكم في السيرفر", 162, 147, 669, 199, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawImage( 318, 360, 129, 134, "load.png", rot) dxDrawText("Loading ....", 271, 303, 529, 339, tocolor(255, 255, 255, 255), 1.20, "default-bold", "center", "top", false, false, false, false, false) end addEventHandler("onClientRender", root, dxDrawLoading); removeEventHandler("onClientRender", root, dxDrawLoading); addEventHandler("onClientRender", root, dxDrawLoading); setTimer( function () addEventHandler("onClientRender", root, dxDrawlogo); removeEventHandler("onClientRender", root, dxDrawLoading); end,6000,1) setTimer(function () removeEventHandler("onClientRender", root, dxDrawlogo); if isPedInVehicle(localPlayer) then destroyElement(getPedOccupiedVehicle(localPlayer)) end dx = true fadeCamera(true); addEventHandler("onClientGUIClick", guiRoot, function() if source == GUIEditor.button[2] then local Name = guiGetText(GUIEditor.edit[1]) local Pass = guiGetText(GUIEditor.edit[2]) if Name and string.len(tostring(Name)) >= 1 then if Pass and string.len(tostring(Pass)) >= 3 then triggerServerEvent("OnLogin", getLocalPlayer(), Name, Pass) else outputChatBox("* Error : Password Need To Be 3 number or up .", 255, 0, 0, true) end else outputChatBox("* Error : User Name Need To Be 1 or up .", 255, 0, 0, true) end elseif source == GUIEditor.button[1] then local Name = guiGetText(GUIEditor.edit[1]) local Pass = guiGetText(GUIEditor.edit[2]) if Name and string.len(tostring(Name)) >= 1 then if Pass and string.len(tostring(Pass)) >= 3 then triggerServerEvent("OnRegister", getLocalPlayer(), Name, Pass) else outputChatBox("* Error : Password Need To Be 3 number or up .", 255, 0, 0, true) end else outputChatBox("* Error : User Name Need To Be 1 or up .", 255, 0, 0, true) end elseif source == GUIEditor.checkbox[1] then if guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true then triggerServerEvent("OnSave", localPlayer, guiGetText(GUIEditor.edit[1]), guiGetText(GUIEditor.edit[2])) end elseif source == GUIEditor.button[3] then triggerEvent("Play",localPlayer) end end) addEvent("Hidewindow",true) addEventHandler("Hidewindow",root, function () guiSetVisible(GUIEditor.window[1],false) showCursor(false) fadeCamera(true,5) end ) addEvent("Play",true) addEventHandler("Play",root,function() guiSetVisible( GUIEditor.window[1], false) showCursor(false) end) addEvent("UpRememberUser", true) addEventHandler("UpRememberUser", root, function(User, Pass) guiSetText(GUIEditor.edit[1], User) guiSetText(GUIEditor.edit[2], Pass) guiCheckBoxSetSelected(GUIEditor.checkbox[1], true) end) addEvent("onClose", true) addEventHandler("onClose", root, function () showItemsLog_ = false guiSetVisible ( GUIEditor.label[3], false ) guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) guiSetInputEnabled ( false ) end) local againStartMove = 100 local endMove = 400 addEventHandler("onClientRender",root,function() local x,y = guiGetPosition(GUIEditor.label[1],false) guiSetPosition(GUIEditor.label[1],x + 2,y,false) if ( x >= endMove ) then guiSetPosition(GUIEditor.label[1],againStartMove,y,false) end end ) addEventHandler("onPlayerJoin", root, function () spawnPlayer(source,326.87582397461,2542.5478515625,16.806928634644,0,46,0,1) setCameraTarget(source,source) fadeCamera(source,true) setElementData(source,"new",true) end ) function getPlayerSkin(player) return getElementData(player,"skin") end function getPlayerXYZ(player) local x,y,z = getElementData(player,"x"),getElementData(player,"y"),getElementData(player,"z") return x,y,z end -- Login Register System executeSQLQuery("CREATE TABLE IF NOT EXISTS players_save( serial TEXT, user TEXT, pass TEXT)") function AddPlayer(serial,user,pass) executeSQLQuery("INSERT INTO players_save(serial,user,pass) VALUES(?,?,?)",serial,user,pass) end function isPlayerSave(serial) local sel = executeSQLQuery("SELECT serial FROM players_save WHERE serial=?",serial) if sel == 0 then return false else return true end end function getUserAndPass(serial) local user,pass = "","" if isPlayerSave(serial) then local sel = executeSQLQuery("SELECT * FROM players_save WHERE serial=?",serial) for i,player in ipairs(sel) do if i == 1 then user = player.user pass = player.pass end end return user,pass end return false end addEvent("onGetSave",true) addEventHandler("onGetSave",root, function () local serial = getPlayerSerial(source) if isPlayerSave(serial) then local user,pass = getUserAndPass(serial) triggerClientEvent(source,"onPutSave",source,user,pass) end end ) addEvent("onLoginWith",true) addEventHandler("onLoginWith",root, function (user,pass) local acc = getAccount(user,pass) local serial = getPlayerSerial(source) if acc then logIn(source,acc,pass) outputChatBox("* You Have Been Successfuly Login",source,0,255,0) AddPlayer(serial,user,pass) triggerClientEvent(source,"onCl",source) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent("onLogin",true) addEventHandler("onLogin",root, function (user,pass) local acc = getAccount(user,pass) if acc then logIn(source,acc,pass) outputChatBox("* You Have Been Successfuly Login",source,0,255,0) triggerClientEvent(source,"onCl",source) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent("onReg",true) addEventHandler("onReg",root, function (user,pass) local acc = getAccount(user,pass) if acc then outputChatBox("* This Account is Already Exist",source,255,0,0) else addAccount(user,pass) outputChatBox("* Username = " .. user .. "",source,0,255,0) outputChatBox("* Password = " .. pass .. "",source,0,255,0) end end ) -- End addEventHandler("onPlayerWasted",root, function () if getElementData(source,"new") == true then setTimer(function(player) spawnPlayer(player,326.87582397461,2542.5478515625,16.806928634644,0,46,0,1) setCameraTarget(player,player) fadeCamera(player,true) end,3500,1,source) else setTimer(function(player) local x,y,z = getPlayerXYZ(player) spawnPlayer(player,x,y,z,0,getPlayerSkin(player),0,0) setCameraTarget(player,player) fadeCamera(player,true) end,3500,1,source) end end ) addEvent("SpawnPlayer",true) addEventHandler("SpawnPlayer",root, function () local x,y,z = getPlayerXYZ(source) spawnPlayer(source,x,y,z,0,getPlayerSkin(source),0,0) setCameraTarget(source,source) fadeCamera(source,true) showChat(source,true) end ) ردو ي عيال فيه مشكله جديد الوره تجي صغيره ابيه كبيره و ترجع ل وراء و تنزل Link to comment
BigJoe Posted January 11, 2016 Share Posted January 11, 2016 GUIEditor = { checkbox = {}, edit = {}, button = {}, window = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 635) / 2, (screenH - 481) / 2, 635, 481, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(84, 45, 448, 49, "xX=[لـوحـة تسجيل آلسـيـرفـر]=Xx", false, GUIEditor.window[1]) local font0_seguisym = guiCreateFont("seguisym.ttf", 21) guiSetFont(GUIEditor.label[1], font0_seguisym) guiLabelSetColor(GUIEditor.label[1], 57, 247, 151) guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) showCursor(true) fadeCamera(false,5) GUIEditor.button[1] = guiCreateButton(136, 328, 142, 44, "=[ Register ] =", false, GUIEditor.window[1]) local font1_seguisym = guiCreateFont("seguisym.ttf", 10) guiSetFont(GUIEditor.button[1], font1_seguisym) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFB5E945") GUIEditor.label[2] = guiCreateLabel(21, 142, 144, 42, "آسـم آلمـسـتـخـدم", false, GUIEditor.window[1]) local font2_seguisym = guiCreateFont("seguisym.ttf", 15) guiSetFont(GUIEditor.label[2], font2_seguisym) guiLabelSetColor(GUIEditor.label[2], 240, 171, 63) guiLabelSetHorizontalAlign(GUIEditor.label[2], "center", false) GUIEditor.label[3] = guiCreateLabel(21, 220, 144, 42, "كـلـمـة آلمــرور", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], font2_seguisym) guiLabelSetColor(GUIEditor.label[3], 240, 171, 63) guiLabelSetHorizontalAlign(GUIEditor.label[3], "center", false) GUIEditor.edit[1] = guiCreateEdit(185, 142, 205, 39, "", false, GUIEditor.window[1]) GUIEditor.edit[2] = guiCreateEdit(185, 220, 205, 39, "", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(302, 328, 142, 44, "=[ Login ] =", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], font1_seguisym) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFB5E945") GUIEditor.checkbox[1] = guiCreateCheckBox(185, 284, 117, 25, "حفظ آلبيآنآت", false, false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(222, 391, 142, 44, "=[ Guest ] =", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], font1_seguisym) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFB5E945") end ) addEventHandler("onClientResourceStart", resourceRoot, function() showChat(false) fadeCamera(false); end) function dxDrawlogo() dxDrawImage( 318, 360, 129, 134, "logo.png", 0,0,0) dxDrawText("please wait ...", 260, 303, 529, 339, tocolor(255, 255, 255, 255), 1.20, "default-bold", "center", "top", false, false, false, false, false) end local rot = 9 function dxDrawLoading() rot = rot + 2 if rot > 360 then rot = 0 end dxDrawText(" مرحبا بكم في السيرفر", 162 - 1, 147 - 1, 669 - 1, 199 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawText(" مرحبا بكم في السيرفر", 162 + 1, 147 - 1, 669 + 1, 199 - 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawText(" مرحبا بكم في السيرفر", 162 - 1, 147 + 1, 669 - 1, 199 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawText(" مرحبا بكم في السيرفر", 162 + 1, 147 + 1, 669 + 1, 199 + 1, tocolor(0, 0, 0, 255), 2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawText(" مرحبا بكم في السيرفر", 162, 147, 669, 199, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawImage( 318, 360, 129, 134, "load.png", rot) dxDrawText("Loading ....", 271, 303, 529, 339, tocolor(255, 255, 255, 255), 1.20, "default-bold", "center", "top", false, false, false, false, false) end addEventHandler("onClientRender", root, dxDrawLoading); removeEventHandler("onClientRender", root, dxDrawLoading); addEventHandler("onClientRender", root, dxDrawLoading); setTimer( function () addEventHandler("onClientRender", root, dxDrawlogo); removeEventHandler("onClientRender", root, dxDrawLoading); end,6000,1) setTimer(function () removeEventHandler("onClientRender", root, dxDrawlogo); if isPedInVehicle(localPlayer) then destroyElement(getPedOccupiedVehicle(localPlayer)) end dx = true fadeCamera(true); addEventHandler("onClientGUIClick", guiRoot, function() if source == GUIEditor.button[2] then local Name = guiGetText(GUIEditor.edit[1]) local Pass = guiGetText(GUIEditor.edit[2]) if Name and string.len(tostring(Name)) >= 1 then if Pass and string.len(tostring(Pass)) >= 3 then triggerServerEvent("OnLogin", getLocalPlayer(), Name, Pass) else outputChatBox("* Error : Password Need To Be 3 number or up .", 255, 0, 0, true) end else outputChatBox("* Error : User Name Need To Be 1 or up .", 255, 0, 0, true) end elseif source == GUIEditor.button[1] then local Name = guiGetText(GUIEditor.edit[1]) local Pass = guiGetText(GUIEditor.edit[2]) if Name and string.len(tostring(Name)) >= 1 then if Pass and string.len(tostring(Pass)) >= 3 then triggerServerEvent("OnRegister", getLocalPlayer(), Name, Pass) else outputChatBox("* Error : Password Need To Be 3 number or up .", 255, 0, 0, true) end else outputChatBox("* Error : User Name Need To Be 1 or up .", 255, 0, 0, true) end elseif source == GUIEditor.checkbox[1] then if guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true then triggerServerEvent("OnSave", localPlayer, guiGetText(GUIEditor.edit[1]), guiGetText(GUIEditor.edit[2])) end elseif source == GUIEditor.button[3] then triggerEvent("Play",localPlayer) end end) addEvent("Hidewindow",true) addEventHandler("Hidewindow",root, function () guiSetVisible(GUIEditor.window[1],false) showCursor(false) fadeCamera(true,5) end ) addEvent("Play",true) addEventHandler("Play",root,function() guiSetVisible( GUIEditor.window[1], false) showCursor(false) end) addEvent("UpRememberUser", true) addEventHandler("UpRememberUser", root, function(User, Pass) guiSetText(GUIEditor.edit[1], User) guiSetText(GUIEditor.edit[2], Pass) guiCheckBoxSetSelected(GUIEditor.checkbox[1], true) end) addEvent("onClose", true) addEventHandler("onClose", root, function () showItemsLog_ = false guiSetVisible ( GUIEditor.label[3], false ) guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) guiSetInputEnabled ( false ) end) local againStartMove = 100 local endMove = 400 addEventHandler("onClientRender",root,function() local x,y = guiGetPosition(GUIEditor.label[1],false) guiSetPosition(GUIEditor.label[1],x + 2,y,false) if ( x >= endMove ) then guiSetPosition(GUIEditor.label[1],againStartMove,y,false) end end end ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now