Anti-Proxi [Me lo recomiendan]
#1

Hola amigos del samp andaba buscando seguridad para mis server y encontrй este anti-proxi, demen su opinion si me lo recomiendan como seguridad para mi server.

su autor es: ic3cr3am

pawn Код:
#include <a_samp>
#include <a_http>
 
forward BanCheck(index, response_code, data[]);
forward KickTimer();
 
new BANNED[MAX_PLAYERS];
new CHECKED[MAX_PLAYERS];
 
 
//Do not modify
#define CP_VERSION "2.4"
 
public OnPlayerConnect(playerid)
{
    new plrIP[16];
    GetPlayerIp(playerid, plrIP, sizeof(plrIP));
        new string[128];
    format(string, sizeof(string), "creamystuff.tk/creamyprotection/index.php?ip=%s",plrIP);
        HTTP(playerid, HTTP_GET, string, "", "BanCheck");
        BANNED[playerid] = 0;
        return 1;
}
 
public OnPlayerDisconnect(playerid, reason)
{
        CHECKED[playerid] = 0;
        if(BANNED[playerid] != 1)
        {
            new stringu[145];
            new giocatore[MAX_PLAYER_NAME];
        GetPlayerName(playerid, giocatore, sizeof(giocatore));
        switch(reason)
        {
                case 0: format(stringu, sizeof(stringu), "{00FF00}[CreamyProtection] {FFFFFF}%s[%d] {669999}has Left the server [Crashed/Timed Out].", giocatore, playerid);
                case 1: format(stringu, sizeof(stringu), "{00FF00}[CreamyProtection] {FFFFFF}%s[%d] {669999}has Left the server [Leaving].", giocatore, playerid);
                case 2: format(stringu, sizeof(stringu), "{00FF00}[CreamyProtection] {FFFFFF}%s[%d] {669999}has Left the server [Banned/Kicked].", giocatore, playerid);
        }
        SendClientMessageToAll(0xFFFFFFFF, stringu);
        }
        return 1;
}
 
public BanCheck(index, response_code, data[])
{
        new plrIP[16];
        GetPlayerIp(index, plrIP, sizeof(plrIP));
    new buffer[ 128 ];
    if(response_code == 200)
    {
        if(strfind(data, "Ban Code:01", true) != -1)
                {
                        new string[500];
                        format(string, sizeof(string), "{00FFFF}You are {00FF00}Banned {00FFFF}from this server!\n\n{FF6600}Reason: {FFFFFF}Proxy Server\n{FF6600}Admin: {FFFFFF}ic3_cr3am]\n{FF6600}IP Address: {FFFFFF}%s\n{FF6600}Ban Code: {FFFFFF}01\n\n{00FFFF}If you feel this was a incorrect ban or would like a second chance\nVisit our forums, {00FF00}http://www.creamystuff.tk {00FFFF}and apply\nfor a unban, thanks.",plrIP);
                ShowPlayerDialog(index, 149, DIALOG_STYLE_MSGBOX, "{FF0000}C{FFFFFF}reamy {FF0000}P{FFFFFF}rotection", string, "Close", "");
                        BANNED[index] = 1;
                        SetTimer("KickTimer", 1, false);
                }
        }
        else
        {
                format(buffer, sizeof(buffer), "{00FF00}[CreamyProtection] {00FFFF}You are good to play here, thanks for playing fair.", data);
                SendClientMessage(index, 0xFFFFFFFF, buffer);
                new pname[MAX_PLAYER_NAME], string2[110 + MAX_PLAYER_NAME];
                GetPlayerName(index, pname, sizeof(pname));
                format(string2, sizeof(string2), "{00FF00}[CreamyProtection] {FFFFFF}%s[%d] {669999}has Joined the server.", pname, index);
                SendClientMessageToAll(0xAAAAAAAA, string2);
                CHECKED[index] = 1;
        }
}
 
public KickTimer()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(BANNED[i] == 1)
            {
                Kick(i);
        }
        }
}
foro original: https://sampforum.blast.hk/showthread.php?tid=508330

saludos
Reply
#2

Quй mierda de cуdigo es eso??
Reply
#3

Quote:
Originally Posted by EnzoMetlc
Посмотреть сообщение
Quй mierda de cуdigo es eso??
creo que mi traductor lo puso en espaсol pero ya lo edite.
El tema decia anti-proxi el foro original https://sampforum.blast.hk/showthread.php?tid=508330
Reply
#4

esta traducido con ******? ajajaj
Reply
#5

Quote:
Originally Posted by jurgen
Посмотреть сообщение
esta traducido con ******? ajajaj
jaja sip maldito traductor de ****** ya esta corregido.
Reply
#6

te recomiendo el que postie yo una vez

https://sampforum.blast.hk/showthread.php?tid=487757
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)