Jump to content
  • 0

Permissions


Benevolence

Question

Posted

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.

Recommended Posts

  • 0
Posted

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

  • 0
Posted

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

  • 0
Posted

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) 

  • 0
Posted
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) 

  • 0
Posted
@Tank07 use the /debugscript 3 and post us what it says while you use your /register or start the script next time.

Nobody has permissions for debugscript 3 (not even me). I got it set that way cause regular players were abusing it.

  • 0
Posted

It should, if you added the right to default and set it to false.

And add the right to admin and set it true.

  • 0
Posted
What happens exactly?

If nothing happens then the account already exists.

No I tried a couple times. Also, when i type only /register it doesn't even say a SYNTAX msg.

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