SA-MP Forums Archive
[Include] TBAN - Simple but useful I guess ;) - 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)
+--- Thread: [Include] TBAN - Simple but useful I guess ;) (/showthread.php?tid=380936)



TBAN - Simple but useful I guess ;) - tonisantolia - 27.09.2012

First, I apologize to all of this forum will include a code is not useful and is an include ..
But it works perfectly. Now let's get to what matters


• Function
This has two functions include:
→ BanIP (id)
→ Bannick (id)

As the name of the functions implies, it serves to banish both IP as Nick.
• How to use
Using it is very simple and easy.
1Є- Create a folder on your scriptfiles called TBAN and two sub-folders IP and Nick.
2Є- See an example script of how to use:
pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf>
#include <TBan>

main(){}

public OnPlayerConnect(playerid){
    CheckBan(playerid);
    return 1;
}

CMD:banip(playerid,params[])
{
    new id;
    if(sscanf(params,"u",id)) return SendClientMessage(playerid, -1, "Use: /banip (id)");
    BanIP(id);
    return 1;
}

CMD:bannick(playerid,params[])
{
    new id;
    if(sscanf(params,"u",id)) return SendClientMessage(playerid, -1, "Use: /bannick (id)");
    BanNick(id);
    return 1;
}
• Bugs
If a feature does not work please contact me via PM to I fix immediately.
•Download
4Shared - http://www.4shared.com/file/SC0ADk6j/TBan.html?
Forum SA-MP:
Код:
#include <a_samp>
#include <dof2>

stock CheckBan(playerid){
	new file[70],file2[70],snd[MAX_PLAYER_NAME],up[70];
	GetPlayerIp(playerid,up,sizeof(up));
	GetPlayerName(playerid,snd,sizeof(snd));
	format(file,sizeof(file),"TBanidos/IP/%s.cfg",up);
	format(file2,sizeof(file2),"TBanidos/Nick/%s.cfg",snd);
	if(DOF2_FileExists(file) || DOF2_FileExists(file2)){ Kick(playerid); }
	return 1;
}

stock BanIP(id){
	new up[70],file[70];
	GetPlayerIp(id,up,sizeof(up));
	format(file,sizeof(file),"TBanidos/IP/%s.cfg",up);
	DOF2_CreateFile(file);
	return 1;
}

stock BanNick(id){
	new snd[MAX_PLAYER_NAME],file[70];
	GetPlayerName(id,snd,sizeof(snd));
	format(file,sizeof(file),"TBanidos/Nick/%s.cfg",snd);
	DOF2_CreateFile(file);
	return 1;
}
• Note
Please do not swear, do trollar or a chat topic since my intention was the best, I again apologize if it's a useful code.
Sorry if my English is bad but I am Brazilian hope of understanding



Re: TBAN - Simple but useful I guess ;) - KingHual - 27.09.2012

Should've posted in the "Includes" forum. Also should've mentioned that you need Double O'Files.


Re: TBAN - Simple but useful I guess ;) - HyDrAtIc - 27.09.2012

Cmon,not again!


People keep doing like this,creating a very noob and simple script with bad grammar to get reputation anybody could do this,why doesn't people understand?

Even you have posted in the wrong section....


Re: TBAN - Simple but useful I guess ;) - Jason` - 27.09.2012

DOF2 is not needed in this include, use file functions.


Re: TBAN - Simple but useful I guess ;) - ViniBorn - 01.10.2012

Quote:
Originally Posted by James_Nick
Посмотреть сообщение
Cmon,not again!


People keep doing like this,creating a very noob and simple script with bad grammar to get reputation anybody could do this,why doesn't people understand?

Even you have posted in the wrong section....
____


Re: TBAN - Simple but useful I guess ;) - ViruZz - 01.10.2012

Give him a chance people,

atleast he didn't copy and pasted some code and then release.

1+


Re: TBAN - Simple but useful I guess ;) - tonisantolia - 02.10.2012

Quote:
Originally Posted by James_Nick
Посмотреть сообщение
Cmon,not again!


People keep doing like this,creating a very noob and simple script with bad grammar to get reputation anybody could do this,why doesn't people understand?

Even you have posted in the wrong section....
That was my first post in the English area then please go to all this fighting? I just wanted to help .. I do not need reputation.


Re: TBAN - Simple but useful I guess ;) - KingHual - 02.10.2012

Quote:
Originally Posted by ViruZz
Посмотреть сообщение
Give him a chance people,

atleast he didn't copy and pasted some code and then release.

1+
Wow, your expectations are low. Imagine what the world would be if everyone had expectations as low as yours.


Re: TBAN - Simple but useful I guess ;) - JaKe Elite - 02.10.2012



You could just use the file functions.
use io_write, io_read done
No need using saving systems.
Wasting saving system.
Conserve some energy the stock includes.


Re: TBAN - Simple but useful I guess ;) - tonisantolia - 06.10.2012

Nгo dou a minima para comentarios que querem somente me derrubar. Este й meu primeiro topico na area inglesa e nгo й uma pessoa que vai mudar meus posts.. Nгo tem nada de interessante para falar? NГO FALE. Simples nгo?