[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
#2

i will not use it however its perfect job !!!
Reply
#3

Good job, rep+, keep it up.
Reply
#4

Quote:

- If a nickname banned enter in the server, your IP is automatically banned
- If a IP banned enter in the server, your nickname is automatically banned

MY IP? MY Nickname? Why?
Reply
#5

Thanks to all

Quote:
Originally Posted by SuperMarioRol
Посмотреть сообщение
MY IP? MY Nickname? Why?
Sorry for my bad english.

This is right?

"...this IP is automatically banned " ?
Reply
#6

You shoud change the file system it's kinda slow and i suggest to add SQL functions but good job anyway.
Reply
#7

Thanks ; )
Reply
#8

Thanks for sharing this awesome VBan System. It's perfect,I'll use it.
Reply
#9

Quote:
Originally Posted by Neonman
Посмотреть сообщение
Thanks for sharing this awesome VBan System. It's perfect,I'll use it.
Thanks.

I released a version with DOF2
Reply
#10

Wow men! That's great! And now I working to traslate it..
Reply
#11

Very good : }
Reply
#12

How Do You Make UnBan Command
Reply
#13

Good Job !
Reply
#14

Quote:
Originally Posted by zbt
Посмотреть сообщение
Very good : }
Thanks Willy

Quote:
Originally Posted by awsomedude
Посмотреть сообщение
How Do You Make UnBan Command
With zcmd and sscanf
pawn Код:
CMD:unban(playerid, params[])
{
    if(sscanf(params, "s[24]",params))
        return SendClientMessage(playerid, -1, "/unban [Nick / IP]");

    VUnBan(playerid,params);
    return true;
}
Quote:
Originally Posted by Awankz
Посмотреть сообщение
Good Job !
Thanks
Reply
#15

Not bad useful

8/10
Reply
#16

Excellent job, really. Using it with no problems whatsoever.
Reply
#17

awesome !
Reply
#18

Change it to y_ini
Reply
#19

Quote:
Originally Posted by RollTi
Посмотреть сообщение
Not bad useful

8/10
Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
Excellent job, really. Using it with no problems whatsoever.
Quote:
Originally Posted by Dude_Lebowski
Посмотреть сообщение
awesome !
Very thanks ; )

Quote:
Originally Posted by DonWade
Посмотреть сообщение
Change it to y_ini
I will make this in the next update
Reply
#20

Nice work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)