SA-MP Forums Archive
Custom Ban Help - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Custom Ban Help (/showthread.php?tid=130870)



Custom Ban Help - CJ101 - 28.02.2010

Today i found out my ban system has a problem.

So im turning to this forum for help, i cant think of anyway to fix this.

I have a system where all bans are put into a file /scriptfiles/config/bans.txt

But if i go ingame and lookup a ban, it wont give me the right stuff..

Heres the format for the bans in the bans.txt file:
Quote:

Name - IP - Reason

Код:
IRCCMD:lookupban(botid, channel[], user[], host[], params[])
{
  	new tmp[25],Index;
    tmp = strtok(params,Index);
	new File:msg = fopen("/config/bans.txt",io_read);
	new st[80],string[158];
	if(!fexist("/config/bans.txt")) return IrcSay("* Sorry, cannot find the Bans file.");
	while(fread(msg,st,sizeof st))
	{
	  if(strfind(st,params,false,0))
	  {
			return IrcSay(st);
		}
	}
	fclose(msg);
	return 1;
}
Thanks to anybody that can help


Re: Custom Ban Help - CJ101 - 01.03.2010

help

its been over 12 hrs




Re: Custom Ban Help - CJ101 - 01.03.2010

Yes, i mean irc.

heres what happens when i try it:

Код:
!lookupban Test
[ADR]Loukiinho - 79.72.*.* - money hacker and ip changer
It shouldnt be showing that ban, it only should be showing the ban that contains the name 'Test'