[Ajuda] Tela de login nгo aparece
#1

Eu peguei esse Anti-Proxy e estou tentando adaptar ele no GameMode, mas nгo ta aparecendo o login
PHP код:

stock startLogin
(playerid)
{
    new 
File[50];
    
format(File, sizeof(File), "Contas/%s.ini", PlayerName(playerid));
    if(!
DOF2_FileExists(File))
    {
        
showDialogRegister(playerid);
    }
    else if(
DOF2_FileExists(File))
    {
        
showDialogLogin(playerid);
    }
    return 
1;
}
forward MyHttpResponse(playerid, response_code, data[]);
public 
MyHttpResponse(playerid, response_code, data[])
{
    new 
string[256], ip[16], name[MAX_PLAYERS];
    
GetPlayerName(playerid, name, sizeof(name));
    
GetPlayerIp(playerid, ip, sizeof ip);
    if(
strcmp(ip, "127.0.0.1", true) == 0)
    {
        
format(string, 256, "[LOCAL-HOST] %s(%d) entrou no servidor.", name, playerid);
        
SendClientMessageToAll( 0x09F7DFC8, string);
        return 
1;
    }
    if(
response_code == 200)
    {
        if(
strcmp(data, "N", true) == 0) {
            
startLogin(playerid);
        }
        else if(
strcmp(data, "Y", true) == 0) {
            
SendClientMessage(playerid, COLOR_LIGHTRED, "[ANTI-PROXY]: Proxy Detectado, desligue seu Proxy/VPN senao ira ser kickado !");
            
format(string, sizeof(string), "[ANTI-PROXY] Player %s foi kickado por suspeita de Proxy/VPN", name);
            
SendClientMessageToAll(COLOR_LIGHTRED, string);
            
printf("Proxy Detectado !");
            
SetTimerEx("DelayedKick", 100, false, "i", playerid);
        }
        else if(
strcmp(data, "X", true) == 0) {
            
printf("Formato de IP errado !");
        }
        else {
            
printf("A solicitaзгo falhou! O cуdigo de resposta foi: %d", response_code);
        }
    }
    return 
1;
}
Se alguйm puder ajudar, agradeзo. 
Reply
#2

Como e onde vocк ta usando o MyhttpResponse?
Reply
#3

OnPlayerConnect
PHP код:
new ip[16], string[59];
GetPlayerIp(playerid, ip, sizeof ip);
format(string, sizeof string, "http://proxy.mind-media.com/block/proxycheck.php?ip=%s", ip);
HTTP(playerid, HTTP_GET, string, "", "MyHttpResponse"); 
Reply
#4

bota pro return ser 0.

return 0

caso nгo for avise
Reply
#5

Foi nгo ;-;
Reply
#6

Alguйm para me ajudar?

@Edit Acabei de perceber que nada que estб dentro de:
PHP код:
if(strcmp(data, "N", true) == 0) {
} 
Nгo acontece nada... eu coloquei uma mensagem tambйm nгo deu nada.
Reply
#7

Tira o http:// e tenta novamente.
E tambйm faзa debug pra ver o que estб retornando do site.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)