[Pedido] Ant-cheater -
diretor7 - 26.04.2011
Pessoal pesquisei aqui ontem a noite enteira e nгo consegui achar um ant-cheater de AirBreak alguйm tem para poder me passar?
Nгo tenho a mнnima idйia de como comeзar um.
Obrigado!
Re: [Pedido] Ant-cheater -
Macintosh - 26.04.2011
Vocк nгo achou, porque vocк nгo procurou ou nгo soube procurar.
Tem um Anti-Air Breack feito pelo Ambrуsio que atй coloquei ele em meu gamemode
San Andreas State Virtual.
Procure novamente
Re: [Pedido] Ant-cheater -
diretor7 - 26.04.2011
Ok vou procurar "Anti-Air Breack" ou relacionados.
Re: [Pedido] Ant-cheater -
Macintosh - 26.04.2011
Crйditos a D0erf|er. Traduzido por: Ambrуsio!
Tуpico Traduзгo:
http://forum.sa-mp.com/showthread.ph...light=D0erf|er
pawn Код:
#define POSSIBLE_AIRBREAK_COUNT_CAR 9
#define POSSIBLE_AIRBREAK_COUNT_ONFOOT 7
pawn Код:
public OnGameModeInit()
{
new c;
c=POSSIBLE_AIRBREAK_COUNT_CAR;
if(c < 7)
{
print("PERIGO: POSSIVEL_AIRBREAK_USANDO_CARRO й < 7, deve ser pelo menos >=7!!!");
running=0;
print("Anti Airbreak estб agora desligado.");
}
c=POSSIBLE_AIRBREAK_COUNT_ONFOOT;
if(c < 5)
{
print("PERIGO: POSSIVEL_AIRBREAK_ANDANDO_APE й < 5, deve ser pelo menos >=5!!!");
running=0;
print("Anti Airbreak estб agora desligado.");
}
return 1;
}
pawn Код:
public OnPlayerUpdate(playerid)
{
// ANTIAIRBREAK
pupdates[playerid]++;
if(pupdates[playerid] > UPDATE_COUNT && running == 1)
{
pupdates[playerid]=0;
new check;
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && IsVehicleValid(GetPlayerVehicleID(playerid)))
{
new Float:vx,Float:vy,Float:vz;
GetVehicleVelocity(GetPlayerVehicleID(playerid),vx,vy,vz);
if(vx==0.0 && vy==0.0 && vz < -0.0032 && vz > -0.022)
{
if(IsPlayerInWater(playerid)==0)
{
check=1;
}
else
{
check=3;
}
}
}
else
{
if(GetPlayerState(playerid)==PLAYER_STATE_ONFOOT && GetPlayerSurfingVehicleID(playerid)==INVALID_VEHICLE_ID)
{
new Float:vx,Float:vy,Float:vz,Float:px,Float:py,Float:pz;
GetPlayerVelocity(playerid,vx,vy,vz);
pupdates[playerid]=0;
new keys,ud,lr;
GetPlayerKeys(playerid,keys,ud,lr);
if (keys & KEY_SPRINT)
{
if(-0.022 < vz < -0.0040 && -0.235 < vx < 0.235 && -0.235 < vy < 0.235)
{
if(!IsPlayerInRangeOfPoint(playerid,2.0,GetPVarFloat(playerid,"oposx"),GetPVarFloat(playerid,"oposy"),GetPVarFloat(playerid,"oposz")) || -0.5>(GetPVarFloat(playerid,"oposz")-pz)>-0.1 || 0.075>(GetPVarFloat(playerid,"oposz")-pz)>-0.075)
{
if(IsPlayerInWater(playerid)==0)
{
check=2;
if(airbreakcount[playerid] > (POSSIBLE_AIRBREAK_COUNT_ONFOOT-2))
{
SetPlayerVelocity(playerid,0.3,0.3,0.3);
}
}
else
{
check=3;
}
}
SetPVarFloat(playerid,"oposx",px);
SetPVarFloat(playerid,"oposy",py);
SetPVarFloat(playerid,"oposz",pz);
}
}
else
{
if(-0.022 < vz < -0.0040 && -0.121 < vx < 0.121 && -0.121 < vy < 0.121)
{
if(!IsPlayerInRangeOfPoint(playerid,2.0,GetPVarFloat(playerid,"oposx"),GetPVarFloat(playerid,"oposy"),GetPVarFloat(playerid,"oposz")) || -0.5>(GetPVarFloat(playerid,"oposz")-pz)>-0.1 || 0.075>(GetPVarFloat(playerid,"oposz")-pz)>-0.075)
{
if(IsPlayerInWater(playerid)==0)
{
check=2;
if(airbreakcount[playerid] > (POSSIBLE_AIRBREAK_COUNT_ONFOOT-2))
{
SetPlayerVelocity(playerid,0.3,0.3,0.3);
}
}
else
{
check=3;
}
}
SetPVarFloat(playerid,"oposx",px);
SetPVarFloat(playerid,"oposy",py);
SetPVarFloat(playerid,"oposz",pz);
}
}
}
}
if(check > 0)
{
if(check < 3)
{
new POSSIBLE_AIRBREAK_COUNT;
switch(check)
{
case 1: POSSIBLE_AIRBREAK_COUNT=POSSIBLE_AIRBREAK_COUNT_CAR;
case 2: POSSIBLE_AIRBREAK_COUNT=POSSIBLE_AIRBREAK_COUNT_ONFOOT;
}
airbreakcount[playerid]++;
if(airbreakcount[playerid] > POSSIBLE_AIRBREAK_COUNT)
{
airbreakcount[playerid]=0;
new ip[20],name[24];
GetPlayerName(playerid,name,sizeof(name));
GetPlayerIp(playerid,ip,sizeof(ip));
switch(check)
{
case 1:printf("Airbreak: %s(%s) foi banido. Reaзгo: Airbreak [CARRO] [by D0erf|er]",name,ip);
case 2:printf("Airbreak: %s(%s) foi banido. Reaзгo: Airbreak [A PЙ] [by D0erf|er]",name,ip);
}
Ban(playerid);
}
}
}
else
{
airbreakcount[playerid]=0;
}
}
return true;
}
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
airbreakcount[playerid]=0;
return true;
}
Re: [Pedido] Ant-cheater -
diretor7 - 27.04.2011
Valeu aк!
Nem testei ainda, ontem nгo tive tempo de postar e testar, agora vou testar!