Jump to content

cancelEvent acting weird on 'onPlayerConnect'


Xinoz

Recommended Posts

Hi guys,

I am trying to display a message to the players upon joining.

When using the cancelEvent upon the 'onPlayerConnect' event no message is being displayed.

When joining the server it shows no message.. well it does, the default one that is supposed to show for when you don't declare a message.

Am I doing something wrong or is there actually something bugged?

Thanks in advance.

Link to comment
Hi guys,

I am trying to display a message to the players upon joining.

When using the cancelEvent upon the 'onPlayerConnect' event no message is being displayed.

When joining the server it shows no message.. well it does, the default one that is supposed to show for when you don't declare a message.

Am I doing something wrong or is there actually something bugged?

Thanks in advance.

What do you mean? this?

addEventHandler("onPlayerConnect", getRootElement(), 
function () 
cancelEvent(true, "TEXT") 
end) 

Link to comment

I discovered that it doesn't work when resources are starting. It does when there aren't any.

For me it defeats the purpose of using this right now since I wanted to refuse players from joining when resources were starting.

EDIT: Yes, I can still refuse them, but it would be nice to have a message too.

EDIT 2: I came to know that the problem wasn't the resources starting up, but using dbPoll is, using it while joining causes this.

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