PDA

Просмотр полной версии : [Античит] AirBreak Detect



Valera_Trefilov
24.01.2015, 15:58
static
Float:sync_fPosition[MAX_PLAYERS][3],
sync_summ[MAX_PLAYERS],
bool:sync_pos[MAX_PLAYERS],
Tick[MAX_PLAYERS];

public OnPlayerUpdate(playerid)
{
if(sync_fPosition[playerid][0]==0.0 && sync_fPosition[playerid][1]==0.0 && sync_fPosition[playerid][2]==0.0)
return GetPlayerPos(playerid,sync_fPosition[playerid][0],sync_fPosition[playerid][1],sync_fPosition[playerid][2]);

new distance=floatround(GetPlayerDistanceFromPoint(playerid,sync_fPosition[playerid][0],sync_fPosition[playerid][1],sync_fPosition[playerid][2]));

new get_tick=GetTickCount()-Tick[playerid];
new MAX_DISTANCE=2000/get_tick;

if(distance>MAX_DISTANCE)
{
sync_pos[playerid]=false;
SetPlayerPos(playerid,sync_fPosition[playerid][0],sync_fPosition[playerid][1],sync_fPosition[playerid][2]);
sync_summ[playerid]++;
if(++sync_summ[playerid]>49<<3/10)
{
sync_summ[playerid]=0;
sync_fPosition[playerid][0]=0;
sync_fPosition[playerid][1]=0;
sync_fPosition[playerid][2]=0;
Kick(playerid);
return 0;
}
sync_summ[playerid]--;
}
else if(!sync_pos[playerid])
sync_pos[playerid]=true;
if(sync_pos[playerid])
GetPlayerPos(playerid,sync_fPosition[playerid][0],sync_fPosition[playerid][1],sync_fPosition[playerid][2]),Tick[playerid]=GetTickCount();
return 1;
}

L0ndl3m
24.01.2015, 21:22
if(++sync_summ[playerid]>49<<3/10)
wtf?!

Brendan
28.01.2015, 18:45
Лол, что за ерунда?
Протестировал он появляется под фермой и так пока не кикнет...

- - - Добавлено - - -

И что if(++sync_summ[playerid]>49<<3/10) - это означает?

Valera_Trefilov
11.02.2015, 18:32
Лол, что за ерунда?
Протестировал он появляется под фермой и так пока не кикнет...

- - - Добавлено - - -

И что if(++sync_summ[playerid]>49<<3/10) - это означает?

это логический алгоритм просчета NOP SetPlayerPos

насчет бага с тп. вот фикс:



forward AC_SetPlayerPos (playerid,Float:X,Float:Y,Float:Z);
public AC_SetPlayerPos (playerid,Float:X,Float:Y,Float:Z)
{
GetPlayerPos(playerid,sync_fPosition[playerid][0],sync_fPosition[playerid][1],sync_fPosition[playerid][2]);
return SetPlayerPos(playerid,X,Y,Z);
}

forward AC_SetVehiclePos (vehicleid,Float:X,Float:Y,Float:Z);
public AC_SetVehiclePos (vehicleid,Float:X,Float:Y,Float:Z)
{
for new playerid=0;playerid!=MAX_PLAYERS;playerid++ do
{
if(vehicleid!=GetPlayerVehicleID(playerid))
continue;
GetPlayerPos(playerid,sync_fPosition[playerid][0],sync_fPosition[playerid][1],sync_fPosition[playerid][2]);
}
return SetVehiclePos(vehicleid,X,Y,Z);
}
#define SetPlayerPos AC_SetPlayerPos
#define SetVehiclePos AC_SetVehiclePos

L0ndl3m
11.02.2015, 21:03
Может Вы подскажите как его высчитали?

TekVak
14.02.2015, 21:41
Даже не работает...

[P-P]ColoradoRP
15.02.2015, 02:36
Не пашет

Gressie
15.02.2015, 02:36
Даже не работает...
Могу дать который есть у меня, но там не работает в тачке)

TekVak
20.02.2015, 19:51
Могу дать который есть у меня, но там не работает в тачке)

Давай! Буду благодарен! Прошу в скайп: flikzet