18.07.2011, 00:01
(
Последний раз редактировалось JaTochNietDan; 10.10.2016 в 22:02.
)
Introduction
jBanLite is a simple include that will allow server owners to easily have a player banning system using an SQLite database as the storage center for the ban information. It should be compatible with just about every script out there, I've taken steps to ensure that there are no conflicts with other scripts and that it should be as easy to use as possible for newbies.
* Yes this is the same thing except for SQLite, although I decided to create another topic as it may confuse some users as to what they need to download, so I'd like to keep it separate.
Additionally, this ban system does not ban people's nicknames, it will only ban people's IP addresses
What's in the package?
Make sure that the jBanLite include has been put into your "pawno/includes" directory, then simply add the following to the script you wish to use jBanLite in:
Next you need to open up your jBanLite.inc file and edit the settings in there accordingly, you will need to at least enter in the details of your MySQL server and database.
Then you simply add the ban/unban functions where you need them and let the include do the work, if you're confused about it at this stage, please look at the Filterscript provided in the download package as an example.
Functions
Download
https://github.com/JaTochNietDan/jBa...leases/tag/1.0
Credits
****** - sscanf and hooking methods
jBanLite is a simple include that will allow server owners to easily have a player banning system using an SQLite database as the storage center for the ban information. It should be compatible with just about every script out there, I've taken steps to ensure that there are no conflicts with other scripts and that it should be as easy to use as possible for newbies.
* Yes this is the same thing except for SQLite, although I decided to create another topic as it may confuse some users as to what they need to download, so I'd like to keep it separate.
Additionally, this ban system does not ban people's nicknames, it will only ban people's IP addresses
What's in the package?
- The jBanLite include
- An example Filterscript
- An example website
Make sure that the jBanLite include has been put into your "pawno/includes" directory, then simply add the following to the script you wish to use jBanLite in:
pawn Код:
#include <jBanLite>
Then you simply add the ban/unban functions where you need them and let the include do the work, if you're confused about it at this stage, please look at the Filterscript provided in the download package as an example.
Functions
pawn Код:
native jBan(player_banned, player_banner, reason[], time = 0);
// This function will create a new ban for player_banned by player_banner with a reason[] and a time. The time parameter can be used to set the ban length in minutes, it defaults to 0 (permanent).
native jBanIP(ip[], player_banner, reason[], time = 0);
// This function will create a new ban with the IP you specify. Everything else is the same as jBan.
native jUnbanName(name[], bool:expired = false);
//This function will remove a ban from the list with the name you specify. The expired parameter will specify whether or not you want to remove bans that have expired, it defaults to false, which will not remove expired bans.
native jUnbanIP(IP[], bool:expired = false);
// This function will remove a ban from the list with the IP you specify. The expired parameter will specify whether or not you want to remove bans that have expired, it defaults to false, which will not remove expired bans.
https://github.com/JaTochNietDan/jBa...leases/tag/1.0
Credits
****** - sscanf and hooking methods