Jump to content

i cannot send password from client to server


Recommended Posts

So, today i tried to take a step forward with my server and make an interface for it, to be more exact a login interface, but i encountered a problem. When i send data from interface ".js" file to client, it gets the data perfectly, but every time when i try to send it to the server i get:

mp.events.add("LoginClientSide", (pass) => {
    mp.events.callRemote("Login", mp.players.local.name.toLowerCase(), pass)

// return { __pandingRpc: {} }

I tried to google the issue, but i found no result, if some one can help me i'll appreciate it!

main.js from interface

	$("#loginButton").click(() => {
		mp.trigger("LoginClientSide", document.getElementById("loginPasswordText").value);


mp.events.add("Login", async(pass, name) => {

The problem was this line:

mp.events.add("Login", async(pass, name) => {

And all i needed to do is:

mp.events.add("Login", async(player, name, pass) => { // player is a required arg



Edited by TedyRO
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...