27.09.2012, 16:14
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
But it works perfectly. Now let's get to what matters
• Function
This has two functions include:• How to use
→ BanIP (id)
→ Bannick (id)
As the name of the functions implies, it serves to banish both IP as Nick.
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;
}
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; }
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