Jump to content

Logging in


AMARANT

Recommended Posts

Posted

try this in serverside:

addEventHandler("onPlayerCommand", root, 
function(cmd) 
    if (cmd == "login") then 
    cancelEvent() 
    end 
end) 

Inactivo.

Posted

It works, but you aren't able open admin panel. You have to edit, to allow players who are admin don't do cancelEvent ()

Ingame nick: Cadu12

Posted
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

Currently developing for International Gaming Community - Join us!

Posted

just add the resource name to your admin ACLgroup

 "resource."ResourceName"> 
 

Failure is simply an opportunity to begin again more intelligently - Henry Ford

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

Posted
just add the resource name to your admin ACLgroup
 "resource."ResourceName"> 
  
 

The resource doesn't need any acl rights..

A unique GangWar gamemode waiting for you!
Click here for more information.

560x95_FFFFFF_FF9900_000000_000000.png

Posted

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) 

Failure is simply an opportunity to begin again more intelligently - Henry Ford

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