Anti Bot -
dannreis - 02.08.2013
pawn Код:
new Bots[MAX_PLAYER_NAME], MsgxD [1000];
new IpPlayer1[25];
GetPlayerIp(playerid, IpPlayer1, 25);
GetPlayerName(playerid, Bots, MAX_PLAYER_NAME);
if(!strcmp("con", Bots, true) || !strcmp("aux", Bots, true) || !strcmp("com4", Bots, true) || !strcmp("com8", Bots, true)
|| !strcmp("lpt3", Bots, true) || !strcmp("lpt7", Bots, true) || !strcmp("com1", Bots, true) || !strcmp("com5", Bots, true)
|| !strcmp("com9", Bots, true) || !strcmp("lpt5", Bots, true))
{
return 1;
}
{
format(MsgxD, 128, "{a9c4e4}O jogador {FFFFFF}%s {a9c4e4}foi {FFFFFF}banido {a9c4e4}por tentar derrubar o servidor.", Bots);
SendClientMessageToAll(0x00FF00FF, MsgxD);
Ban(playerid);
return 1;
}
Entгo, depois de ser atacado tanto tempo.
Eu achei esse cod na net. Entгo eu resolvi colocar ele, mais quando eu entro no server aparecer !
"O jogador {NOMEDOJOGADOR} foi banido por tentar derrubar o servidor." Caso alguйm possa me ajudar.
Re: Anti Bot -
dannreis - 02.08.2013
Alguйm ? ...
Re: Anti Bot -
DannielCooper - 02.08.2013
Isso deve estar na public OnPlayerSpawn, e abaixo algumas explicaзхes.
pawn Код:
new Bots[MAX_PLAYER_NAME]
Essa variбvel armazena o nome do jogador.
pawn Код:
format(MsgxD, 128, "{a9c4e4}O jogador {FFFFFF}%s {a9c4e4}foi {FFFFFF}banido {a9c4e4}por tentar derrubar o servidor.", Bots);
Essa format faz ele mandar a mensagem.
Esse code estб muito mal feito, e de jeito nenhum ele pode banir um cheater.
Re: Anti Bot -
dannreis - 02.08.2013
Vocк me aconselha um ? ..
Re: Anti Bot -
dannreis - 02.08.2013
Alguйm pode me aconselhar um anti bot que funcione ? estou cansado de ser atacado toda hora.
Se nгo fica entrando mais de 20 player com o mesmo nome , ele entra e fica spawnando em 1 minuto mais de 100x
Re: Anti Bot -
DannielCooper - 02.08.2013
Nгo me lembro bem como й o nome de um Anti Bot que tem aн pela net, mais acho que й, MAX IP CONNECTIONS. Ou algo do tipo.
Re: Anti Bot -
-Rafinha_FusioN- - 02.08.2013
Bom o Daniel Falou Desse So Nao Lembro Si ainda Funfa
pawn Код:
// Define
#define MAX_CONNECTIONS_FROM_IP 3
// Em OnPlayerConnect
new connecting_ip[32+1];
GetPlayerIp(playerid,connecting_ip,32);
new num_players_on_ip = GetNumberOfPlayersOnThisIP(connecting_ip);
if(num_players_on_ip > MAX_CONNECTIONS_FROM_IP) {
printf("Ant-NiexBoot: leitor de ligaзгo (% d) excedido% d conexхes IP de% s.", playerid, MAX_CONNECTIONS_FROM_IP, connecting_ip);
Kick(playerid);
return 1;
}
// Nas Suas Stock
stock GetNumberOfPlayersOnThisIP(test_ip[])
{
new against_ip[32+1];
new x = 0;
new ip_count = 0;
for(x=0; x<MAX_PLAYERS; x++) {
if(IsPlayerConnected(x)) {
GetPlayerIp(x,against_ip,32);
if(!strcmp(against_ip,test_ip)) ip_count++;
}
}
return ip_count;
}