Country Blocker 1.1 RELEASED -
Yvax - 10.10.2011
CountryBlocker 1.1
What is this?
CountryBlocker is a fliterscript/include used for blocking a country from your server.It uses the GeoIP_Plugin for SA-MP and the GeoIP country database.
How can I use it?
There are two ways of using this feature:
1.As a filterscript(
cblock_fs_package.rar)
2.As an include(
cblock_inc_package.rar)
What functions are available?
In the include version you have to add this function in your OnPlayerConnect/OnPlayerRequestSpawn/or wherever you need it.
pawn Код:
public CheckPlayerCountryBlocked(playerid);
If the function returns 1 it means that the player's country is blocked,0 means that the country is not blocked.
Example of script:
pawn Код:
public OnPlayerConnect(playerid)
{
if( CheckPlayerCountryBlocked(playerid) == 1 )
{
Kick(playerid);
}
return 1;
}
How can I add/remove countries from the blocked list?
Simply by editing the BlockedCountries string:
pawn Код:
new BlockedCountries[256] = "Unknown, Country1, Country2, etc. ";
How do I install this?
Simply copy the files from the folders of the package to the folders of your server and edit:
Filterscript version:
server.cfg
Код:
filterscripts cblock
plugins GeoIP_Plugin
Include version:
server.cfg
Код:
plugins GeoIP_Plugin
script
Where can I download this?
V1.0(Not supported by actual tutorial)
Filterscript version package:
http://www.taviss.net/downloads/cblocker_fs_package.rar
Include version package:
http://www.taviss.net/downloads/cblo...nc_package.rar
V1.1
Filterscript version package:
http://www.taviss.net/downloads/cblo...package1.1.rar
Include version package:
http://www.taviss.net/downloads/cblo...package1.1.rar
*all packages include the GeoIP files
Changelog
V1.0
[code]
Release
[CODE]
V1.1
Код:
Simpler and faster
No repetitive functions
Credits
Tavi(author)
Creator of GeoIP_Plugin for SA-MP
PS:A MySQL version might be also available soon
Re: Country Blocker 1.0 -
kiss - 10.10.2011
First
Good job man, that awesome idea
AW: Country Blocker 1.0 -
Awesome™ - 10.10.2011
Rassist
Re: AW: Country Blocker 1.0 - Double-O-Seven - 10.10.2011
Quote:
Originally Posted by Awesome™
Rassist ![Cheesy](images/smilies/biggrin.png)
|
*Racist, this isn't a German forum.
@Topic:
Racist!
Re: Country Blocker 1.0 -
Yvax - 10.10.2011
This is not racist, you can use it, for example, if you only want to create a server for some country and you don't want foreign players causing lag or you can only block countries that are too far from the server location or anything like that.
@kiss Thanks
Re: Country Blocker 1.0 -
CyNiC - 10.10.2011
An xenophobic filterscript, ...
Re: Country Blocker 1.0 -
TheArcher - 10.10.2011
They're joking :P Good job anyways.
Re: Country Blocker 1.0 -
OKStyle - 10.10.2011
smth like:
pawn Код:
new skincolor = GetPlayerSkinColor(playerid);
switch(skincolor)
{
case YELLOW: Kick(playerid);
case BLACK: Kick(playerid);
case RED: Kick(playerid);
case WHITE: Kick(playerid);
}
No rasism
Re: Country Blocker 1.0 -
wups - 10.10.2011
Quote:
Originally Posted by Yvax
This is not racist, you can use it, for example, if you only want to create a server for some country and you don't want foreign players causing lag or you can only block countries that are too far from the server location or anything like that.
@kiss Thanks
|
Well, then CheckPlayerCountryAllowed would be 100x better, instead of writing hundreds of other countries
Re: Country Blocker 1.0 -
Phanto90 - 10.10.2011
Quote:
Originally Posted by wups
Well, then CheckPlayerCountryAllowed would be 100x better, instead of writing hundreds of other countries ![Wink](images/smilies/wink.png)
|
Indeed. Just needed Geo_Ip plugin and checking if a player is of a nation.
Anyway if I'm italian and want to join a Italian server while I'm in vacancy out of Italy? I don't see any use for this.