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.

Can other people connect to your server? Use this tool to check:

http://nightly.mtasa.com/ports/

1484762903.png

Formerly known as Tank07.

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

Business System viewtopic.php?f=108&t=35797

Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726

SQLite Tutorial viewtopic.php?f=148&t=38203

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

Can other people connect to your server? Use this tool to check:

http://nightly.mtasa.com/ports/

1484762903.png

Formerly known as Tank07.

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

Business System viewtopic.php?f=108&t=35797

Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726

SQLite Tutorial viewtopic.php?f=148&t=38203

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