Dzemous Posted July 17, 2017 Posted July 17, 2017 Hello guys! I doing panel registration. How I can upload text with EditBox with c-side to s-side? When player click button "Registration" then script must take Login and Password with EditBox and s-side must does function addAccount . This is snippet code c-side: local DaneR_Login = guiGetText (GUIREGISTER.Places_R_Register[1]) --Getting login with editbox local DaneR_Passy = guiGetText (GUIREGISTER.Places_R_Register[2]) --Getting password with edibot local StworzKonto = triggerServerEvent ("StworzKonto", getLocalPlayer ()) --trigger (addaccount) if StworzKonto then outputChatBox ("Pomyślnie utworzono konto o nazwie: "..DaneR_Login) --If s-side addAccount else outputChatBox ("Nie udało się utworzyć konta") --if not addAccount end end end end end addEventHandler ("onClientGUIClick", root, CreateAccountPlayer) S-side function StworzKontoWBazieDanych() addAccount ('DaneR_Login', 'DaneR_Passy') --DaneR_Login and DaneR_Passy this are local with c-side. They getting login and password with editbox. end addEvent("StworzKonto",true) addEventHandler("StworzKonto", getRootElement(), StworzKontoWBazieDanych) 0 db. How I can upload this locals?
Mohameddz Posted July 18, 2017 Posted July 18, 2017 14 hours ago, Dzemous said: Hello guys! I doing panel registration. How I can upload text with EditBox with c-side to s-side? When player click button "Registration" then script must take Login and Password with EditBox and s-side must does function addAccount . This is snippet code c-side: local DaneR_Login = guiGetText (GUIREGISTER.Places_R_Register[1]) --Getting login with editbox local DaneR_Passy = guiGetText (GUIREGISTER.Places_R_Register[2]) --Getting password with edibot local StworzKonto = triggerServerEvent ("StworzKonto", getLocalPlayer ()) --trigger (addaccount) if StworzKonto then outputChatBox ("Pomyślnie utworzono konto o nazwie: "..DaneR_Login) --If s-side addAccount else outputChatBox ("Nie udało się utworzyć konta") --if not addAccount end end end end end addEventHandler ("onClientGUIClick", root, CreateAccountPlayer) S-side function StworzKontoWBazieDanych() addAccount ('DaneR_Login', 'DaneR_Passy') --DaneR_Login and DaneR_Passy this are local with c-side. They getting login and password with editbox. end addEvent("StworzKonto",true) addEventHandler("StworzKonto", getRootElement(), StworzKontoWBazieDanych) 0 db. How I can upload this locals? Try this function onLogin() showChat(true) -You can show or not with changing (true) to (false) showCursor(false) removeEventHandler("onClientRender", root, paint) removeEventHandler("onClientClick",root,onClientClick) removeEventHandler("onClientCharacter",root,onClientCharacter) local DaneR_Login = guiGetText (GUIREGISTER.Places_R_Register[1]) --Getting login with editbox local DaneR_Passy = guiGetText (GUIREGISTER.Places_R_Register[2]) --Getting password with edibot local StworzKonto = triggerServerEvent ("StworzKonto", getLocalPlayer ()) --trigger (addaccount) if StworzKonto then outputChatBox ("Pomyślnie utworzono konto o nazwie: ""..name..") --If s-side addAccount else setElementGetAccount = "(_)("acc")" triggerServerEvent("onRequestLogin",localPlayer,g.user.text,g.pass.text) outputChatBox ("Nie udało się utworzyć konta") --if not Player get registered end end end end end addEvent("onLogin", true) addEventHandler("onLogin", localPlayer, onLogin)
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