Blacklist the ip?
#1

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?
Reply
#2

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.
Reply
#3

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

Code:
playerDB[ip[playerid]][Blacklist]
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)