SA-MP Forums Archive
[FilterScript] [FS]Name Ban v0.5 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] [FS]Name Ban v0.5 (/showthread.php?tid=108086)



[FS]Name Ban v0.5 - fanatik - 12.11.2009

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.



Re: [FS]Name Ban v0.5 - roar - 12.11.2009

Nice!


Re: [FS]Name Ban v0.5 - zikit232 - 12.11.2009

Thank you very much,
Nice script.


Re: [FS]Name Ban v0.5 - ded - 12.11.2009

Add pastebin link, please.


Re: [FS]Name Ban v0.5 - fanatik - 12.11.2009

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


Re: [FS]Name Ban v0.5 - RyDeR` - 12.11.2009

rofl. Nice indentitation.


Re: [FS]Name Ban v0.5 - Blantas - 12.11.2009

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


Re: [FS]Name Ban v0.5 - Nero_3D - 12.11.2009

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


Re: [FS]Name Ban v0.5 - Blantas - 12.11.2009

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.


Re: [FS]Name Ban v0.5 - Haji - 12.11.2009

Not bad.


Re: [FS]Name Ban v0.5 - RyDeR` - 13.11.2009

Can happen ^^
changed



Re: [FS]Name Ban v0.5 - Francis[French] - 13.11.2009

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


Re: [FS]Name Ban v0.5 - ded - 14.11.2009

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


Re: [FS]Name Ban v0.5 - skaTim - 20.11.2009

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


Re: [FS]Name Ban v0.5 - nenadninja - 19.12.2009

good


Re: [FS]Name Ban v0.5 - icebird - 18.06.2010

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.