[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


Messages In This Thread
TBAN - Simple but useful I guess ;) - by tonisantolia - 27.09.2012, 16:14
Re: TBAN - Simple but useful I guess ;) - by KingHual - 27.09.2012, 16:18
Re: TBAN - Simple but useful I guess ;) - by HyDrAtIc - 27.09.2012, 16:23
Re: TBAN - Simple but useful I guess ;) - by Jason` - 27.09.2012, 17:34
Re: TBAN - Simple but useful I guess ;) - by ViniBorn - 01.10.2012, 22:46
Re: TBAN - Simple but useful I guess ;) - by ViruZz - 01.10.2012, 22:55
Re: TBAN - Simple but useful I guess ;) - by tonisantolia - 02.10.2012, 00:49
Re: TBAN - Simple but useful I guess ;) - by KingHual - 02.10.2012, 09:53
Re: TBAN - Simple but useful I guess ;) - by JaKe Elite - 02.10.2012, 10:11
Re: TBAN - Simple but useful I guess ;) - by tonisantolia - 06.10.2012, 00:12

Forum Jump:


Users browsing this thread: 1 Guest(s)