[FilterScript] Temporary Bans System
#1

Description

It's temporary bans system using mysql database.
There is few commands:
  • /B <Player's id / Part of player's name> <Ban type (1 - 3)> <Time in days> <Reason>.
  • /Bname <Player's name> <Time in days> <Reason>.
  • /Bip <Player's ip> <Time in days> <Reason>.
  • /Bserial <Player's serial> <Time in days> <Reason>.
  • /Ub <Unban type (1 - 3)> <Name, ip or serial>.
And some console commands:
  • B <Player's id / Part of player's name> <Ban type (1 - 3)> <Time in days> <Reason>.
  • Bname <Player's name> <Time in days> <Reason>.
  • Bip <Player's ip> <Time in days> <Reason>.
  • Bserial <Player's serial> <Time in days> <Reason>.
  • Ub <Unban type (1 - 3)> <Name, ip or serial>.
Ban types:
  1. Only ip.
  2. Ip and serial.
  3. Name, ip and serial.
Unban types:
  1. Name.
  2. Ip.
  3. Serial.
Requirements

mysql R39-2 or newer by BlueG, click here for thread or use that one from package.
sscanf 2.8.1 or newer by ******, click here for thread or use that one from package.
zcmd 0.3.1 or newer by Zeex, click here for thread or use that one from package.
Installation

Put TBS.amx in filterscripts folder.
Put a_mysql.inc in pawno\include folder.
Put libmysql.inc in main folder.
Put mysql.dll in plugins folder.
Put sscanf.dll in plugins folder.
Put sscanf2.inc in pawno\include folder.
Put zcmd.inc in pawno\include folder.
Temporary Bans System

Here is create table query.
Код:
CREATE TABLE TBS (BannedName INT(24) NOT NULL,BannedIp CHAR(16) NOT NULL,BannedSerial CHAR(128) NOT NULL,BannerName CHAR(24) NOT NULL,Time INT(10) NOT NULL,Reason CHAR(128) NOT NULL,DateImposition CHAR(64) NOT NULL) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci;
Of course you can or even need to change something in that query but i can't help you with that because i don't know what kind of phpMyAdmin and MySQL version you use.
Natives

Код:
native gpci(playerid,serial[],maxlen);
Definitions

Код:
#define TBS_MAXIMAL_BANNED_NAME 24
#define TBS_MAXIMAL_BANNED_IP 16
#define TBS_MAXIMAL_BANNED_SERIAL 128
#define TBS_MAXIMAL_BANNER_NAME 24
#define TBS_MAXIMAL_REASON 128
#define TBS_MAXIMAL_DATE_IMPOSITION 64
#define TBS_MYSQL_HOST "127.0.0.1"
#define TBS_MYSQL_USER "TBS"
#define TBS_MYSQL_DATABASE "TBS"
#define TBS_MYSQL_PASSWORD "TBS"
#define TBS_COLOR_GREEN 0x00FF00FF
#define TBS_COLOR_RED 0xFF0000FF
Change TBS_MYSQL_HOST, TBS_MYSQL_USER, TBS_MYSQL_DATABASE, TBS_MYSQL_PASSWORD to yours mysql connect informations.
Screenshots

[Image: 1.jpg]
[Image: 2.jpg]
Download

Reply
#2

looks cool but what is serial here ?
Reply
#3

It's not unique but useful sometimes, taken from function gpci.
Reply
#4

It would be nice to have it Non-MySQL, so you can only ban online players.
Reply
#5

any download link? i need it plz
Reply
#6

Quote:
Originally Posted by simo0000
Посмотреть сообщение
any download link? i need it plz
http://www.solidfiles.com/d/e897a7770b/TBS.rar
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)