02.11.2011, 13:09
(
Последний раз редактировалось ViniBorn; 11.04.2012 в 03:32.
)
VBan - Bans system
__________________
By: ViniBorn
__________________
By: ViniBorn
Description :
With this include you can :
- Ban players by Nick
- Ban players by ID
- Ban players by IP
- Checks information from IPs or banned accounts
Advantages :
- Easy to use and be implemented by scripters
- Easy management of bans by administrators
- If a nickname banned enter in the server, its IP is automatically banned
- If a IP banned enter in the server, its nickname is automatically banned
- When an nickname is unbanned , the last IP detected is unbanned too
- When an IP is unbanned , the last nickname detected is unbanned too
To use, copy content posted on pastebin in a notebook called VBan.inc or download
the file and rename it to 4shared VBan.inc
Then, put this file in the folder pawno/include
And finally put this in the top of GM
pawn Код:
#include <VBan>
Below the list with an explanation of their parameters:
pawn Код:
VBanID(playerid,giveid,reason[]); // Ban by ID
//playerid = Administrator who banned
//giveid = Player that was banned
//reason = Reason of ban
______________________________________________
VBanNick(playerid,nick[],reason[]); // Ban by nick
//playerid = Administrator who banned
//nick= Nickname that was banned
//reason = Reason of ban
______________________________________________
VBanIP(playerid,IP2[],reason[]); // Ban by IP
//playerid = Administrator who banned
//IP2= IP that was banned
//reason = Reason of ban
______________________________________________
VUnBan(playerid,Arq[]); // Unban
//playerid = Administrator who banned
//Arq = File to be unbanned. Ex: "/bans/Vini_Born.ini"
______________________________________________
VBanCheck(playerid); // Checks if player was banned
______________________________________________
VBanLoadInfo(playerid,Varq[]); // Displays information from the ban
//playerid = Player who will see the information
//Varq = File from which the information will be extracted. Ex: "/bans/Vini_Born.ini"
______________________________________________
//EXAMPLES OF USE
if(strcmp(cmd, "/ban", true) == 0)
{
new tmp[24];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, -1, "USE: Enter the nickname");
new giveid = VBReturnUser(tmp);
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
return SendClientMessage(playerid, -1, "USE: Enter the reason");
VBanID(playerid,giveid,tmp);
return 1;
}
if(strcmp(cmd, "/baninfo", true) == 0)
{
new tmp[24],Vstring[32];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
return SendClientMessage(playerid, -1, "USO: /baninfo[Nickname/IP]");
format(Vstring,32,"/bans/%s.ini",tmp);
VBanLoadInfo(playerid,Vstring);
return 1;
}
ScreenShot :
Download:
DINI
Pastebin - http://pastebin.com/8vvfVA5h
4shared - http://www.4shared.com/file/SdretwNx...niBorninc.html < Rename the file to VBan.inc before using
DOF2
Pastebin - http://pastebin.com/Nu6LYv0Y
Espaсol
Portuguкs
Tips and reports about bugs are welcome.
PS: The file manager used by me was Dini, being more common and easy to use. Feel free to exchange for your favorite package manager.