_Marco_ Posted January 4, 2021 Posted January 4, 2021 (edited) Hello, how can I save all the commands in the database and grant access to each one? Edited January 4, 2021 by _Marco_
Moderators Patrick Posted January 7, 2021 Moderators Posted January 7, 2021 (edited) 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 January 7, 2021 by Patrick
_Marco_ Posted January 7, 2021 Author Posted January 7, 2021 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
Moderators Patrick Posted January 7, 2021 Moderators Posted January 7, 2021 (edited) 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 January 7, 2021 by Patrick
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now