Xinoz Posted February 2, 2016 Share Posted February 2, 2016 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
1LoL1 Posted February 2, 2016 Share Posted February 2, 2016 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
Xinoz Posted February 2, 2016 Author Share Posted February 2, 2016 Yes, that doesn't work for me. Displays no message upon connecting. Link to comment
1LoL1 Posted February 2, 2016 Share Posted February 2, 2016 Yes, that doesn't work for me. Displays no message upon connecting. For me work normally. Do you have in server-side? Link to comment
Xinoz Posted February 2, 2016 Author Share Posted February 2, 2016 I do have the code located on the server side. Link to comment
1LoL1 Posted February 2, 2016 Share Posted February 2, 2016 I do have the code located on the server side. Must work normally.. for me really work. Link to comment
Xinoz Posted February 2, 2016 Author Share Posted February 2, 2016 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
Bonus Posted February 2, 2016 Share Posted February 2, 2016 I once had the same problem, never found out why. There was no message, just black. Did you fix it? Link to comment
Sir.BEEF Posted February 2, 2016 Share Posted February 2, 2016 hmmmmm try to use this: addEventHandler("onPlayerConnect", getRootElement(), function () cancelEvent(true, "Welcome to my server") end end Link to comment
Xinoz Posted February 2, 2016 Author Share Posted February 2, 2016 hmmmmm try to use this: addEventHandler("onPlayerConnect", getRootElement(), function () cancelEvent(true, "Welcome to my server") end end This is exactly the same code. Nothing changed here. Link to comment
Hero192 Posted February 2, 2016 Share Posted February 2, 2016 hmmmmm try to use this: addEventHandler("onPlayerConnect", getRootElement(), function () cancelEvent(true, "Welcome to my server") end end lol it's the same as iLol's code just changed the text and made an espace to end Link to comment
Bonus Posted February 2, 2016 Share Posted February 2, 2016 Its not the same ... There is an "end" too much and a ")" is missing at the end. It won't even work But I had the same issue and could never fix it. Still don't know why I had this problem. 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