Jump to content

Database ( Commands )


Recommended Posts

Hi. I don't understand exactly what do you want to do.

A "role system" where you can set allowed admin commands for each role?

Edited by Patrick
Link to post

Hi Yes
I want a management system that can give each command separately to each player and store it in the database

/givepermission [PlayerName] [Command To Give]

Save To Mysql

Link to post

There are plenty of options.
But if you want to allow commands to specific player, you have to save SERIAL - COMMANDNAME pairs to database.
And load them to a table on resource start.
Then make your own functions to allow, disallow commands, and a function to check is player can use the command or not.

I don't do it instead of you, try it for yourself and if you have any further questions feel free to ask.

Functions and events what you need:
- getPlayerSerial
- dbConnect, dbQuery, dbExec
- maybe setElementData, getElementData
- onResourceStart, onPlayerCommand
- addCommandHandler

Edited by Patrick
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...