AMARANT Posted February 10, 2015 Share Posted February 10, 2015 Guys I need to disable logging in via /login [] console command. It must be done ONLY via login panel. How can I do that? Thanks. Link to comment
Enargy, Posted February 10, 2015 Share Posted February 10, 2015 try this in serverside: addEventHandler("onPlayerCommand", root, function(cmd) if (cmd == "login") then cancelEvent() end end) Link to comment
AMARANT Posted February 10, 2015 Author Share Posted February 10, 2015 It works. Thanks. Link to comment
Cadu12 Posted February 10, 2015 Share Posted February 10, 2015 It works, but you aren't able open admin panel. You have to edit, to allow players who are admin don't do cancelEvent () Link to comment
Tomas Posted February 10, 2015 Share Posted February 10, 2015 It works, but you aren't able open admin panel. You have to edit, to allow players who are admin don't do cancelEvent () wut? The command of the admin panel is 'admin' not 'login' lol Link to comment
Cadu12 Posted February 10, 2015 Share Posted February 10, 2015 I know that. Admin panel needs login command to work because they using MTA's account system. Link to comment
MIKI785 Posted February 10, 2015 Share Posted February 10, 2015 I know that. Admin panel needs login command to work because they using MTA's account system. So? He just uses logIn instead of command which is the same thing. Link to comment
SkatCh Posted February 10, 2015 Share Posted February 10, 2015 just add the resource name to your admin ACLgroup "resource."ResourceName"> Link to comment
AMARANT Posted February 10, 2015 Author Share Posted February 10, 2015 just add the resource name to your admin ACLgroup "resource."ResourceName"> What for? I just need to know if cancelling that command is enough for my purpose (solution in the post #2). Because now I have doubts after what I've read here. Link to comment
xeon17 Posted February 10, 2015 Share Posted February 10, 2015 just add the resource name to your admin ACLgroup "resource."ResourceName"> The resource doesn't need any acl rights.. Link to comment
SkatCh Posted February 10, 2015 Share Posted February 10, 2015 Simply you can use something like this : -- Add you serial here because u ara a staff member so only you can use /login access = { [" your serial "] = true, } -- And you can add commands here like /login /register etc MTA commands. commands = { ["login"] = true, } -- and then you need to add this to prevent players from using those commands function youCant(command) if (commands[command]) then local serial = getPlayerSerial(source) if (not access[serial]) then cancelEvent() outputChatBox(command.." is a blocked command ", source, 255, 0, 0) return end end end addEventHandler("onPlayerCommand", root,youCant) 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