SA-MP Forums Archive
[Include] VBan - 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)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] VBan - Bans system (/showthread.php?tid=294569)

Pages: 1 2


VBan - Bans system - ViniBorn - 02.11.2011

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.


Re: VBan - Bans system - vassilis - 02.11.2011

i will not use it however its perfect job !!!


Re: VBan - Bans system - GangsTa_ - 02.11.2011

Good job, rep+, keep it up.


Re: VBan - Bans system - SuperMarioRol - 02.11.2011

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?


Re: VBan - Bans system - ViniBorn - 02.11.2011

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 " ?


Re: VBan - Bans system - TheArcher - 02.11.2011

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


Re: VBan - Bans system - ViniBorn - 05.12.2011

Thanks ; )


Re: VBan - Bans system - Astralis - 20.12.2011

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


Re: VBan - Bans system - ViniBorn - 22.12.2011

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


Respuesta: VBan - Bans system - TiNcH010 - 11.04.2012

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



Re: VBan - Bans system - zbt - 11.04.2012

Very good : }


Re: VBan - Bans system - awsomedude - 22.04.2012

How Do You Make UnBan Command


Re: VBan - Bans system - Awankz - 23.04.2012

Good Job !


Re: VBan - Bans system - ViniBorn - 24.04.2012

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


Re: VBan - Bans system - RollTi - 24.04.2012

Not bad useful

8/10


Re: VBan - Bans system - ReneG - 06.05.2012

Excellent job, really. Using it with no problems whatsoever.


Re: VBan - Bans system - Dude_Lebowski - 06.05.2012

awesome !


Re: VBan - Bans system - DonWade - 06.05.2012

Change it to y_ini


Re: VBan - Bans system - ViniBorn - 11.05.2012

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


Re: VBan - Bans system - Lordzy - 07.07.2012

Nice work.