14.10.2018, 16:41
(
Last edited by M8; 22/10/2018 at 06:37 PM.
)
TAdmin
A MySQL administration system because we don’t have enough of those!
This is my first ever release so go easy on me D: Hopefully the system is gonna be useful to some people because I spent a lot of time working on it and I’m super proud of the final product.
If you have suggestions, improvements, found bugs or just need some help, please make an issue, PM me on forum or post in the SA:MP forum topic.
The system current features:
1. Clone this repository locally and download the required plugins/includes.
2. Put the tadmin_tools.inc file in the pawno/include folder.
3. Open the pwn file and edit the following lines with your details:
4. Inside the Scriptfiles folder, create another folder titled Logs.
5. Open PHPMyAdmin localhost/phpmyadmin and create a new database corresponding to the value MYSQL_DATABASE in tadmin.pwn file.
6. Once you have created the database, import the main.sql file and you should have 4 tables titled accounts, adminlogs, reports and bans.
7. Finally, compile the filterscript, include it in server.cfg file filterscripts tadmin and run the server.
FAQ
Credits
A MySQL administration system because we don’t have enough of those!
This is my first ever release so go easy on me D: Hopefully the system is gonna be useful to some people because I spent a lot of time working on it and I’m super proud of the final product.
If you have suggestions, improvements, found bugs or just need some help, please make an issue, PM me on forum or post in the SA:MP forum topic.
The system current features:
- A basic login and registration system.
- +25 admin commands.
- Advanced player and world management commands. (/set, /give, /all)
- Simple ban system that stores the bans in a MySQL table.
- Admin logging saved in MySQL table.
- Easy configuration.
- Basic spectating system.
- RCON login attempts logging, query errors logging and more.
- Advanced report system.
- Discord intergration.
- MySQL R41-4
- ZCMD
- SSCANF2
- easyDialog
- Whirlpool
- Chrono
- PlayerZone
- Player_GeoLocation
- Discord Connector
1. Clone this repository locally and download the required plugins/includes.
2. Put the tadmin_tools.inc file in the pawno/include folder.
3. Open the pwn file and edit the following lines with your details:
pawn Code:
#define SYSTEMNAME “TAdmin” // Feel free to change it to “Admin System”, “Admin” etc etc.
#define ADMIN_MAX_LEVELS 4
#define COLOR_ADMINMSG 0xCC0000FF // Color used in the ‘Admin Message:’ messages.
#define ADMIN_LEVEL_1_COLOR 0xFF9900AA
#define ADMIN_LEVEL_2_COLOR 0x33AA33AA
#define ADMIN_LEVEL_3_COLOR 0x006699AA
#define ADMIN_LEVEL_4_COLOR 0xFF0000FF
#define ADMIN_LEVEL_1_NAME “Trial Admin”
#define ADMIN_LEVEL_2_NAME “Admin”
#define ADMIN_LEVEL_3_NAME “Lead Admin”
#define ADMIN_LEVEL_4_NAME “Management”
new bool:TAdmin_Debug = false;
new bool:SendQueryErrorsToAdmins = true;
new bool:AdminMapTeleport = true;
new bool:RCONFailedNotification = true;
new bool:UseDiscord = true;
/* TAdmin_Debug: Setting this to true will show debug messages in the server log, useful for debugging issues with TAdmin.
SendQueryErrorsToAdmins: Setting this to true will send Query errors to in-game admins. Query errors are always shown in the console regardless of this setting.
AdminMapTeleport: Setting this to true will allow admins to teleport by clicking on the map.
RCONFailedNotification: Setting this to true will send failed rcon login messages to all online admins. Failed login attempts are saved to Logs/FailedRCONLogins.txt regardless of this setting.
UseDiscord: Setting this to true will enable all Discord related features. Discord settings can be found below. */
#define MAX_MUTE_TIME 120 // The max amount of time an admin can mute a player (in minutes)
#define MAX_JAIL_TIME 60 //The max amount of time an admin can jail a player (in minutes)
#define MYSQL_HOSTNAME “localhost”
#define MYSQL_USERNAME “root”
#define MYSQL_PASSWORD “”
#define MYSQL_DATABASE “main”
// – Discord Settings
#define ChannelAdminLogs “”
#define ChannelAdminChat “”
// Both AdminLogs and AdminChat require a Discord channel ID. Info here: [URL="http://toni.pw/l/discorddevmode"]http://toni.pw/l/discorddevmode[/URL]
5. Open PHPMyAdmin localhost/phpmyadmin and create a new database corresponding to the value MYSQL_DATABASE in tadmin.pwn file.
6. Once you have created the database, import the main.sql file and you should have 4 tables titled accounts, adminlogs, reports and bans.
7. Finally, compile the filterscript, include it in server.cfg file filterscripts tadmin and run the server.
FAQ
Quote:
Q: How do I check if the player is an admin? A: if(PlayerInfo[playerid][pAdmin] < 1) return 0; This is gonna check if the player's admin level is less than 1 and if it is, it returns 0, else it executes the command. |
Quote:
Q: How do I add another admin level? A: This is a bit more complicated so bear with me: 1. Firstly, increase the ADMIN_MAX_LEVELS value to whatever you want (I'll use 5 in this case). 2. Add the level's name and color: #define ADMIN_LEVEL_5_COLOR 0xFF00FFFF` `#define ADMIN_LEVEL_5_NAME "Owner" 3. Edit GetAdminRank: pawn Code:
pawn Code:
pawn Code:
|
Quote:
Q: I don’t care about the Discord stuff, can I remove them? A: You can however you will have to spend some time removing them. I might release a seperate version without the Discord stuffs but for now, simply remove anything that says Discord. |