SA-MP Forums Archive
[FilterScript] Temporary Bans System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Temporary Bans System (/showthread.php?tid=548989)



Temporary Bans System - Raweresh - 03.12.2014

Description

It's temporary bans system using mysql database.
There is few commands:
And some console commands:
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

solidfiles.com
pastebin.com



Re: Temporary Bans System - AroseKhanNiazi - 05.12.2014

looks cool but what is serial here ?


Re: Temporary Bans System - Raweresh - 05.12.2014

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


Re: Temporary Bans System - iKyle - 19.12.2014

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


Re : Temporary Bans System - simo0000 - 30.06.2015

any download link? i need it plz


Re: Re : Temporary Bans System - abou3meir - 01.07.2015

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