[Include] VBan - Bans system
#1

VBan - Bans system
__________________

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>
Then simply use the functions according to your need.

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.
Reply


Messages In This Thread
VBan - Bans system - by ViniBorn - 02.11.2011, 13:09
Re: VBan - Bans system - by vassilis - 02.11.2011, 13:16
Re: VBan - Bans system - by GangsTa_ - 02.11.2011, 13:35
Re: VBan - Bans system - by SuperMarioRol - 02.11.2011, 13:41
Re: VBan - Bans system - by ViniBorn - 02.11.2011, 13:46
Re: VBan - Bans system - by TheArcher - 02.11.2011, 13:49
Re: VBan - Bans system - by ViniBorn - 05.12.2011, 16:39
Re: VBan - Bans system - by Astralis - 20.12.2011, 18:24
Re: VBan - Bans system - by ViniBorn - 22.12.2011, 17:07
Respuesta: VBan - Bans system - by TiNcH010 - 11.04.2012, 01:24
Re: VBan - Bans system - by zbt - 11.04.2012, 02:00
Re: VBan - Bans system - by awsomedude - 22.04.2012, 22:50
Re: VBan - Bans system - by Awankz - 23.04.2012, 06:59
Re: VBan - Bans system - by ViniBorn - 24.04.2012, 04:06
Re: VBan - Bans system - by RollTi - 24.04.2012, 04:10
Re: VBan - Bans system - by ReneG - 06.05.2012, 05:00
Re: VBan - Bans system - by Dude_Lebowski - 06.05.2012, 12:51
Re: VBan - Bans system - by DonWade - 06.05.2012, 14:46
Re: VBan - Bans system - by ViniBorn - 11.05.2012, 15:41
Re: VBan - Bans system - by Lordzy - 07.07.2012, 15:58
Re: VBan - Bans system - by cJMaster_ - 07.07.2012, 16:54

Forum Jump:


Users browsing this thread: 2 Guest(s)