Jump to content

Player accounts and permissions in database


Programie

Recommended Posts

Hi,

I'm currently moving from SA-MP to MTA. So I'm new to MTA. :D

In SA-MP I had a MySQL database for the player accounts, permissions, bought vehicles, etc...

And I want to do the same in MTA. I already have a table for the player accounts and a working Login/Register system.

Now the next step: The permissions. I want to give permissions like "Admin" (General stuff like restarting the server), "Moderator" (kick, ban, ...) or "Teleport" (Teleport to other players, ...) to some players. I know I can do that using the acl.xml

But I want to store it in the database.

My first thinking was adding a check in each command a player can execute which checks the permissions. Is that the right way or is there a better solution?

The next thinking was: I also have to check the permissions if a player is able to use a client side script to do some things like teleporting using a map. If the player selects the target on the map, the permission should be checked on the server again (Because every event called by the client script is bad :lol: ).

I hope someone knows what I mean. :wink:

Link to comment
hasObjectPermissionTo 
or 
isObjectInACLGroup 

That is the normal ACL which uses the acl.xml. But I want to use the MySQL database.

Then what you're asking makes no sense because you must make your own MySQL-based system which means you must make your own functions to do what you want.

Link to comment

OK, I'm now writing a (complex) MySQL based permission system. :)

It's possible to have groups which contain groups. And this group contain another group or a user/player. And I can assign permissions to players and groups. :lol:

Edited by Guest
Link to comment
In MTA:SA you can do ALMOST everything that you can imagine.

That is one thing why I switched to MTA:SA. I just saw the list of functions... :shock:

You can make much more functions if you want: Using modules ( developing them or using the few already made ) or editing server's source code ( qaisjp told me normal clients can join modded servers ).

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