Jump to content

Block login


K4stic

Recommended Posts

Writing the commands in the chat with '/' is the same as 'F8', so I guess there is no method to make them work separately.

There is actually, if you catch the onPlayerChat. You might be able to see if it was the console or player ( with some easy checks ).

Link to comment
Writing the commands in the chat with '/' is the same as 'F8', so I guess there is no method to make them work separately.

There is actually, if you catch the onPlayerChat. You might be able to see if it was the console or player ( with some easy checks ).

onPlayerChat gets triggered when player uses commands 'say', 'teamsay' or 'me'. You don't know if they were triggered via chat or console, in a way everything goes through console. Chatbox just sends it to console. There would be a complicated way of detecting it using isChatBoxInputActive and stuff.. :roll:

Link to comment

Another way to prevent players from logging in using the console is to edit acl.xml and add this below the "Default" attribute:

<right name="command.login" access="false"></right> 

just like this for example:

<acl name="Default"> 
    <right name="command.login" access="false"></right> 
</acl> 

Also with this way you won't need a script to prevent players from logging in using console.

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