SA-MP Forums Archive
[Ajuda] Como o cara vai entra no meu serve fala que ele e bot? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Como o cara vai entra no meu serve fala que ele e bot? (/showthread.php?tid=387140)



Como o cara vai entra no meu serve fala que ele e bot? - Weslly Stronda - 23.10.2012

ai como esse cara aqui tenta entra no meu serve fala que ele e bot! print ai/ qual foi o probrema help


Re: Como o cara vai entra no meu serve fala que ele e bot? - Don_Speed - 23.10.2012

Post callback OnPlayerConnect.


Re: Como o cara vai entra no meu serve fala que ele e bot? - Weslly Stronda - 23.10.2012

descupe mais oque callback e para posta os codigos do onplayerconnect do meu gm?


Re: Como o cara vai entra no meu serve fala que ele e bot? - Sergiinhonike - 23.10.2012

Sim posta o OnPlayerConnect.


Re: Como o cara vai entra no meu serve fala que ele e bot? - Nice-.- - 23.10.2012

Quote:
Originally Posted by Weslly Stronda
Посмотреть сообщение
descupe mais oque callback e para posta os codigos do onplayerconnect do meu gm?
callback й = a public xD


Re: Como o cara vai entra no meu serve fala que ele e bot? - Weslly Stronda - 23.10.2012

mais o probrema so aocntece com esse cara ai:
aqui a onplayerconnect:

Код:
public OnPlayerConnect(playerid)
{
    	new string[128];
	new pName[MAX_PLAYER_NAME];
	GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
	format(string, sizeof string, "%s entrou no servidor!", pName);
	SendClientMessageToAll(Cor_Azul, string);
	return 1;
}



Re: Como o cara vai entra no meu serve fala que ele e bot? - Weslly Stronda - 23.10.2012

alquem?


Re: Como o cara vai entra no meu serve fala que ele e bot? - zSuYaNw - 23.10.2012

Que filterscripts vocк usa?


Re: Como o cara vai entra no meu serve fala que ele e bot? - Don_Speed - 23.10.2012

Voce esta usando alguma FS de anti-bot


Re: Como o cara vai entra no meu serve fala que ele e bot? - Weslly Stronda - 23.10.2012

aqui o anti bot que uso:

Код:
#include a_samp

const MAX_CON_PERM = 5;
const NENHUMA  = 0;
const BAN  = 1;
const KICK = 2;

enum eNick
{
	NickO[24],
	NickT[24],
	punicao,
};

static stock BotNickInteiro[][eNick] =
{
	// nick do bot   nick para trocar   punicao
	{ "aux",			"[bot]", 		KICK},
	{ "con",			"[bot]", 		KICK }
};

static stock BotNickParcial[][eNick] =
{
// nick parcial do bot  nick para trocar  punicao
	{ "niex", 			"[bot]", 		KICK },
	{ "botz", 			"[bot]",		KICK }
};

public OnPlayerConnect(playerid)
{
	new nick[24], ip[30];

	GetPlayerName(playerid, nick, sizeof nick);
	GetPlayerIp(playerid, ip, sizeof ip);

	for(new i = 0; i < sizeof BotNickInteiro; i++)
	{
	    if(strcmp(nick, BotNickInteiro[i][NickO], true ) == 0)
	    {
			printf("> Bot Detect: %s[%d] - %s", nick, playerid, ip);

			format(nick, sizeof(nick), "%s%d", BotNickInteiro[i][NickT], playerid);
	        SetPlayerName(playerid, nick);

	        if(BotNickInteiro[i][punicao] == KICK) Kick(playerid);
	        else if(BotNickInteiro[i][punicao] == BAN) BanEx(playerid, "BOT");
	        else if(BotNickInteiro[i][punicao] == NENHUMA) printf("> Nenhuma acao foi feita com o BOT: %s[%d] - %s", nick, playerid, ip);
		}
	}

	for(new i = 0; i < sizeof BotNickParcial; i++)
	{
		if(strfind(nick, BotNickParcial[i][NickO], true ) != -1)
	    {
	        printf("> Bot Detect: %s[%d] - %s", nick, playerid, ip);

			format(nick, sizeof(nick), "%s%d", BotNickParcial[i][NickT], playerid);
	        SetPlayerName(playerid, nick);

	        if(BotNickParcial[i][punicao] == KICK) Kick(playerid);
	        else if(BotNickParcial[i][punicao] == BAN) BanEx(playerid, "BOT");
	        else if(BotNickParcial[i][punicao] == NENHUMA) printf("> Nenhuma acao foi feita com o BOT: %s[%d] - %s", nick, playerid, ip);
		}
	}

	new ipget[30], ips;

	for(new i = 0;  i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			GetPlayerIp(i, ipget, sizeof ipget);
			if(strcmp(ipget, ip, true) == 0)
			{
				ips++;
			}
		}
	}

	if(ips > MAX_CON_PERM)
	{
	    printf("> Conexao excedida %s[%d] - %s", nick, playerid, ip);
	    Kick(playerid);
	}
	return 1;
}