Sign in to follow this  
Benevolence

Permissions

Recommended Posts

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.

Share this post


Link to post

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

Share this post


Link to post

/login is hard coded.

Share this post


Link to post

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

Share this post


Link to post

Considering you "sell the BEST RP scripts" shouldn't you know what to "put in meta.xml"?

Share this post


Link to post

Well I generated one and it is almost exactly the same as I had. This shit still doesn't work. I type /register and nothing shows/happens.

Share this post


Link to post

Post the meta and the script.

Share this post


Link to post

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) 

Share this post


Link to post
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) 

Share this post


Link to post
@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.

Share this post


Link to post

Lol, allow it for admins only.

Share this post


Link to post

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

And add the right to admin and set it true.

Share this post


Link to post

What happens exactly?

If nothing happens then the account already exists.

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.