SA-MP Forums Archive
Blacklist the ip? - 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: Blacklist the ip? (/showthread.php?tid=142855)



Blacklist the ip? - 0ne - 20.04.2010

Umh, i don't really know how to explain this but its like that:


Code:
new ip[20];
GetPlayerIp(giveplayerid, ip, sizeof ip);
playerDB[ip][Blacklist] = 1;
The thing is , i don't know how to do that "playerDB[ip][Blacklist] = 1" placing the IP in insert playerid just makes me get some errors, any ideas how to do it?


Re: Blacklist the ip? - Calgon - 20.04.2010

There's no point - You can use the native SA:MP system.

Ban( playerid );

Unless you're planning on making a custom system, which seems to advanced for you right now.


Re: Blacklist the ip? - 0ne - 20.04.2010

I know just wanted to make my own system, Figured it out just as u posted, should go like:

Code:
playerDB[ip[playerid]][Blacklist]



Re: Blacklist the ip? - Calgon - 20.04.2010

Quote:
Originally Posted by 0ne
I know just wanted to make my own system, Figured it out just as u posted, should go like:

Code:
playerDB[ip[playerid]][Blacklist]
That's wrong too. The way to do it (with flatfiles) would be to store all data inside a file and then check it where necessary. You'd check for an IP in the file and if it exists, then bam - do whatever. Seif created a banning system that demonstrates perfect use of IP-blacklisting / banning - like the way you're trying to do, take a peek and edit it, if you wish.