K4stic Posted July 18, 2014 Share Posted July 18, 2014 Hello MTAsa Community, I want to ask how i can Block people to login by F8 Link to comment
MIKI785 Posted July 18, 2014 Share Posted July 18, 2014 By F8? Console? Command 'login'? If so: addEventHandler("onPlayerCommand", root, function (command) if command == "login" then cancelEvent() end end) Link to comment
Et-win Posted July 18, 2014 Share Posted July 18, 2014 That is also for the chat, MIKI785. Link to comment
K4stic Posted July 18, 2014 Author Share Posted July 18, 2014 @MIKI785, Thanks you PS i wosent know about that event lol Link to comment
MIKI785 Posted July 18, 2014 Share Posted July 18, 2014 That is also for the chat, MIKI785. What? Putting '/' before message in chat simply means that you're writing that in console. There is no difference between chat and console in terms of commands. CastielRecords, youre welcome. Link to comment
Et-win Posted July 18, 2014 Share Posted July 18, 2014 I know, but he said F8 so I would think about F8 only and not chat. Link to comment
Grafu Posted July 19, 2014 Share Posted July 19, 2014 Writing the commands in the chat with '/' is the same as 'F8', so I guess there is no method to make them work separately. Link to comment
tosfera Posted July 19, 2014 Share Posted July 19, 2014 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
MIKI785 Posted July 19, 2014 Share Posted July 19, 2014 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.. Link to comment
Tete omar Posted July 19, 2014 Share Posted July 19, 2014 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
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