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:
#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
#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
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.... |
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.... |
Give him a chance people,
atleast he didn't copy and pasted some code and then release. 1+ |