// Anti aimbot lуgico
// Crйditos: Biel_COP (lуgica/cуdigo) e zDanTee_TraaP (testes)
// Acesse o servidor RPG mais bem elaborado do SA-MP Brasil: ip.cidadesocial.com ;)
#include a_samp.inc // include nativa do SA-MP
#define Total_Players 100 // Edite ao seu gosto
#define Criar_Logs 1 // 0 = nгo, 1 = sim
#define Arquivo_Logs "Players usando aimbot.txt" // Arquivo que salvarб as logs, caso a opзгo de salvamento esteja ativada
// Funзгo criada por Biel_COP, para a include bCini8 (nгo postada no fуrum SA-MP, atй o momento)
#if Criar_Logs
#define bCini8_Log(%0,%1) new File:bCini8_Archive = fopen(%0,io_append); fwrite(bCini8_Archive,%1) && fclose(bCini8_Archive)
#endif
new Tiros_Aimbot[Total_Players],Caminhando_Aimbot[Total_Players],Correndo_Aimbot[Total_Players],Funcionamento_Anti_Aimbot[Total_Players],Fala_Aimbot[128];
// Funзхes pъblicas
public OnPlayerConnect(playerid)
{
Tiros_Aimbot[playerid] = 0;
Caminhando_Aimbot[playerid] = 0;
Correndo_Aimbot[playerid] = 0;
}
public OnPlayerWeaponShot(playerid,weaponid,hittype,hitid,Float:fX,Float:fY,Float:fZ)
{
if(!IsPlayerInAnyVehicle(playerid) && IsPlayerConnected(hitid) && weaponid ^ 38)
{
if(hittype == BULLET_HIT_TYPE_PLAYER)
{
if(Velocidade_Player(hitid) && Caminhando_Aimbot[hitid] < gettime())
{
++Tiros_Aimbot[playerid];
if(Correndo_Aimbot[hitid] < gettime()) // Se o player estiver andando
{
if(Tiros_Aimbot[playerid] >= (10+Combate_LAG(playerid,hitid)))
{
if(!Funcionamento_Anti_Aimbot[playerid])
{
Usando_Aimbot(playerid);
}
return 0;
}
}
else // Se o player estiver correndo
{
if(Tiros_Aimbot[playerid] >= (5+Combate_LAG(playerid,hitid)))
{
if(!Funcionamento_Anti_Aimbot[playerid])
{
Usando_Aimbot(playerid);
}
return 0;
}
}
}
else
{
Tiros_Aimbot[playerid] = 0;
}
}
}
else
{
Tiros_Aimbot[playerid] = 0;
}
return 1;
}
new Tecla[Total_Players][3];
public OnPlayerUpdate(playerid)
{
GetPlayerKeys(playerid,Tecla[playerid][0],Tecla[playerid][1],Tecla[playerid][2]);
if(Tecla[playerid][0] & KEY_WALK)
{
Caminhando_Aimbot[playerid] = gettime()+1;
}
if(Tecla[playerid][0] & KEY_SPRINT)
{
Correndo_Aimbot[playerid] = gettime()+1;
}
return 1;
}
Zerar_Funcionamento_Anti_Aimbot(playerid);
public Zerar_Funcionamento_Anti_Aimbot(playerid)
{
Funcionamento_Anti_Aimbot[playerid] = 0;
}
// Funзхes que nгo sгo do tipo 'public'
Nome(playerid)
{
new Nome_Player[21];
GetPlayerName(playerid,Nome_Player,sizeof(Nome_Player));
return Nome_Player;
}
Velocidade_Player(playerid)
{
new Float:Velocidade[3];
GetPlayerVelocity(playerid,Velocidade[0],Velocidade[1],Velocidade[2]);
return floatround(floatsqroot((Velocidade[0]*Velocidade[0])+(Velocidade[1]*Velocidade[1])+(Velocidade[2]*Velocidade[2]))*25);
}
Usando_Aimbot(playerid)
{
format(Fala_Aimbot,sizeof(Fala_Aimbot),"Player %s [%d] estб provavelmente usando aimbot!",Nome(playerid),playerid);
SendClientMessageToAll(0xDBD060AA,Fala_Aimbot);
Funcionamento_Anti_Aimbot[playerid] = 1;
SetTimerEx("Zerar_Funcionamento_Anti_Aimbot",10000,0,"i",playerid);
#if Criar_Logs
Escrever_Log(Arquivo_Logs,Fala_Aimbot);
#endif
}
Combate_LAG(playerid,hitid)
{
new Float:Player_LAG[2],Float:Somador_LAG;
Player_LAG[0] = NetStats_PacketLossPercent(playerid);
Player_LAG[1] = NetStats_PacketLossPercent(hitid);
if(Player_LAG[0] >= 1.0) // playerid com conexгo lenta
{
Somador_LAG += 5.0;
}
if(Player_LAG[1] >= 1.0) // hitid com conexгo lenta
{
Somador_LAG += 5.0;
}
if(Somador_LAG < 5.0) // Se nenhum dos dois players estб com a conexгo lenta
{
Somador_LAG = Player_LAG[0]+Player_LAG[1];
}
return floatround(Somador_LAG,floatround_ceil);
}
// Funзхes dependentes de definiзхes
stock Escrever_Log(arquivo[],texto[])
{
new Horario[6],Fala[256];
getdate(Horario[0],Horario[1],Horario[2]);
gettime(Horario[3],Horario[4],Horario[5]);
format(Fala,sizeof(Fala),"%d/%d/%d, аs %d:%d:%d - %s\r\n",Horario[2],Horario[1],Horario[0],Horario[3],Horario[4],Horario[5],texto);
bCini8_Log(arquivo,Fala);
}
error 017: undefined symbol "Tecla"
PHP Code:
|
Meio que admiro voce, sempre a tentarem lhe deitar a baixo porem nao desiste..
Gosto da sua atitude.. |