Jump to content

Disable logging in.


'LinKin

Recommended Posts

Hello,

I want to allow players to login just via the login panel. So that if they click 'play as guest', it doesn't allow them to login later in-game.

I've not done any login-panel yet, but I've seen some scripts from the community and they use a function called logIn(acc, pass).

But, if I do cancelEvent() in onPlayerLogin, that function will not trigger (cause the event is cancelled)

So, how can I remove or change the /login command ?

Thanks.

Link to comment

Oh,

I just noticed that the event you called was onPlayerJoin. Sorry my bad, I thought it was onPlayerLogin.

But now, is it mandatory to add the event onPlayerCommand inside onPlayerLogin event?

Why not simply;

addEventHandler("onPlayerCommand", root,

function(cmd)

if cmd == 'login' etc...

end)

Link to comment

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...