It IS posible?
#5

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;
}
Then, if you wish to auto activate it on server start, just put:

pawn Код:
AntiVPNLoaded = true;
on OnGameModeInit.
Reply


Messages In This Thread
It IS posible? - by nbx2000 - 13.03.2019, 04:36
Re: It IS posible? - by L0K3D - 13.03.2019, 05:12
Re: It IS posible? - by nbx2000 - 13.03.2019, 05:39
Re: It IS posible? - by TokicMajstor - 13.03.2019, 13:34
Re: It IS posible? - by SymonClash - 13.03.2019, 13:58

Forum Jump:


Users browsing this thread: 1 Guest(s)