IP Ban by Name System -
Private200 - 31.10.2012
Hello guys , i made a ban system .
It see the name and then it IP Ban that player , if that name is not allowed .
Easy to use . Just change the name .
The names i used are Lol , lul and lolz , because they can hack your server if someone joins with that names
You can add new names using these lines under OnPlayerConnect :
pawn Код:
else if(!strcmp(pName, "//name not allowed here", true))
{
SendClientMessage(playerid, COLOR_PINK,"This name is not allowed");
Ban(playerid);
}
Hope you like it . Download link :
Mediafire :
http://www.mediafire.com/?b4yoafddhoj1lnl
Pastebin :
http://pastebin.com/G3rtJ09Q
Now for the people who don't like the ban system , can use the kick system.
It is same , but this one just will kick them !
Download links :
Mediafire :
http://www.mediafire.com/?eux5j9gmf6ctbgs
Pastebin :
http://pastebin.com/AjjwYNtJ
Screens of kicking system :
Feel free to rep+ .
No mirrors please .
Use it for changes , but don't remove credits .
If wanna share it , get permission please.
Thanks
Re: IP Ban by Name System - Patrick - 31.10.2012
Nice And Simple !
Re: IP Ban by Name System -
Christian7073 - 31.10.2012
simple and fantastic!
Re: IP Ban by Name System -
Private200 - 31.10.2012
Quote:
Originally Posted by Christian7073
simple and fantastic!
|
Thanks
Quote:
Originally Posted by pds2012
Nice and Simply !
|
Thanks you too
Re: IP Ban by Name System -
tyler12 - 31.10.2012
Really?
Re: IP Ban by Name System -
Private200 - 31.10.2012
Quote:
Originally Posted by tyler12
Really?
|
What you mean with really ?
If you mean about the lol, lolz , and lul . i was not sure , but it is one of these , so i putted them all

.
If someone connect with that name , others cannot join , because that words are proibiden by windows , and everything that uses that name get's broken :P
I found it on ****** search
Re: IP Ban by Name System -
tyler12 - 31.10.2012
Quote:
Originally Posted by Private200
What you mean with really ?
If you mean about the lol, lolz , and lul . i was not sure , but it is one of these , so i putted them all  .
If someone connect with that name , others cannot join , because that words are proibiden by windows , and everything that uses that name get's broken :P
I found it on ****** search
|
No. Your showing member's how to use a function documented at the wiki already.
Re: IP Ban by Name System -
Private200 - 31.10.2012
Ahh

, newbie scripters doesen't even know what wiki means , so i pasted it here , and you will not search on ****** to add it ..
Re: IP Ban by Name System -
tyler12 - 31.10.2012
Quote:
Originally Posted by Private200
Ahh  , newbie scripters doesen't even know what wiki means , so i pasted it here , and you will not search on ****** to add it ..
|
Could do something like this.
PHP код:
new BadNames[] =
{
"Lol",
"Lul",
"Haxor"
};
stock IsNameInvalid(playerid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
if(!strcmp(pName,BadNames,true))
{
SendClientMessage(playerid,-1,"ERROR:Name is not allowed.");
return 1;
}
return 0;
}
Re: IP Ban by Name System -
Edvin - 31.10.2012
Quote:
Originally Posted by Christian7073
simple and fantastic!
|
What is "fantastic" at this filterscript?
Why is not better a ban system ? With loading banned names/IPs from a file, or from a database ( MySQL, SQLite ) ... it's much btter like your code:
pawn Код:
else if(!strcmp(pName, "//name not allowed here", true))
{
SendClientMessage(playerid, COLOR_PINK,"This name is not allowed");
Kick(playerid);
}
And for what is "else" there? can you explain me?