Mr.OppS Posted June 23, 2017 Share Posted June 23, 2017 السلام عليكم , كيف الحال؟ #عيد_سعيد شباب اريد مساعدةة في لوحة تسجيل الدخوللوحة تشتغل تمام ! مشكلة T,Yاذا انت اسم حسابك بة حرف تكتب اسم حسابك تشوف نفسك تكتب في شات اذا انت مسوي كلمة سر ارقام ! و مسوي الارقام بيها اختصار !! = من تكتب كلمة السر >> الاختصارات تطلع في شات ويصير تخريبسـيـرفـر -- My Login Panel :D function interfaz( ) local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" } for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end local x, y = guiGetScreenSize( ) showCursor( true ) main = guiCreateWindow( x/3.8, y/3.8, x/2.02, y/2, "Login Panel", false ) guiWindowSetMovable( main, false) guiWindowSetSizable( main, false) guiCreateLabel( x/10, y/8, x/4, y/4, "Username:", false, main) guiCreateLabel( x/10, y/5, x/4, y/4, "Password:", false, main) loginU = guiCreateEdit( x/8, y/6.8, x/5, y/24, "", false, main) loginP = guiCreateEdit( x/8, y/4.5, x/5, y/24, "", false, main) guiEditSetMasked( loginP, true ) guiEditSetMaxLength( loginU, 10 ) guiEditSetMaxLength( loginP, 10 ) btnL = guiCreateButton( x/8, y/3.5, x/10, x/20, "Login", false, main) btnR = guiCreateButton( x/4, y/3.5, x/10, x/20, "Register", false, main) addEventHandler ("onClientGUIClick", btnL, function (us, pa) local us = guiGetText (loginU) local pa = guiGetText (loginP) triggerServerEvent ("loggin", getRootElement(), getLocalPlayer(), us, pa) end, false ) addEventHandler ("onClientGUIClick", btnR, function (us, pa) local us = guiGetText (loginU) local pa = guiGetText (loginP) triggerServerEvent ("register", getRootElement(), getLocalPlayer(), us, pa) end, false ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), interfaz ) function hideW () local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" } for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, true ) end showCursor (false) guiSetVisible (main, false) end addEvent ("Succes", true) addEventHandler ("Succes", getRootElement(), hideW) كـلـيـنـت function submitLogin (source, user, pass) if (user ~= "") then if (pass ~= "") then local acc = getAccount (user, pass) if (acc ~= false) then logIn (source, acc, pass) outputChatBox ("You logged in successfully.") triggerClientEvent (source, "Succes", source) else outputChatBox ("Wrong username or password, please try again!", getRootElement(), 255, 255, 255, false) end else outputChatBox ("Password can not be blank.", getRootElement(), 255, 255, 255, false) end else outputChatBox ("Username can not be blank.", getRootElement(), 255, 255, 255, false) end end addEvent ("loggin", true) addEventHandler ("loggin", getRootElement(), submitLogin) addEvent ("register", true) addEventHandler ("register", getRootElement(), function (source, Nuser, Npass) if (Nuser ~= "" and Nuser ~= nil and Npass ~= "" and Npass ~= nil) then local Nacc = addAccount (Nuser, Npass) if Nacc then outputChatBox ("You have successfully registered, now try logging in.", getRootElement(), 255, 255, 255) else outputChatBox ("this account already has been created.", getRootElement(), 255, 255, 255) end end end ) سـاعـدوني في حل هذة مشكلة رجاء رجاءشكراً Link to comment
Kara Posted June 23, 2017 Share Posted June 23, 2017 (edited) -- My Login Panel :D function interfaz( ) local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" } for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end local x, y = guiGetScreenSize( ) showCursor( true ) main = guiCreateWindow( x/3.8, y/3.8, x/2.02, y/2, "Login Panel", false ) guiWindowSetMovable( main, false) guiWindowSetSizable( main, false) guiSetInputEnabled(main,true) guiCreateLabel( x/10, y/8, x/4, y/4, "Username:", false, main) guiCreateLabel( x/10, y/5, x/4, y/4, "Password:", false, main) loginU = guiCreateEdit( x/8, y/6.8, x/5, y/24, "", false, main) loginP = guiCreateEdit( x/8, y/4.5, x/5, y/24, "", false, main) guiEditSetMasked( loginP, true ) guiEditSetMaxLength( loginU, 10 ) guiEditSetMaxLength( loginP, 10 ) btnL = guiCreateButton( x/8, y/3.5, x/10, x/20, "Login", false, main) btnR = guiCreateButton( x/4, y/3.5, x/10, x/20, "Register", false, main) addEventHandler ("onClientGUIClick", btnL, function (us, pa) local us = guiGetText (loginU) local pa = guiGetText (loginP) triggerServerEvent ("loggin", getRootElement(), getLocalPlayer(), us, pa) end, false ) addEventHandler ("onClientGUIClick", btnR, function (us, pa) local us = guiGetText (loginU) local pa = guiGetText (loginP) triggerServerEvent ("register", getRootElement(), getLocalPlayer(), us, pa) end, false ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), interfaz ) function hideW () local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" } for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, true ) end showCursor (false) guiSetVisible (main, false) guiSetInputEnabled(main,false) end addEvent ("Succes", true) addEventHandler ("Succes", getRootElement(), hideW) Edited June 23, 2017 by Kara 1 Link to comment
Mr.OppS Posted June 23, 2017 Author Share Posted June 23, 2017 3 hours ago, Kara said: -- My Login Panel :Dfunction interfaz( ) local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" } for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end local x, y = guiGetScreenSize( ) showCursor( true ) main = guiCreateWindow( x/3.8, y/3.8, x/2.02, y/2, "Login Panel", false ) guiWindowSetMovable( main, false) guiWindowSetSizable( main, false) guiSetInputEnabled(main,true) guiCreateLabel( x/10, y/8, x/4, y/4, "Username:", false, main) guiCreateLabel( x/10, y/5, x/4, y/4, "Password:", false, main) loginU = guiCreateEdit( x/8, y/6.8, x/5, y/24, "", false, main) loginP = guiCreateEdit( x/8, y/4.5, x/5, y/24, "", false, main)guiEditSetMasked( loginP, true )guiEditSetMaxLength( loginU, 10 )guiEditSetMaxLength( loginP, 10 ) btnL = guiCreateButton( x/8, y/3.5, x/10, x/20, "Login", false, main) btnR = guiCreateButton( x/4, y/3.5, x/10, x/20, "Register", false, main) addEventHandler ("onClientGUIClick", btnL, function (us, pa) local us = guiGetText (loginU) local pa = guiGetText (loginP) triggerServerEvent ("loggin", getRootElement(), getLocalPlayer(), us, pa) end, false ) addEventHandler ("onClientGUIClick", btnR, function (us, pa) local us = guiGetText (loginU) local pa = guiGetText (loginP) triggerServerEvent ("register", getRootElement(), getLocalPlayer(), us, pa) end, false )endaddEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), interfaz )function hideW () local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" } for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, true ) end showCursor (false) guiSetVisible (main, false) guiSetInputEnabled(main,false)endaddEvent ("Succes", true)addEventHandler ("Succes", getRootElement(), hideW) نـفـس الـشئ !!ضفت اكودك , ومشكلة موجودة & Debug Script WARNING: LOGIN\loginC.lua:12: Bad argument @'guiSetInputEnbled' [Expected bool at argument 1,got gui-window] Link to comment
#kAsR Posted June 23, 2017 Share Posted June 23, 2017 خليه كذا guiSetInputEnabled(true) 1 Link to comment
Kara Posted June 24, 2017 Share Posted June 24, 2017 1 hour ago, Mr.OppS said: نـفـس الـشئ !!ضفت اكودك , ومشكلة موجودة & Debug Script WARNING: LOGIN\loginC.lua:12: Bad argument @'guiSetInputEnbled' [Expected bool at argument 1,got gui-window] -- My Login Panel :D function interfaz( ) local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" } for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end local x, y = guiGetScreenSize( ) showCursor( true ) main = guiCreateWindow( x/3.8, y/3.8, x/2.02, y/2, "Login Panel", false ) guiWindowSetMovable( main, false) guiWindowSetSizable( main, false) guiSetInputEnabled(true) guiCreateLabel( x/10, y/8, x/4, y/4, "Username:", false, main) guiCreateLabel( x/10, y/5, x/4, y/4, "Password:", false, main) loginU = guiCreateEdit( x/8, y/6.8, x/5, y/24, "", false, main) loginP = guiCreateEdit( x/8, y/4.5, x/5, y/24, "", false, main) guiEditSetMasked( loginP, true ) guiEditSetMaxLength( loginU, 10 ) guiEditSetMaxLength( loginP, 10 ) btnL = guiCreateButton( x/8, y/3.5, x/10, x/20, "Login", false, main) btnR = guiCreateButton( x/4, y/3.5, x/10, x/20, "Register", false, main) addEventHandler ("onClientGUIClick", btnL, function (us, pa) local us = guiGetText (loginU) local pa = guiGetText (loginP) triggerServerEvent ("loggin", getRootElement(), getLocalPlayer(), us, pa) end, false ) addEventHandler ("onClientGUIClick", btnR, function (us, pa) local us = guiGetText (loginU) local pa = guiGetText (loginP) triggerServerEvent ("register", getRootElement(), getLocalPlayer(), us, pa) end, false ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), interfaz ) function hideW () local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" } for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, true ) end showCursor (false) guiSetVisible (main, false) guiSetInputEnabled(false) end addEvent ("Succes", true) addEventHandler ("Succes", getRootElement(), hideW) Link to comment
Mr.OppS Posted June 26, 2017 Author Share Posted June 26, 2017 On ٢٤/٠٦/٢٠١٧ at 03:10, Kara said: -- My Login Panel :Dfunction interfaz( ) local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" } for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end local x, y = guiGetScreenSize( ) showCursor( true ) main = guiCreateWindow( x/3.8, y/3.8, x/2.02, y/2, "Login Panel", false ) guiWindowSetMovable( main, false) guiWindowSetSizable( main, false) guiSetInputEnabled(true) guiCreateLabel( x/10, y/8, x/4, y/4, "Username:", false, main) guiCreateLabel( x/10, y/5, x/4, y/4, "Password:", false, main) loginU = guiCreateEdit( x/8, y/6.8, x/5, y/24, "", false, main) loginP = guiCreateEdit( x/8, y/4.5, x/5, y/24, "", false, main)guiEditSetMasked( loginP, true )guiEditSetMaxLength( loginU, 10 )guiEditSetMaxLength( loginP, 10 ) btnL = guiCreateButton( x/8, y/3.5, x/10, x/20, "Login", false, main) btnR = guiCreateButton( x/4, y/3.5, x/10, x/20, "Register", false, main) addEventHandler ("onClientGUIClick", btnL, function (us, pa) local us = guiGetText (loginU) local pa = guiGetText (loginP) triggerServerEvent ("loggin", getRootElement(), getLocalPlayer(), us, pa) end, false ) addEventHandler ("onClientGUIClick", btnR, function (us, pa) local us = guiGetText (loginU) local pa = guiGetText (loginP) triggerServerEvent ("register", getRootElement(), getLocalPlayer(), us, pa) end, false )endaddEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), interfaz )function hideW () local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" } for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, true ) end showCursor (false) guiSetVisible (main, false) guiSetInputEnabled(false)endaddEvent ("Succes", true)addEventHandler ("Succes", getRootElement(), hideW) On ٢٤/٠٦/٢٠١٧ at 01:52, #kAsR said: خليه كذا guiSetInputEnabled(true) سـويـتـة !!ولكن هناك مشكلة ؛ كود ضعـيـف مشكلة ترجع مرة اخري اذا تكتب اسم حسابك تشوف حالك تكتب في شات Bواذا كلمة سر يوجود بة حرف تشوف لوحة الوزنيات طلعت ^^ حتي تـنـحـل مشكلة = لازم اسوي إعادة تشغيل للمود*ريسترت* !! ارجو الحل Link to comment
iMr.WiFi..! Posted June 26, 2017 Share Posted June 26, 2017 "onClientKey" -- partmer 1 is key if key == .. cancelEvent Link to comment
Mr.OppS Posted June 26, 2017 Author Share Posted June 26, 2017 26 minutes ago, iMr.WiFi..! said: "onClientKey"-- partmer 1 is keyif key == .. cancelEvent ,, ياخي مو حل هذا !! F1.F2.F...انا هكذآ راح اضيـف كل الحروف و كل الـ مشكلة T,Yاذا انت اسم حسابك بة حرف تكتب اسم حسابك تشوف نفسك تكتب في شات اذا انت مسوي كلمة سر ارقام ! و مسوي الارقام بيها اختصار !! = من تكتب كلمة السر >> الاختصارات تطلع في شات ويصير تخريب Link to comment
iMr.WiFi..! Posted June 26, 2017 Share Posted June 26, 2017 Just now, Mr.OppS said: ,, ياخي مو حل هذا !! F1.F2.F...انا هكذآ راح اضيـف كل الحروف و كل الـ key:find Link to comment
Mr.OppS Posted June 26, 2017 Author Share Posted June 26, 2017 Just now, iMr.WiFi..! said: key:find ????????? Link to comment
iMr.WiFi..! Posted June 26, 2017 Share Posted June 26, 2017 (edited) 1 minute ago, Mr.OppS said: ????????? =.= if key.lower():find("f") then Edited June 26, 2017 by iMr.WiFi..! Link to comment
Mr.OppS Posted June 26, 2017 Author Share Posted June 26, 2017 2 minutes ago, iMr.WiFi..! said: =.= if key.lower():find("f") then توضيح ,أكثير ؛ رجاء Link to comment
iMr.WiFi..! Posted June 26, 2017 Share Posted June 26, 2017 Just now, Mr.OppS said: توضيح ,أكثير ؛ رجاء عطيتك الكود .. استعمله وافهمه بنفسك .. بعدين بتتطور اكثر بنفسك ومابتعتمد على الاخرين Link to comment
Mr.OppS Posted June 26, 2017 Author Share Posted June 26, 2017 On ٢٣/٠٦/٢٠١٧ at 18:48, Mr.OppS said: السلام عليكم , كيف الحال؟ #عيد_سعيد شباب اريد مساعدةة في لوحة تسجيل الدخوللوحة تشتغل تمام ! مشكلة T,Yاذا انت اسم حسابك بة حرف تكتب اسم حسابك تشوف نفسك تكتب في شات اذا انت مسوي كلمة سر ارقام ! و مسوي الارقام بيها اختصار !! = من تكتب كلمة السر >> الاختصارات تطلع في شات ويصير تخريبسـيـرفـر -- My Login Panel :D function interfaz( ) local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" } for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, false ) end local x, y = guiGetScreenSize( ) showCursor( true ) main = guiCreateWindow( x/3.8, y/3.8, x/2.02, y/2, "Login Panel", false ) guiWindowSetMovable( main, false) guiWindowSetSizable( main, false) guiCreateLabel( x/10, y/8, x/4, y/4, "Username:", false, main) guiCreateLabel( x/10, y/5, x/4, y/4, "Password:", false, main) loginU = guiCreateEdit( x/8, y/6.8, x/5, y/24, "", false, main) loginP = guiCreateEdit( x/8, y/4.5, x/5, y/24, "", false, main) guiEditSetMasked( loginP, true ) guiEditSetMaxLength( loginU, 10 ) guiEditSetMaxLength( loginP, 10 ) btnL = guiCreateButton( x/8, y/3.5, x/10, x/20, "Login", false, main) btnR = guiCreateButton( x/4, y/3.5, x/10, x/20, "Register", false, main) addEventHandler ("onClientGUIClick", btnL, function (us, pa) local us = guiGetText (loginU) local pa = guiGetText (loginP) triggerServerEvent ("loggin", getRootElement(), getLocalPlayer(), us, pa) end, false ) addEventHandler ("onClientGUIClick", btnR, function (us, pa) local us = guiGetText (loginU) local pa = guiGetText (loginP) triggerServerEvent ("register", getRootElement(), getLocalPlayer(), us, pa) end, false ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), interfaz ) function hideW () local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" } for _, component in ipairs( components ) do setPlayerHudComponentVisible( component, true ) end showCursor (false) guiSetVisible (main, false) end addEvent ("Succes", true) addEventHandler ("Succes", getRootElement(), hideW) كـلـيـنـت function submitLogin (source, user, pass) if (user ~= "") then if (pass ~= "") then local acc = getAccount (user, pass) if (acc ~= false) then logIn (source, acc, pass) outputChatBox ("You logged in successfully.") triggerClientEvent (source, "Succes", source) else outputChatBox ("Wrong username or password, please try again!", getRootElement(), 255, 255, 255, false) end else outputChatBox ("Password can not be blank.", getRootElement(), 255, 255, 255, false) end else outputChatBox ("Username can not be blank.", getRootElement(), 255, 255, 255, false) endendaddEvent ("loggin", true)addEventHandler ("loggin", getRootElement(), submitLogin)addEvent ("register", true)addEventHandler ("register", getRootElement(), function (source, Nuser, Npass) if (Nuser ~= "" and Nuser ~= nil and Npass ~= "" and Npass ~= nil) then local Nacc = addAccount (Nuser, Npass) if Nacc then outputChatBox ("You have successfully registered, now try logging in.", getRootElement(), 255, 255, 255) else outputChatBox ("this account already has been created.", getRootElement(), 255, 255, 255) end end end) سـاعـدوني في حل هذة مشكلة رجاء رجاءشكراً Link to comment
Simple. Posted June 26, 2017 Share Posted June 26, 2017 guiSetInputMode("no_binds_when_editing") 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