China_Yann Posted March 27, 2016 Share Posted March 27, 2016 i don't know how to do,i'm a green hand,please help me ,thank you! "triggered serverside event onRquestLogin ,but event is not added serverside" function PlayerLogin(username,password) if username == "" then return triggerClientEvent(source,"login_text",source,"error","Coloque seu nome de usuario!") end if password == "" then return triggerClientEvent(source,"login_text",source,"error","Coloque sua senha!") end local account = getAccount ( username, password ) if account == false then return triggerClientEvent(source,"login_text",source,"error","Nome de usuario ou senha incorretos!") end logIn(source, account, password) triggerClientEvent(source,"onLogin",source) triggerClientEvent(source,"saveLoginToXML",source,username) triggerClientEvent(source,"login_text",source,"sucess","Logado com sucesso!") end addEvent("onRequestLogin",true) addEventHandler("onRequestLogin",getRootElement(),PlayerLogin) function registerPlayer(username,password) if username == "" then return triggerClientEvent(source,"login_text",source,"error","Coloque seu nome de usuario!") end if password == "" then return triggerClientEvent(source,"login_text",source,"error","Coloque sua senha!") end local account = getAccount (username,password) if account then return triggerClientEvent(source,"login_text",source,"error","Este nome de usuario já esta sendo usado!") end local accountAdded = addAccount(tostring(username),tostring(password)) if not accountAdded then return triggerClientEvent(source,"login_text",source,"error","Erro! Tente novamente com um novo nome de usuario ou senha!") end outputChatBox ("[usuario: #FFFFFF" .. username .. " #00FF00| Senha: #FFFFFF" .. password .. "#00FF00 ]",source,255,255,255,true) triggerClientEvent(source,"onRegister",source) triggerClientEvent(source,"login_text",source,"sucess","Conta criada com sucesso!") end addEvent("onRequestRegister",true) addEventHandler("onRequestRegister",getRootElement(),registerPlayer) Link to comment
Fist Posted March 27, 2016 Share Posted March 27, 2016 Theese 2 scripts are both on server side? Link to comment
China_Yann Posted March 27, 2016 Author Share Posted March 27, 2016 Theese 2 scripts are both on server side? yeah,show you meta.xml "welson" version="1.0" type="script" description="Login Panel"/> Link to comment
Fist Posted March 27, 2016 Share Posted March 27, 2016 but they are in seprate files theese 2 server side scripts? If so you havent included them in meta.xml file. Or just give full code. Link to comment
Moderators Citizen Posted March 27, 2016 Moderators Share Posted March 27, 2016 "triggered serverside event onRquestLogin ,but event is not added serverside" If this is the exact error you get, then you forgot an 'e' when you call triggerServerEvent in client/main.lua. It's onRequestLogin, not onRquestLogin. Link to comment
China_Yann Posted April 7, 2016 Author Share Posted April 7, 2016 "triggered serverside event onRquestLogin ,but event is not added serverside" If this is the exact error you get, then you forgot an 'e' when you call triggerServerEvent in client/main.lua. It's onRequestLogin, not onRquestLogin. Thank you ,i've already finnished,add " >" to admin group in acl! Thank you so much Link to comment
China_Yann Posted April 7, 2016 Author Share Posted April 7, 2016 "triggered serverside event onRquestLogin ,but event is not added serverside" If this is the exact error you get, then you forgot an 'e' when you call triggerServerEvent in client/main.lua. It's onRequestLogin, not onRquestLogin. Thank you ,i've already finnished,add " >" to admin group in acl! Thank you so much Link to comment
China_Yann Posted April 7, 2016 Author Share Posted April 7, 2016 but they are in seprate files theese 2 server side scripts? If so you havent included them in meta.xml file. Or just give full code. Thank you ,i've already finnished,add " " to admin group in acl! Thank you so much Link to comment
China_Yann Posted April 7, 2016 Author Share Posted April 7, 2016 but they are in seprate files theese 2 server side scripts? If so you havent included them in meta.xml file. Or just give full code. Thank you ,i've already finnished,add " " to admin group in acl! Thank you so much Link to comment
China_Yann Posted April 7, 2016 Author Share Posted April 7, 2016 add " " to admin group in acl! Thank you so much Link to comment
China_Yann Posted April 7, 2016 Author Share Posted April 7, 2016 add " " to admin group in acl! Thank you so much 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