CRoW,,# Posted March 18, 2013 Author Share Posted March 18, 2013 تفضل ~~Server Side ! addEvent ( "login", true ) addEventHandler ( "login", root, function (player, user, pass) local account = getAccount ( user, pass ) if ( account ~= true ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "Hide", player ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end else outputChatBox ( "Wrong Username or Password!", player, 255, 255, 0 ) end end ) addEvent ( "register", true ) addEventHandler ( "register", root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) setElementModel ( player, 287 ) triggerClientEvent ( player, "Hide", player ) else outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", player, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "Hide", player ) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) end end end ) Client Side ! function centerWindow( center_window ) local screenW, screenH = guiGetScreenSize( ); local windowW, windowH = guiGetSize( center_window, false ); local x, y = ( screenW - windowW ) / 2, ( screenH - windowH ) / 2; guiSetPosition( center_window, x, y, false ); end GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,599,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[1] = guiCreateStaticImage(10,25,780,438,"1.png",false,wnd) GUIEditor_Button[1] = guiCreateButton(248,564,94,26,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(420,565,94,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(438,525,25,38,"",false,false,wnd) guiCheckBoxSetSelected(GUIEditor_Checkbox[1],true) GUIEditor_Label[1] = guiCreateLabel(463,532,142,19,"حفظ كلمة المرور",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(306,468,169,23,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(306,501,169,23,"",false,wnd) GUIEditor_Label[2] = guiCreateLabel(243,469,110,21,"username",false,wnd) GUIEditor_Label[3] = guiCreateLabel(243,502,110,21,"password",false,wnd) ss = guiCreateStaticImage(1,1,799,599,"images/صوره.png",false) guiSetVisible(wnd,false) addEventHandler("onClientResourceStart", root, function() guiSetVisible(wnd, true) showCursor(true) end) Link to comment
#Al-Ha[J]aRii Posted March 18, 2013 Share Posted March 18, 2013 تفضل ~~Server Side ! addEvent ( "login", true ) addEventHandler ( "login", root, function (player, user, pass) local account = getAccount ( user, pass ) if ( account ~= true ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "Hide", player ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end else outputChatBox ( "Wrong Username or Password!", player, 255, 255, 0 ) end end ) addEvent ( "register", true ) addEventHandler ( "register", root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) setElementModel ( player, 287 ) triggerClientEvent ( player, "Hide", player ) else outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", player, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "Hide", player ) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) end end end ) Client Side ! function centerWindow( center_window ) local screenW, screenH = guiGetScreenSize( ); local windowW, windowH = guiGetSize( center_window, false ); local x, y = ( screenW - windowW ) / 2, ( screenH - windowH ) / 2; guiSetPosition( center_window, x, y, false ); end GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,599,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[1] = guiCreateStaticImage(10,25,780,438,"1.png",false,wnd) GUIEditor_Button[1] = guiCreateButton(248,564,94,26,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(420,565,94,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(438,525,25,38,"",false,false,wnd) guiCheckBoxSetSelected(GUIEditor_Checkbox[1],true) GUIEditor_Label[1] = guiCreateLabel(463,532,142,19,"حفظ كلمة المرور",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(306,468,169,23,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(306,501,169,23,"",false,wnd) GUIEditor_Label[2] = guiCreateLabel(243,469,110,21,"username",false,wnd) GUIEditor_Label[3] = guiCreateLabel(243,502,110,21,"password",false,wnd) ss = guiCreateStaticImage(1,1,799,599,"images/صوره.png",false) guiSetVisible(wnd,false) addEventHandler("onClientResourceStart", root, function() guiSetVisible(wnd, true) showCursor(true) end) Link to comment
فاّرس Posted March 18, 2013 Share Posted March 18, 2013 تفضل ~~Server Side ! addEvent ( "login", true ) addEventHandler ( "login", root, function (player, user, pass) local account = getAccount ( user, pass ) if ( account ~= true ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Logged in Sucessfuly With User : #00FF00[ " .. user .. " ]!", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "Hide", player ) else outputChatBox ( "Login Error!", player, 255, 255, 0 ) end else outputChatBox ( "Wrong Username or Password!", player, 255, 255, 0 ) end end ) addEvent ( "register", true ) addEventHandler ( "register", root, function ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) setElementModel ( player, 287 ) triggerClientEvent ( player, "Hide", player ) else outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then outputChatBox ( "You Registerd and Logged in Sucessfuly - Please Remember Your User/Password!", player, 255, 255, 0 ) outputChatBox ( "Register Details : [ Username ] : #00FF00" .. user .. " #FFFF1A[ Password ] : #00FF00" .. pass .. "", player, 255, 255, 0 , true ) setElementModel ( player, 287 ) triggerClientEvent ( player, "Hide", player ) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) end end end ) Client Side ! function centerWindow( center_window ) local screenW, screenH = guiGetScreenSize( ); local windowW, windowH = guiGetSize( center_window, false ); local x, y = ( screenW - windowW ) / 2, ( screenH - windowH ) / 2; guiSetPosition( center_window, x, y, false ); end GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Image = {} wnd = guiCreateWindow(1,1,799,599,"",false) guiSetAlpha(wnd,1) GUIEditor_Image[1] = guiCreateStaticImage(10,25,780,438,"1.png",false,wnd) GUIEditor_Button[1] = guiCreateButton(248,564,94,26,"login",false,wnd) GUIEditor_Button[2] = guiCreateButton(420,565,94,24,"register",false,wnd) GUIEditor_Checkbox[1] = guiCreateCheckBox(438,525,25,38,"",false,false,wnd) guiCheckBoxSetSelected(GUIEditor_Checkbox[1],true) GUIEditor_Label[1] = guiCreateLabel(463,532,142,19,"حفظ كلمة المرور",false,wnd) GUIEditor_Edit[1] = guiCreateEdit(306,468,169,23,"",false,wnd) GUIEditor_Edit[2] = guiCreateEdit(306,501,169,23,"",false,wnd) GUIEditor_Label[2] = guiCreateLabel(243,469,110,21,"username",false,wnd) GUIEditor_Label[3] = guiCreateLabel(243,502,110,21,"password",false,wnd) ss = guiCreateStaticImage(1,1,799,599,"images/صوره.png",false) guiSetVisible(wnd,false) addEventHandler("onClientResourceStart", root, function() guiSetVisible(wnd, true) showCursor(true) end) Link to comment
CRoW,,# Posted March 18, 2013 Author Share Posted March 18, 2013 اي واحد من العيال يساعدني Link to comment
hassan.k.s.a Posted March 18, 2013 Share Posted March 18, 2013 خخخخخخخخخخخخخخخ خرابيط قال تسجل دخول خذ تعلم من مود طلال مو مشفر وسهل مرا : https://community.multitheftauto.com/ind ... ls&id=5660 Link to comment
CRoW,,# Posted March 19, 2013 Author Share Posted March 19, 2013 خخخخخخخخخخخخخخخ خرابيط قال تسجل دخولخذ تعلم من مود طلال مو مشفر وسهل مرا : https://community.multitheftauto.com/ind ... ls&id=5660 مافيه خاصية الحفظ Link to comment
فاّرس Posted March 19, 2013 Share Posted March 19, 2013 --لم يتم التجربة if fileExists('acc.xml') then local accRoot = xmlLoadFile('acc.xml') if accRoot then for index, child in next, xmlNodeGetChildren(accRoot) do if xmlNodeGetAttribute(child,'Save') == 'true' then guiSetText(EditUser,xmlNodeGetAttribute(child,'Username')) guiSetText(EditPass,xmlNodeGetAttribute(child,'Password')) guiCheckBoxSetSelected(Check,true) end end xmlUnloadFile(accRoot) end else local accRoot = xmlCreateFile('acc.xml','authentication') if accRoot then local settings = xmlCreateChild(accRoot,'Settings') -- settings xmlNodeSetAttribute(settings,'Username','') xmlNodeSetAttribute(settings,'Password','') xmlNodeSetAttribute(settings,'Save','false') xmlSaveFile(accRoot) xmlUnloadFile(accRoot) end end showCursor(true) end addEventHandler('onClientResourceStart', resourceRoot,) Link to comment
CRoW,,# Posted March 19, 2013 Author Share Posted March 19, 2013 الحين تعلمت من لوحة تسجيل طلال وضبطت اللوحة بس الحين ابي اربط ال GUIEditor_Checkbox[1] بحفظ البيانات 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) showCursor(true) guiSetInputEnabled(true) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then triggerServerEvent("onlogin",getLocalPlayer(),user,pass) elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("onre",getLocalPlayer(),user,pass) end end ) addEvent("setcol",true) addEventHandler("setcol",getRootElement(), function () guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) end ) addEvent("onlogin",true) addEventHandler("onlogin",getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) triggerClientEvent(source,"setcol",source) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent("onre",true) addEventHandler("onre",getRootElement(), 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 ) Link to comment
فاّرس Posted March 19, 2013 Share Posted March 19, 2013 (edited) ووين كود حفظ البيآنآت Edited March 19, 2013 by Guest Link to comment
فاّرس Posted March 19, 2013 Share Posted March 19, 2013 ما جرتهم... Client Side ! 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) showCursor(true) guiSetInputEnabled(true) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then triggerServerEvent("onlogin",getLocalPlayer(),user,pass) elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("onre",getLocalPlayer(),user,pass) elseif ( source == GUIEditor_Checkbox[1] ) then triggerServerEvent("save",getLocalPlayer()) end end end ) addEvent("setcol",true) addEventHandler("setcol",getRootElement(), function () guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) end ) Server Side ! addEvent("onlogin",true) addEventHandler("onlogin",getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) triggerClientEvent(source,"setcol",source) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent("onre",true) addEventHandler("onre",getRootElement(), 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 register ( 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 else 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 end addEventHandler( "register", getRootElement(), register ) Link to comment
PaiN^ Posted March 19, 2013 Share Posted March 19, 2013 تعديل الكلنت : 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",getLocalPlayer()) triggerServerEvent("onlogin",getLocalPlayer(),user,pass) else triggerServerEvent("onlogin",getLocalPlayer(),user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("onre",getLocalPlayer(),user,pass) end end end ) Link to comment
CRoW,,# Posted March 19, 2013 Author Share Posted March 19, 2013 ما اشتغل صدق جاب لي الصداع ذا المود Link to comment
فاّرس Posted March 19, 2013 Share Posted March 19, 2013 جرب كذآ طيب,, addEvent("onlogin",true) addEventHandler("onlogin",getRootElement(), function (user,pass) local account = getAccount(user,pass) if ( account ) then logIn(source,account,pass) triggerClientEvent(source,"setcol",source) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent("onre",true) addEventHandler("onre",getRootElement(), 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 register ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then local node = xmlLoadFile("acc.xml") or xmlCreateFile("acc.xml"," accs") xmlNodeSetValue (xmlCreateChild ( node, "UserName:"), ""..user.."" ) xmlNodeSetValue (xmlCreateChild ( node, "password:"), ""..pass.."" ) xmlSaveFile(node) xmlUnloadFile(node) else outputChatBox ( "Error Login...", player, 255, 0, 0 ) end else 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 end addEvent( "register", true ) addEventHandler( "register", getRootElement(), register ) Link to comment
CRoW,,# Posted March 19, 2013 Author Share Posted March 19, 2013 اللوحة بكبرها ما تظهر اتوقع الخطا في الكلنت Link to comment
فاّرس Posted March 19, 2013 Share Posted March 19, 2013 (edited) اللوحة بكبرها ما تظهر اتوقع الخطا في الكلنت آصلآ مافي مفتاح للنافذه ! المفروض كذآ : 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) showCursor(true) guiSetInputEnabled(true) addEventHandler("onClientGUIClick",getRootElement(), function () local user = guiGetText(GUIEditor_Edit[1]) local pass = guiGetText(GUIEditor_Edit[2]) if ( source == GUIEditor_Button[1] ) then triggerServerEvent("onlogin",getLocalPlayer(),user,pass) elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("onre",getLocalPlayer(),user,pass) elseif ( source == GUIEditor_Checkbox[1] ) then triggerServerEvent("save",getLocalPlayer()) end end end ) function show() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end bindKey ("F2", "down", show) Edited March 19, 2013 by Guest 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) showCursor(true) guiSetInputEnabled(true) 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",getLocalPlayer()) triggerServerEvent("onlogin",getLocalPlayer(),user,pass) else triggerServerEvent("onlogin",getLocalPlayer(),user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("onre",getLocalPlayer(),user,pass) end end end ) addEvent("setcol",true) addEventHandler("setcol",getRootElement(), function () guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) 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) triggerClientEvent(source,"setcol",source) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent("onre",true) addEventHandler("onre",getRootElement(), 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 register ( 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 else 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 end addEventHandler( "register", getRootElement(), register ) xml admin admin Link to comment
فاّرس Posted March 19, 2013 Share Posted March 19, 2013 ابغاها اول م تدخل تفتح 'onClientResourceStart' 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) showCursor(true) guiSetInputEnabled(true) 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",getLocalPlayer()) triggerServerEvent("onlogin",getLocalPlayer(),user,pass) else triggerServerEvent("onlogin",getLocalPlayer(),user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("onre",getLocalPlayer(),user,pass) end end end ) addEvent("setcol",true) addEventHandler("setcol",getRootElement(), function () guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) 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) triggerClientEvent(source,"setcol",source) else outputChatBox("* Worng Username Or Password",source,255,0,0) end end ) addEvent("onre",true) addEventHandler("onre",getRootElement(), 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 register ( 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 else 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 end addEventHandler( "register", getRootElement(), register ) xml admin admin آسف في آند زآئد,, يصير كذآ : 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",getLocalPlayer()) triggerServerEvent("onlogin",getLocalPlayer(),user,pass) else triggerServerEvent("onlogin",getLocalPlayer(),user,pass) end elseif ( source == GUIEditor_Button[2] ) then triggerServerEvent("onre",getLocalPlayer(),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 [13:45:48] ERROR: Client triggered serverside event onre, but event is not added serverside Link to comment
فاّرس Posted March 19, 2013 Share Posted March 19, 2013 بدل اخطاء وتصليح ,, هذا مود جاهز معه الحفظ : https://community.multitheftauto.com/ind ... ls&id=6367 بالتوفيققُ,, Link to comment
CRoW,,# Posted March 19, 2013 Author Share Posted March 19, 2013 بدل اخطاء وتصليح ,,هذا مود جاهز معه الحفظ : https://community.multitheftauto.com/ind ... ls&id=6367 بالتوفيققُ,, عندي ذا بس معقد Link to comment
فاّرس Posted March 19, 2013 Share Posted March 19, 2013 بدل اخطاء وتصليح ,,هذا مود جاهز معه الحفظ : https://community.multitheftauto.com/ind ... ls&id=6367 بالتوفيققُ,, عندي ذا بس معقد افتحة بـ NotePad Link to comment
X-SHADOW 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
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