Aristates Posted November 10, 2015 Share Posted November 10, 2015 function Click(AristatesTik, state2, x2, y2) if AristatesTik == "left" and state2 == "down" then if x2 >= screenW * 0.3812 and y2 >= screenH * 0.5417 and x2 <= screenW * 0.3812+screenW * 0.5125 and y2 <= screenH * 0.5417+screenH * 0.5983 then text = guiGetText(edtBx) textpass = guiGetText(edtBx2) if string.format(#text) ~= "" and string.format(#textpass) then triggerServerEvent("test", getLocalPlayer(), text, textpass) end end end end addEventHandler("onClientClick", root, Click) addEvent("test", true) addEventHandler("test", root, function(text, textpass, player) local account = getAccount(text, textpass) if account then if logIn(player, text, textpass) then outputChatBox("You are now Logged In", player) else outputChatBox("unkown Name.") end else outputChatBox("pasword as Wrong") end end ) Link to comment
SpecT Posted November 10, 2015 Share Posted November 10, 2015 You forgot to mention the player element in the client-side where you trigger the server side. Link to comment
GTX Posted November 10, 2015 Share Posted November 10, 2015 You don't need to pass parameter or source. Use client addEvent("test", true) addEventHandler("test", root, function(text, textpass) local account = getAccount(text, textpass) if account then if logIn(client, text, textpass) then outputChatBox("You are now Logged In", client) else outputChatBox("unkown Name.", client) end else outputChatBox("pasword as Wrong", client) end end ) 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