ABO-SR777777A Posted July 7, 2013 Author Share Posted July 7, 2013 رتبلي الاكواد الكود مرره مو شغال مدري ليش كلينت GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(208,154,568,231,"Login and Register",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(11,20,548,202,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("login / register",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(73,31,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(256,11,5,5,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[1] = guiCreateEdit(25,51,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[2] = guiCreateEdit(25,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Button[1] = guiCreateButton(47,129,84,33,"register",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[1],"default-bold-small") GUIEditor_Checkbox[1] = guiCreateCheckBox(408,167,57,16,"save",false,false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(73,77,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(366,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[4] = guiCreateEdit(366,50,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Label[4] = guiCreateLabel(421,29,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Label[5] = guiCreateLabel(420,76,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,0) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Button[2] = guiCreateButton(392,131,84,33,"Login",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[2],"default-bold-small") bindKey ( "F2" , "down" , function() if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then guiSetVisible ( GUIEditor_Window[1] ,false ) showCursor (false ) guiSetInputEnabled(false) elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then guiSetVisible ( GUIEditor_Window[1] ,true ) showCursor (true) guiSetInputEnabled(true) end end ) addEventHandler ("onClientGUIClick", root, function() if ( source == GUIEditor_Button[2] ) then triggerServerEvent("Login",getLocalPlayer(), guiGetText(user), guiGetText(pass)) end end ) addEvent ( "onSpecialEvent", true ) -- الخطوه الاولى addEventHandler("onSpecialEvent",root,-- الخطوه الثانيه function () if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then -- الخطوه الثالثه guiSetVisible ( GUIEditor_Window[1] ,false ) -- الخطوه الرابعه showCursor ( true ) end end ) سيرفر addEvent("Login",true) addEventHandler("Login",root, function(player,userName,Password ) local v = getAccount ( userName, Password ) if ( v ~= true) then if logIn ( player, v, Password ) == true then outputChatBox ( "Login with account : [ " .. userName .. " ]", player, 255, 255, 0 , true ) triggerClientEvent("onSpecialEvent",player) else outputChatBox("Error : In login",player,255,255,255,true) end end end ) Link to comment
ABO-SR777777A Posted July 7, 2013 Author Share Posted July 7, 2013 لاتعطيني ياه جاهز قلي وانا اسوي function onJoin ( ) x, y, z = getElementPosition ( source ) local theVehicle = createVehicle ( 470, x, y, z ) warpPedIntoVehicle ( source, theVehicle ) end addEventHandler ( "onPlayerLogin", root, onJoin ) كود السياره Link to comment
فاّرس Posted July 7, 2013 Share Posted July 7, 2013 استفسار==== انا الحين عندي كود ! اذا سجلت login تجيك سياره طيب ! انا ابيه اول مايدخل السيرفر يكون معه سياره ! onPlayerJoin وافضل تسوي جدول للسيارة تجنباً للاخطاء ذذ , createVehicle getElementPosition + كيف تبيه تجيه سياره وهو ما سوى سباون ذذ ؟ استخدم افضل - onPlayerSpawn Link to comment
iPrestege Posted July 7, 2013 Share Posted July 7, 2013 user - pass isn't defined ماهي معرفة Link to comment
فاّرس Posted July 7, 2013 Share Posted July 7, 2013 الحين جيب المتغيرات حق الاديت حق الاسم والباس ذذ لانها مو معرفه مثل ما قالك فهد ذذ Link to comment
فاّرس Posted July 7, 2013 Share Posted July 7, 2013 الحين قولنا وين الاديت حق الاسم والباس ؟ Link to comment
فاّرس Posted July 7, 2013 Share Posted July 7, 2013 Edit # -- Client Side # GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(208,154,568,231,"Login and Register",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(11,20,548,202,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("login / register",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(73,31,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(256,11,5,5,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[1] = guiCreateEdit(25,51,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[2] = guiCreateEdit(25,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Button[1] = guiCreateButton(47,129,84,33,"register",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[1],"default-bold-small") GUIEditor_Checkbox[1] = guiCreateCheckBox(408,167,57,16,"save",false,false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(73,77,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(366,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[4] = guiCreateEdit(366,50,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Label[4] = guiCreateLabel(421,29,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Label[5] = guiCreateLabel(420,76,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,0) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Button[2] = guiCreateButton(392,131,84,33,"Login",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[2],"default-bold-small") bindKey ( "F2" , "down" , function() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetEnabled(guiGetVisible(GUIEditor_Window[1])) end ) addEventHandler ("onClientGUIClick", GUIEditor_Button[2], function() triggerServerEvent("Login",localPlayer, guiGetText(GUIEditor_Edit[4]), guiGetText(GUIEditor_Edit[3])) end,false) addEvent ( "onSpecialEvent", true ) addEventHandler("onSpecialEvent",root, function () if ( guiGetVisible ( GUIEditor_Window[1] )) then guiSetVisible ( GUIEditor_Window[1] ,false ) showCursor ( true ) end end ) -- Server Side # addEvent("Login",true) addEventHandler("Login",root, function(player,userName,Password ) local v = getAccount ( userName, Password ) if ( v ~= true) then if logIn ( player, v, Password ) == true then outputChatBox ( "Login with account : [ " .. userName .. " ]", player, 255, 255, 0 , true ) triggerClientEvent("onSpecialEvent",player) fadeCamera(player,true) else outputChatBox("Error : In login",player,255,255,255,true) end end end ) function Join() fadeCamera(source,false) end addEventHandler("onPlayerJoin",root,Join) ملف سيرفر ضفت له اول ما يدخل الشاشه سودآء واذا سجل الدخول ترجع زي ماهي ذذ Link to comment
ABO-SR777777A Posted July 7, 2013 Author Share Posted July 7, 2013 Edit #-- Client Side # GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(208,154,568,231,"Login and Register",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(11,20,548,202,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("login / register",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(73,31,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(256,11,5,5,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[1] = guiCreateEdit(25,51,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[2] = guiCreateEdit(25,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Button[1] = guiCreateButton(47,129,84,33,"register",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[1],"default-bold-small") GUIEditor_Checkbox[1] = guiCreateCheckBox(408,167,57,16,"save",false,false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(73,77,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(366,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[4] = guiCreateEdit(366,50,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Label[4] = guiCreateLabel(421,29,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Label[5] = guiCreateLabel(420,76,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,0) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Button[2] = guiCreateButton(392,131,84,33,"Login",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[2],"default-bold-small") bindKey ( "F2" , "down" , function() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetEnabled(guiGetVisible(GUIEditor_Window[1])) end ) addEventHandler ("onClientGUIClick", GUIEditor_Button[2], function() triggerServerEvent("Login",localPlayer, guiGetText(GUIEditor_Edit[4]), guiGetText(GUIEditor_Edit[3])) end,false) addEvent ( "onSpecialEvent", true ) addEventHandler("onSpecialEvent",root, function () if ( guiGetVisible ( GUIEditor_Window[1] )) then guiSetVisible ( GUIEditor_Window[1] ,false ) showCursor ( true ) end end ) -- Server Side # addEvent("Login",true) addEventHandler("Login",root, function(player,userName,Password ) local v = getAccount ( userName, Password ) if ( v ~= true) then if logIn ( player, v, Password ) == true then outputChatBox ( "Login with account : [ " .. userName .. " ]", player, 255, 255, 0 , true ) triggerClientEvent("onSpecialEvent",player) fadeCamera(player,true) else outputChatBox("Error : In login",player,255,255,255,true) end end end ) function Join() fadeCamera(source,false) end addEventHandler("onPlayerJoin",root,Join) ملف سيرفر ضفت له اول ما يدخل الشاشه سودآء واذا سجل الدخول ترجع زي ماهي ذذ الشاشه سوده وكل شي بس مايسجل دخول ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟ [20:12:08] WARNING: 4\server.lua:6: Bad argument @ 'logIn' [Expected player at argument 1, got string 'A'] [20:12:08] WARNING: 4\server.lua:11: Bad argument @ 'outputChatBox' [Expected element at argument 2, got string 'A'] Link to comment
فاّرس Posted July 7, 2013 Share Posted July 7, 2013 جرب كذا , addEvent("Login",true) addEventHandler("Login",root, function( userName,Password ) local v = getAccount ( userName, Password ) if ( v ~= true) then logIn ( client, v, Password ) outputChatBox ( "Login with account : [ " .. userName .. " ]", client, 255, 255, 0 , true ) triggerClientEvent("onSpecialEvent",client) fadeCamera(source,true) else outputChatBox("Error : In login",client,255,255,255,true) end end ) function Join() fadeCamera(source,false) end addEventHandler("onPlayerJoin",root,Join) Link to comment
ABO-SR777777A Posted July 7, 2013 Author Share Posted July 7, 2013 اذا سجلت login الماوس يجيني ولو دخلت السيرفر مايجي الماوس + اذا دق على lgoin يدخله انا ابيه يسجل Link to comment
فاّرس Posted July 7, 2013 Share Posted July 7, 2013 بالنسبه للماوس , انا نبهتك اول انك حاط true ._. خليه كذا , GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(208,154,568,231,"Login and Register",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(11,20,548,202,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("login / register",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(73,31,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(256,11,5,5,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[1] = guiCreateEdit(25,51,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[2] = guiCreateEdit(25,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Button[1] = guiCreateButton(47,129,84,33,"register",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[1],"default-bold-small") GUIEditor_Checkbox[1] = guiCreateCheckBox(408,167,57,16,"save",false,false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(73,77,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(366,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[4] = guiCreateEdit(366,50,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Label[4] = guiCreateLabel(421,29,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Label[5] = guiCreateLabel(420,76,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,0) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Button[2] = guiCreateButton(392,131,84,33,"Login",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[2],"default-bold-small") bindKey ( "F2" , "down" , function() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetEnabled(guiGetVisible(GUIEditor_Window[1])) end ) addEventHandler ("onClientGUIClick", GUIEditor_Button[2], function() triggerServerEvent("Login",localPlayer, guiGetText(GUIEditor_Edit[4]), guiGetText(GUIEditor_Edit[3])) end,false) addEvent ( "onSpecialEvent", true ) addEventHandler("onSpecialEvent",root, function () if ( guiGetVisible ( GUIEditor_Window[1] )) then guiSetVisible ( GUIEditor_Window[1] ,false ) showCursor ( false ) end end ) بالنسبه للسيرفر , اصلا انت قلت تبيه يسجل الدخول ,؟؟ واصلا الكود مافي تسجيل خير شر ذذ Link to comment
ABO-SR777777A Posted July 7, 2013 Author Share Posted July 7, 2013 انا قصدي اذا كان مو مسجل مايقدر يدخل Link to comment
ABO-SR777777A Posted July 7, 2013 Author Share Posted July 7, 2013 بالنسبه للماوس , انا نبهتك اول انك حاط true ._.خليه كذا , GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(208,154,568,231,"Login and Register",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(11,20,548,202,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("login / register",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(73,31,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(256,11,5,5,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[1] = guiCreateEdit(25,51,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[2] = guiCreateEdit(25,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Button[1] = guiCreateButton(47,129,84,33,"register",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[1],"default-bold-small") GUIEditor_Checkbox[1] = guiCreateCheckBox(408,167,57,16,"save",false,false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(73,77,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(366,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[4] = guiCreateEdit(366,50,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Label[4] = guiCreateLabel(421,29,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Label[5] = guiCreateLabel(420,76,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,0) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Button[2] = guiCreateButton(392,131,84,33,"Login",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[2],"default-bold-small") bindKey ( "F2" , "down" , function() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetEnabled(guiGetVisible(GUIEditor_Window[1])) end ) addEventHandler ("onClientGUIClick", GUIEditor_Button[2], function() triggerServerEvent("Login",localPlayer, guiGetText(GUIEditor_Edit[4]), guiGetText(GUIEditor_Edit[3])) end,false) addEvent ( "onSpecialEvent", true ) addEventHandler("onSpecialEvent",root, function () if ( guiGetVisible ( GUIEditor_Window[1] )) then guiSetVisible ( GUIEditor_Window[1] ,false ) showCursor ( false ) end end ) بالنسبه للسيرفر , اصلا انت قلت تبيه يسجل الدخول ,؟؟ واصلا الكود مافي تسجيل خير شر ذذ حطيته ومانفع Link to comment
فاّرس Posted July 7, 2013 Share Posted July 7, 2013 ^ كيف ما نفع ذذ ؟ false = يعني ما بيظهر ._. بالنسبه للتسجيل بدل , login(client,v,Password) الى , addAccount ( userName, Password ) وجرب , ضيفه لقروب الادمن ذذ مدري ليه تبيه يسجل , سوي ترايقر ثاني للتسجيل , ولا خلها تسجيل مع تسجيل دخول في كود واحد ذذ Link to comment
ABO-SR777777A Posted July 7, 2013 Author Share Posted July 7, 2013 لا كود التسجيل مسويه انا قبل في الصفحات بس شوفه صح ولالا ورد علي Link to comment
فاّرس Posted July 7, 2013 Share Posted July 7, 2013 جرب كذا ذذ , -- Client Side # GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Checkbox = {} GUIEditor_Label = {} GUIEditor_Edit = {} GUIEditor_Window[1] = guiCreateWindow(208,154,568,231,"Login and Register",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(11,20,548,202,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("login / register",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(73,31,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[1],255,255,0) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(256,11,5,5,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[1] = guiCreateEdit(25,51,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[2] = guiCreateEdit(25,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Button[1] = guiCreateButton(47,129,84,33,"register",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[1],"default-bold-small") GUIEditor_Checkbox[1] = guiCreateCheckBox(408,167,57,16,"save",false,false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Checkbox[1],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(73,77,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[3],255,255,0) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Edit[3] = guiCreateEdit(366,93,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Edit[4] = guiCreateEdit(366,50,134,26,"",false,GUIEditor_Tab[1]) GUIEditor_Label[4] = guiCreateLabel(421,29,38,17,"user",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[4],255,255,0) guiSetFont(GUIEditor_Label[4],"default-bold-small") GUIEditor_Label[5] = guiCreateLabel(420,76,38,17,"pass",false,GUIEditor_Tab[1]) guiLabelSetColor(GUIEditor_Label[5],255,255,0) guiSetFont(GUIEditor_Label[5],"default-bold-small") GUIEditor_Button[2] = guiCreateButton(392,131,84,33,"Login",false,GUIEditor_Tab[1]) guiSetFont(GUIEditor_Button[2],"default-bold-small") bindKey ( "F2" , "down" , function() guiSetVisible(GUIEditor_Window[1],not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetEnabled(guiGetVisible(GUIEditor_Window[1])) end ) addEventHandler ("onClientGUIClick",root, function() if source == GUIEditor_Button[2] then triggerServerEvent("Login",localPlayer, guiGetText(GUIEditor_Edit[4]), guiGetText(GUIEditor_Edit[3])) elseif source == GUIEditor_Button[1] then triggerServerEvent("Register",localPlayer, guiGetText(GUIEditor_Edit[1]), guiGetText(GUIEditor_Edit[2])) end end ) addEvent ( "onSpecialEvent", true ) addEventHandler("onSpecialEvent",root, function () if ( guiGetVisible ( GUIEditor_Window[1] )) then guiSetVisible ( GUIEditor_Window[1] ,false ) showCursor ( false ) end end ) -- Server Side # addEvent("Login",true) addEventHandler("Login",root, function( userName,Password ) local v = getAccount ( userName, Password ) if ( v ~= true) then logIn(client,v,Password) outputChatBox ( "Login with account : [ " .. userName .. " ]", client, 255, 255, 0 , true ) triggerClientEvent("onSpecialEvent",client) fadeCamera(source,true) else outputChatBox("Error : In login",client,255,255,255,true) end end ) function Join() fadeCamera(source,false) end addEventHandler("onPlayerJoin",root,Join) addEvent("Register",true) addEventHandler("Register",root, function(userName,Password) Add = addAccount( user, pass ) if Add ~= false then outputChatBox ( "Thank you " .. getPlayerName(source) .. ", you're now registed, you can login with /login", source ) else outputChatBox ( "Error creating account, contact the server admin", source ) end end ) ضيفه لقروب الادمن ذذ , resource.ResourceName ResourceName = اسم المود ذذ, Link to comment
ABO-SR777777A Posted July 7, 2013 Author Share Posted July 7, 2013 (edited) اوكـ بس بس مايسجل العضو والدخول نفس المشكله والماوس مايطلع == قبل كل شي اشكرك لوقوفك معي ومساعدتي ماقصرت اخوي اشكرك بكل عنف edit : ??? Edited July 7, 2013 by Guest Link to comment
فاّرس Posted July 7, 2013 Share Posted July 7, 2013 ضايفه لقروب الادمن ؟ لاني جربته وشغال تمام عندي ذذ Link to comment
فاّرس Posted July 7, 2013 Share Posted July 7, 2013 في خطأ بملف سيرفر ما انتبهت له ذذ , addEvent("Login",true) addEventHandler("Login",root, function( userName,Password ) local v = getAccount ( userName, Password ) if ( v ~= true) then logIn(client,v,Password) outputChatBox ( "Login with account : [ " .. userName .. " ]", client, 255, 255, 0 , true ) triggerClientEvent("onSpecialEvent",client) fadeCamera(source,true) else outputChatBox("Error : In login",client,255,255,255,true) end end ) function Join() fadeCamera(source,false) end addEventHandler("onPlayerJoin",root,Join) addEvent("Register",true) addEventHandler("Register",root, function(user,pass) Add = addAccount( user, pass ) if Add ~= false then outputChatBox ( "Thank you " .. getPlayerName(source) .. ", you're now registed, you can login with /login", source ) else outputChatBox ( "Error creating account, contact the server admin", source ) end end ) Link to comment
ABO-SR777777A Posted July 7, 2013 Author Share Posted July 7, 2013 طيب طيب ابي كود حق الباسورد يخليه كذا ****** Link to comment
Recommended Posts