02.03.2019, 17:14
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.