12.02.2019, 20:47
Funcionou, mas nгo ta dando Spawn no player
PHP код:
public MyHttpResponse(playerid, response_code, data[])
{
new name[MAX_PLAYERS],string[256];
new ip[16];
GetPlayerName(playerid, name, sizeof(name));
GetPlayerIp(playerid, ip, sizeof ip);
if(strcmp(ip, "127.0.0.1", true) == 0)
{
if(gPlayerLogged[playerid] == 0 && NaoPodeLogar[playerid] == 0)
{
if(isPlayerRegistered(pName[playerid]))
{
showDialogLogin(playerid);
}
else
{
showDialogRegister(playerid);
}
printf("Nao contem proxy !");
}
return 1;
}
if(response_code == 200)
{
if(strcmp(data, "N", true) == 0)
{
if(gPlayerLogged[playerid] == 0 && NaoPodeLogar[playerid] == 0)
{
if(isPlayerRegistered(pName[playerid]))
{
showDialogLogin(playerid);
}
else
{
showDialogRegister(playerid);
}
SetSpawnInfo(playerid, playerid+1, PlayerInfo[playerid][pSkin],1191.8226, -1744.0476, 13.5802, 0.0, -1, -1, -1, -1, -1, -1);
SetPlayerPos(playerid, 1243.2336, -1694.1256,16.1976);
printf("Nao contem proxy !");
}
}
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", pName[playerid]);
ABroadCast(COLOR_LIGHTRED, string, 1);
printf("Proxy Detectado !");
SetTimerEx("DelayedKick", 100, false, "i", playerid);
}
else if(strcmp(data, "X", true) == 0)
{
printf("WRONG IP FORMAT");
}
else
{
printf("The request failed! The response code was: %d", response_code);
}
}
return 1;
}