13.03.2019, 13:58
pawn Код:
new bool: AntiVPNLoaded;
YCMD:antivpn(playerid, params[])
{
if(!IsPlayerAdmin) return SendClientMessage(playerid, -1, "You are not an admin.");
switch(AntiVPNLoaded)
{
case false: //Anti VPN NOT loaded, let's load it...
{
SendRconCommand("loadfs %YourFSName%");
SendClientMessage(playerid, -1, "Anti VPN filterscript loaded.");
}
case true: //Anti VPN loaded, let's unload it...
{
SendRconCommand("unloadfs %YourFSName%");
SendClientMessage(playerid, -1, "Anti VPN filterscript unloaded.");
}
}
return 1;
}
public OnPlayerConnect(playerid)
{
if(AntiVPNLoaded == true) //Anti VPN is loaded, let's do the proxy check...
{
new ip[16], string[59];
GetPlayerIp(playerid, ip, sizeof ip);
format(string, sizeof string, "www.shroomery.org/ythan/proxycheck.php?ip=%s", ip);
HTTP(playerid, HTTP_GET, string, "", "MyHttpResponse");
}
return 1;
}
pawn Код:
AntiVPNLoaded = true;