CRoW,,# Posted March 19, 2013 Author Share Posted March 19, 2013 اشتغل بس النافذة ما تروح +البينات ما تنحفظ Link to comment
فاّرس Posted March 19, 2013 Share Posted March 19, 2013 --ServerSide addEvent('onlogin',true) addEventHandler('onlogin',getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent('onre',true) addEventHandler('onre',root, function (user,pass) local account = getAccount(user,pass) if ( account ) then outputChatBox("* This Account is Already Used",source,255,0,0) else addAccount(user,pass) outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) end end ) addEvent("save",true) addEventHandler("save",root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then local lr = xmlLoadFile("acc.xml") or xmlCreateFile("acc.xml"," acc") xmlNodeSetValue (xmlCreateChild ( lr, "UserName:"), ""..user.."" ) xmlNodeSetValue (xmlCreateChild ( lr, "password:"), ""..pass.."" ) xmlSaveFile(lr) xmlUnloadFile(lr) else outputChatBox ( "Error Login...", player, 255, 0, 0 ) end end end) addEventHandler('register', root, function (player, user, pass ) account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "Register : [ Username ] : " .. user .. " [ Password ] : " .. pass .. "", player, 255, 255, 0 , true ) else outputChatBox ( "Erorr Register", player, 255, 255, 0 ) end end) --ClientSide GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"images/games.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent('save',localPlayer) triggerServerEvent('onlogin',localPlayer,user,pass) else triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent('onre',localPlayer,user,pass) end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"images/games.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then guiSetVisible (wnd, false) showCursor(false) if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent('save',localPlayer) triggerServerEvent('onlogin',localPlayer,user,pass) else triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then guiSetVisible (wnd, false) showCursor(false) triggerServerEvent('onre',localPlayer,user,pass) end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) Link to comment
hassan.k.s.a Posted March 19, 2013 Share Posted March 19, 2013 --ServerSide addEvent('onlogin',true) addEventHandler('onlogin',getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent('onre',true) addEventHandler('onre',root, function (user,pass) local account = getAccount(user,pass) if ( account ) then outputChatBox("* This Account is Already Used",source,255,0,0) else addAccount(user,pass) outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) end end ) addEvent("save",true) addEventHandler("save",root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then local lr = xmlLoadFile("acc.xml") or xmlCreateFile("acc.xml"," acc") xmlNodeSetValue (xmlCreateChild ( lr, "UserName:"), ""..user.."" ) xmlNodeSetValue (xmlCreateChild ( lr, "password:"), ""..pass.."" ) xmlSaveFile(lr) xmlUnloadFile(lr) else outputChatBox ( "Error Login...", player, 255, 0, 0 ) end end end) addEventHandler('register', root, function (player, user, pass ) account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "Register : [ Username ] : " .. user .. " [ Password ] : " .. pass .. "", player, 255, 255, 0 , true ) else outputChatBox ( "Erorr Register", player, 255, 255, 0 ) end end) --ClientSide GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"images/games.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent('save',localPlayer) triggerServerEvent('onlogin',localPlayer,user,pass) else triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent('onre',localPlayer,user,pass) end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) بيكون سيرفر وماراح يشوفه العضو راح يشوفه صاحب السيرفر في الملفات بس ^.^ لازم كلينت + ملف ألأكسمل كلينت Link to comment
CRoW,,# Posted March 19, 2013 Author Share Posted March 19, 2013 GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"2.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent('save',localPlayer) triggerServerEvent('onlogin',localPlayer,user,pass) else triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent('onre',localPlayer,user,pass) end end ) addEvent('onre',true) addEventHandler('onre',root, function (user,pass) local account = getAccount(user,pass) if ( account ) then outputChatBox("* This Account is Already Used",source,255,0,0) else addAccount(user,pass) outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) end end ) addEvent("save",true) addEventHandler("save",root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then local lr = xmlLoadFile("acc.xml") or xmlCreateFile("acc.xml"," acc") xmlNodeSetValue (xmlCreateChild ( lr, "UserName:"), ""..user.."" ) xmlNodeSetValue (xmlCreateChild ( lr, "password:"), ""..pass.."" ) xmlSaveFile(lr) xmlUnloadFile(lr) else outputChatBox ( "Error Login...", player, 255, 0, 0 ) end end end) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) addEvent('onlogin',true) addEventHandler('onlogin',getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEventHandler('register', root, function (player, user, pass ) account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "Register : [ Username ] : " .. user .. " [ Password ] : " .. pass .. "", player, 255, 255, 0 , true ) else outputChatBox ( "Erorr Register", player, 255, 255, 0 ) end end) يصير كذا ؟ Link to comment
فاّرس Posted March 19, 2013 Share Posted March 19, 2013 GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"2.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent('save',localPlayer) triggerServerEvent('onlogin',localPlayer,user,pass) else triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent('onre',localPlayer,user,pass) end end ) addEvent('onre',true) addEventHandler('onre',root, function (user,pass) local account = getAccount(user,pass) if ( account ) then outputChatBox("* This Account is Already Used",source,255,0,0) else addAccount(user,pass) outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) end end ) addEvent("save",true) addEventHandler("save",root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then local lr = xmlLoadFile("acc.xml") or xmlCreateFile("acc.xml"," acc") xmlNodeSetValue (xmlCreateChild ( lr, "UserName:"), ""..user.."" ) xmlNodeSetValue (xmlCreateChild ( lr, "password:"), ""..pass.."" ) xmlSaveFile(lr) xmlUnloadFile(lr) else outputChatBox ( "Error Login...", player, 255, 0, 0 ) end end end) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) addEvent('onlogin',true) addEventHandler('onlogin',getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEventHandler('register', root, function (player, user, pass ) account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "Register : [ Username ] : " .. user .. " [ Password ] : " .. pass .. "", player, 255, 255, 0 , true ) else outputChatBox ( "Erorr Register", player, 255, 255, 0 ) end end) يصير كذا ؟ في وظآئف سيرفر وش جآبهآ كلنت !؟ Link to comment
CRoW,,# Posted March 19, 2013 Author Share Posted March 19, 2013 GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"2.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent('save',localPlayer) triggerServerEvent('onlogin',localPlayer,user,pass) else triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent('onre',localPlayer,user,pass) end end ) addEvent('onre',true) addEventHandler('onre',root, function (user,pass) local account = getAccount(user,pass) if ( account ) then outputChatBox("* This Account is Already Used",source,255,0,0) else addAccount(user,pass) outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) end end ) addEvent("save",true) addEventHandler("save",root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then local lr = xmlLoadFile("acc.xml") or xmlCreateFile("acc.xml"," acc") xmlNodeSetValue (xmlCreateChild ( lr, "UserName:"), ""..user.."" ) xmlNodeSetValue (xmlCreateChild ( lr, "password:"), ""..pass.."" ) xmlSaveFile(lr) xmlUnloadFile(lr) else outputChatBox ( "Error Login...", player, 255, 0, 0 ) end end end) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) addEvent('onlogin',true) addEventHandler('onlogin',getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEventHandler('register', root, function (player, user, pass ) account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "Register : [ Username ] : " .. user .. " [ Password ] : " .. pass .. "", player, 255, 255, 0 , true ) else outputChatBox ( "Erorr Register", player, 255, 255, 0 ) end end) يصير كذا ؟ في وظآئف سيرفر وش جآبهآ كلنت !؟ xml لازم يصير كلنت Link to comment
فاّرس Posted March 19, 2013 Share Posted March 19, 2013 ^^ آقصد getAccount + logIn = هذي ما تجي الا في السيرفر ! Link to comment
CRoW,,# Posted March 19, 2013 Author Share Posted March 19, 2013 GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"1.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent('save',localPlayer) triggerServerEvent('onlogin',localPlayer,user,pass) else triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent('onre',localPlayer,user,pass) end end ) addEvent("save",true) addEventHandler("save",root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then local lr = xmlLoadFile("acc.xml") or xmlCreateFile("acc.xml"," acc") xmlNodeSetValue (xmlCreateChild ( lr, "UserName:"), ""..user.."" ) xmlNodeSetValue (xmlCreateChild ( lr, "password:"), ""..pass.."" ) xmlSaveFile(lr) xmlUnloadFile(lr) else outputChatBox ( "Error Login...", player, 255, 0, 0 ) end end end) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) addEvent('onlogin',true) addEventHandler('onlogin',getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent('onre',true) addEventHandler('onre',root, function (user,pass) local account = getAccount(user,pass) if ( account ) then outputChatBox("* This Account is Already Used",source,255,0,0) else addAccount(user,pass) outputChatBox("UserName: " .. user .. " PassWord : " .. pass,source,0,150,255) end end ) addEventHandler('register', root, function (player, user, pass ) account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "Register : [ Username ] : " .. user .. " [ Password ] : " .. pass .. "", player, 255, 255, 0 , true ) else outputChatBox ( "Erorr Register", player, 255, 255, 0 ) end end) Link to comment
فاّرس Posted March 19, 2013 Share Posted March 19, 2013 اذا جآ كلنت رآح يصير تقريبآ كذآ : function loadLoginFromXML() local xml_save_log_File = xmlLoadFile ("name.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("name.xml", "login") end local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if usernameNode and passwordNode then return xmlNodeGetValue(usernameNode), xmlNodeGetValue(passwordNode) else return "", "" end xmlUnloadFile ( xml_save_log_File ) end function saveLoginToXML(username, password) local xml_save_log_File = xmlLoadFile ("name.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("name.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end xmlNodeSetValue (usernameNode, tostring(username)) end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, tostring(password)) end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("saveLoginToXML", true) addEventHandler("saveLoginToXML", getRootElement(), saveLoginToXML) function resetSaveXML() local xml_save_log_File = xmlLoadFile ("name.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("name.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, "") end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("resetSaveXML", true) addEventHandler("resetSaveXML", getRootElement(), resetSaveXML) Link to comment
CRoW,,# Posted March 19, 2013 Author Share Posted March 19, 2013 يبغا لها واحد فاهم sql &xml Link to comment
hassan.k.s.a Posted March 19, 2013 Share Posted March 19, 2013 (edited) هات المود حقك وهو شغال واسويه لك او خذ مثال : b = guiCreateButton(9,157,102,29,"save",false) e1 = guiCreateEdit(78,39,181,29,"name",false) e2 = guiCreateEdit(78,77,181,29,"pass",false) addEventHandler("onClientGUIClick",getRootElement(),function() if source == b then user = guiGetText(e1) pass = guiGetText(e2) local file = xmlLoadFile("account.xml") or xmlCreateFile("account.xml","account") xmlNodeSetValue(xmlCreateChild(file,"name"),""..user.."") xmlNodeSetValue(xmlCreateChild(file,"pass"),""..pass.."") xmlSaveFile(file) end end) اذا ماعرفت هات المود حقك او ملف كلينت واسويه لك ..~# Edited March 19, 2013 by Guest Link to comment
X-SHADOW Posted March 19, 2013 Share Posted March 19, 2013 (edited) Fixed @ ---ClientSide GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"images/games.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent('save',localPlayer,user,pass) triggerServerEvent('onlogin',localPlayer,user,pass) else triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent('Register',localPlayer,user,pass) end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) addEvent('xml', true) addEventHandler('xml', root, function ( ) local lr = xmlLoadFile("acc.xml") or xmlCreateFile("acc.xml"," acc") xmlNodeSetValue (xmlCreateChild ( lr, "UserName:"), ""..user.."" ) xmlNodeSetValue (xmlCreateChild ( lr, "password:"), ""..pass.."" ) xmlSaveFile(lr) xmlUnloadFile(lr) end ) ----ServerSide addEvent('onlogin',true) addEvent('onRegister', true) addEvent('save', true) addEventHandler('onlogin',getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEventHandler('onRegister',root, function (user,pass) local account = getAccount(user,pass) if ( account ) then outputChatBox("* This Account is Already Used",source,255,0,0) else addAccount(user,pass) outputChatBox ( "Register : [ Username ] : " .. user .. " [ Password ] : " .. pass .. "", player, 255, 255, 0 , true ) end end ) addEventHandler('save',root, function ( player, user,pass ) local account = getAccount ( user,pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent(player, 'xml', player) else outputChatBox ( "Error Login...", player, 255, 0, 0 ) end end end) Edited March 19, 2013 by Guest Link to comment
hassan.k.s.a Posted March 19, 2013 Share Posted March 19, 2013 ---ClientSide GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"images/games.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent('save',localPlayer) triggerServerEvent('onlogin',localPlayer,user,pass) else triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent('Register',localPlayer,user,pass) end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) addEvent('xml', true) addEventHandler('xml', root, function ( ) local lr = xmlLoadFile("acc.xml") or xmlCreateFile("acc.xml"," acc") xmlNodeSetValue (xmlCreateChild ( lr, "UserName:"), ""..user.."" ) xmlNodeSetValue (xmlCreateChild ( lr, "password:"), ""..pass.."" ) xmlSaveFile(lr) xmlUnloadFile(lr) end ) ----ServerSide addEvent('onlogin',true) addEvent('onRegister', true) addEvent('save', true) addEventHandler('onlogin',getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEventHandler('onRegister',root, function (user,pass) local account = getAccount(user,pass) if ( account ) then outputChatBox("* This Account is Already Used",source,255,0,0) else addAccount(user,pass) outputChatBox ( "Register : [ Username ] : " .. user .. " [ Password ] : " .. pass .. "", player, 255, 255, 0 , true ) end end ) addEventHandler('save',root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent(player, 'xml', player) else outputChatBox ( "Error Login...", player, 255, 0, 0 ) end end end) triggerServerEvent('save',localPlayer) addEventHandler('save',root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent(player, 'xml', player) else outputChatBox ( "Error Login...", player, 255, 0, 0 ) end end end) !!!! التريقر ماحطيت فيه الباس وألأسم Link to comment
hassan.k.s.a Posted March 19, 2013 Share Posted March 19, 2013 العفو , اهم شي صاحب الموضوع نشوف جآته الأفآده ولا لا ..ٍ~# Link to comment
CRoW,,# Posted March 19, 2013 Author Share Posted March 19, 2013 هات المود حقك وهو شغال واسويه لك او خذ مثال : b = guiCreateButton(9,157,102,29,"save",false) e1 = guiCreateEdit(78,39,181,29,"name",false) e2 = guiCreateEdit(78,77,181,29,"pass",false) addEventHandler("onClientGUIClick",getRootElement(),function() if source == b then user = guiGetText(e1) pass = guiGetText(e2) local file = xmlLoadFile("account.xml") or xmlCreateFile("account.xml","account") xmlNodeSetValue(xmlCreateChild(file,"name"),""..user.."") xmlNodeSetValue(xmlCreateChild(file,"pass"),""..pass.."") xmlSaveFile(file) end end) اذا ماعرفت هات المود حقك او ملف كلينت واسويه لك ..~# GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"1.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent('save',localPlayer) triggerServerEvent('onlogin',localPlayer,user,pass) else triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent('onre',localPlayer,user,pass) end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) تفضل طال عمرك ذذ Link to comment
X-SHADOW Posted March 19, 2013 Share Posted March 19, 2013 سويت اصلاحات بالكود جربه الحين . Link to comment
hassan.k.s.a Posted March 19, 2013 Share Posted March 19, 2013 GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"1.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent('save',localPlayer) local file = xmlLoadFile("account.xml") or xmlCreateFile("account.xml","account") xmlNodeSetValue(xmlCreateChild(file,"name"),""..user.."") xmlNodeSetValue(xmlCreateChild(file,"pass"),""..pass.."") xmlSaveFile(file) triggerServerEvent('onlogin',localPlayer,user,pass) else triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent('onre',localPlayer,user,pass) end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) Link to comment
X-SHADOW Posted March 19, 2013 Share Posted March 19, 2013 GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"1.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then triggerServerEvent('save',localPlayer) local file = xmlLoadFile("account.xml") or xmlCreateFile("account.xml","account") xmlNodeSetValue(xmlCreateChild(file,"name"),""..user.."") xmlNodeSetValue(xmlCreateChild(file,"pass"),""..pass.."") xmlSaveFile(file) triggerServerEvent('onlogin',localPlayer,user,pass) else triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent('onre',localPlayer,user,pass) end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) You just fall in my same mistake forget to add user, pass on triggerServerEvent('save, localPlayer) lol . Link to comment
hassan.k.s.a Posted March 19, 2013 Share Posted March 19, 2013 هو جاب كلينت وظفت له بس ! وبعدين مايحتآج تريقر لـ الحفظ لأنه هو حط ترريقر لتسجيل الدخول ليه يكرر ؟ خذ بدون تريقر : GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"1.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then local file = xmlLoadFile("account.xml") or xmlCreateFile("account.xml","account") xmlNodeSetValue(xmlCreateChild(file,"name"),""..user.."") xmlNodeSetValue(xmlCreateChild(file,"pass"),""..pass.."") xmlSaveFile(file) triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent('onre',localPlayer,user,pass) end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) Link to comment
فاّرس Posted March 19, 2013 Share Posted March 19, 2013 ^^ GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,600,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[2] = guiCreateStaticImage(10,24,781,449,"1.png",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(299,484,166,27,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(299,520,166,27,"",false,wnd) guiEditSetMasked(GUIEditor_Edit[2],true) GUIEditor_Label[1] = guiCreateLabel(238,487,106,18,"username",false,wnd) GUIEditor_Label[2] = guiCreateLabel(238,521,106,18,"password",false,wnd) GUIEditor_Button[1] = guiCreateButton(279,559,78,24,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(432,559,78,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(474,522,123,22,"تذكرني",false,false,wnd) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then guiSetVisible (wnd,false) showCursor(false) if ( guiCheckBoxGetSelected ( GUIEditor_Checkbox[1] ) ) then local file = xmlLoadFile("account.xml") or xmlCreateFile("account.xml","account") xmlNodeSetValue(xmlCreateChild(file,"name"),""..user.."") xmlNodeSetValue(xmlCreateChild(file,"pass"),""..pass.."") xmlSaveFile(file) triggerServerEvent('onlogin',localPlayer,user,pass) end elseif ( source == GUIEditor_Button[2] ) then guiSetVisible (wnd,false) showCursor(false) triggerServerEvent('onre',localPlayer,user,pass) end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) OnClick hide window * Link to comment
CRoW,,# Posted March 19, 2013 Author Share Posted March 19, 2013 ما اشتغل ذا هوالملف http://www.gulfup.com/?5ABFiB Link to comment
hassan.k.s.a Posted March 19, 2013 Share Posted March 19, 2013 راح ينزل بـ مسار نزول المود راح يكون في نفس الملف حق المود لاكن بـ مسار نزول المودآت لما تتحمل ..~! Link to comment
CRoW,,# Posted March 19, 2013 Author Share Posted March 19, 2013 راح ينزل بـ مسار نزول المود راح يكون في نفس الملف حق المود لاكن بـ مسار نزول المودآت لما تتحمل ..~! هو ما اشتغل اصلا Link to comment
X-SHADOW Posted March 19, 2013 Share Posted March 19, 2013 تم الاصلاح باقي مشكلة بسيطه والحين ارفع لك المود . 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