[Include] TBAN - Simple but useful I guess ;)
#1

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

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

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

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

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....
____
Reply
#6

Give him a chance people,

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

1+
Reply
#7

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

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



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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)