10.10.2011, 14:12
(
Последний раз редактировалось Yvax; 10.10.2011 в 18:47.
Причина: Update
)
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);
Example of script:
pawn Код:
public OnPlayerConnect(playerid)
{
if( CheckPlayerCountryBlocked(playerid) == 1 )
{
Kick(playerid);
}
return 1;
}
Simply by editing the BlockedCountries string:
pawn Код:
new BlockedCountries[256] = "Unknown, Country1, Country2, etc. ";
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
server.cfg
Код:
plugins GeoIP_Plugin
pawn Код:
#include <cblock>
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
Tavi(author)
Creator of GeoIP_Plugin for SA-MP
PS:A MySQL version might be also available soon