[FilterScript] [FS]Name Ban v0.5
#1

Information
You can block nicknames with this FS. If someone tries to connect the server with a blocked nickname, he will be kicked.

Install
You will see a README file when you unpack the rar archive.

Features
>>You can block maximum 250 nicknames. (can be increased)
>>If someone tries to connect the server with a blocked nickname, he will be kicked.
>>You can block nicknames by command.
>>You can unblock nicknames by command.
>>There is a log file. (namebanlog.txt)

How Can I Block Nicknames?
>>Login RCON.
>>Use /nameban [playerid].

How Can I Unblock Nicknames?
>>Use /nameunban [nickname].

Link
Version 0.5
>>Fixed a bug.
Link : http://rapidshare.com/files/305961827/Name_Ban_v05.rar
PWN + AMX

PASTEBIN : http://pawn.pastebin.com/f479d498f
Don't forget creating "namelist.txt" in scriptfiles folder.

Version 0.4
>>Added log system.(namebanlog.txt)

Version 0.3
>>Added /nameunban command.

Version 0.2
>>Fixed a bug.

Version 0.1
>>First version.

Thanks
Quote:
Originally Posted by Catastroph
Tarafımdan ince ayrıntısına kadar denendi ve bir hata bulunamadı. Yani GTATurk.com sunucusunda yakın zamanda kullanılacaktır.
Reply
#2

Nice!
Reply
#3

Thank you very much,
Nice script.
Reply
#4

Add pastebin link, please.
Reply
#5

Quote:
Originally Posted by » Pawnst★r «
Add pastebin link, please.
http://pawn.pastebin.com/f479d498f
Don't forget creating namelist.txt in scriptfiles folder.
Reply
#6

rofl. Nice indentitation.
Reply
#7

Quote:
Originally Posted by [WsR
RyDeR ]
rofl. Nice identitation.
Nice no indentitation.
Reply
#8

Quote:
Originally Posted by Blantas ;P*~
Quote:
Originally Posted by [WsR
RyDeR ]
rofl. Nice identitation.
Nice no indentitation.
His answer was ironic

Quote:
Originally Posted by @DaLgakiran
Don't forget creating namelist.txt in scriptfiles folder.
just add a little check in filterscriptinit like

pawn Code:
if(fexist("namelist.txt") == 0) fclose(fopen("namelist.txt", io_write)); //not a save way
And nice done, the idea counts not the script
Reply
#9

Quote:
Originally Posted by ♣ ⓐⓢⓢ
His answer was ironic
English isn't my native language, so it isn't easy to understand if sentence was ironic or not.
Reply
#10

Not bad.
Reply
#11

Can happen ^^
changed
Reply
#12

God, I love not indented scripts. I eat them in my sleepy nights. Learn to indent or you'll just lose yourself.
Reply
#13

Nice idea, though tabsize 0/no indent = ftl.
Reply
#14

Nice FS! Im using this :

Код:
if(strcmp(cmd, "/ban", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, ".: /ban [playerid/partofname] [reason] :.");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, ".: /ban [playerid/partofname] [reason] :.");
return 1;
}
LockPlayerAccount(giveplayerid,GetPlayerNameEx(playerid),(result));
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, ".: Invalid ID/Name :.");
}
}
return 1;
}
The easiest name ban :P
Reply
#15

good
Reply
#16

Sorry I'm digging this up but this FS doesn't work, or at least it doesn't work with my GM (a GF edit). When I ban a name it kicks the player with that name and when he reconnects nothing happens, he can log in and play. It should kick him... I verified and the name appears in namelist.txt so it's something with the script. Can you help me? Pls.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)