Jump to content
  • 0

Permissions


Benevolence

Question

Alright so I have a Roleplay server and you don't register by /register like you do in default server that comes when you install MTA. I wanted to know, how I can create an account like the default server lets you so that you can make it admin and add resources to acl only if your logged in with that account. I use mySQL.

Because I try adding some resources and when I try to use them it tells me "You don't have permission to use ... " and I can't seem to get around this, I tried some stuff in acl.xml file (probly not correct) but it keeps telling me that.

Link to comment

Recommended Posts

  • 0

Help with what, /register command is not hard coded, you must make one yourself.

addCommandHandler("register", 
function(player, cmd, name, password) 
local account = addAccount(name, password) 
if account then 
outputChatBox("Thank you " .. getPlayerName(source) .. ", you're now registed, you can login with /login",player) 
end 
end) 

To add your account as admin, You must close the server.

close the server >> open acl.xml >> find "Admin" group >> add

to Add a resource:

close the server >> open acl.xml >> find "Admin" group >> add

Link to comment
  • 0

"Take it from there?" Well its written in C++ and as JR10 said, its hard coded which means it will always be available for use in MTA as long as it is not disabled in the ACL.

Just start admin resource so you can use /register

Then login to the account and assuming you correctly added the account to Admin in your ACL you will have access to do things.

Link to comment
  • 0

Meta.xml

    'Tank07' version='1.0' name='Register' description='Registration' type='gamemode' /> 
  
    

Register Script:

  
addCommandHandler("register", 
function(player, cmd, name, password) 
local account = addAccount(name, password) 
if account then 
outputChatBox("Thank you " .. getPlayerName(source) .. ", you're now registed, you can login with /login",player) 
end 
end) 

Link to comment
  • 0
addCommandHandler("register", 
function(player, cmd, name, password) 
local account = addAccount(name, password) 
if account then 
outputChatBox("Thank you " .. getPlayerName(player) .. ", you're now registed, you can login with /login",player) 
end 
end) 

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