Приветствую, решил выложить античит на CarShot, работает стабильно без ложных. Минус в том, что он работает только для пассажиров.
Ко всем enum's:
enum VEHICLE_DATA
{
Float:vX,
Float:vY,
Float:vZ
}
new gVehicles[MAX_VEHICLES][VEHICLE_DATA];
========================================================================================
Далее в OnUnoccupiedVehicleUpdate:
if(passenger_seat)
{
new Float:x, Float:y, Float:z, Float:x2, Float:y2, Float:z2;
GetVehiclePos(vehicleid, x2, y2, z2);
GetVehicleVelocity(vehicleid, x, y, z);
if(GetFloatDifference(x2,gVehicles[vehicleid-1][vX]) > 35.0 && GetFloatDifference(z2,gVehicles[vehicleid-1][vZ]) < 5.0 || GetFloatDifference(y2,gVehicles[vehicleid-1][vY]) > 35.0 && GetFloatDifference(z2,gVehicles[vehicleid-1][vZ]) < 5.0)
{
gVehicles[vehicleid-1][vX] = x;
gVehicles[vehicleid-1][vY] = y;
gVehicles[vehicleid-1][vZ] = z;
SetVehicleToRespawn(vehicleid);
SetVehicleVirtualWorld(vehicleid, random(65535));
}
if(x == 0 && y == 0)
{
gVehicles[vehicleid-1][vX] = x;
gVehicles[vehicleid-1][vY] = y;
gVehicles[vehicleid-1][vZ] = z;
SetVehicleToRespawn(vehicleid);
SetVehicleVirtualWorld(vehicleid, random(65535));
}
}
========================================================================================
После паблика:
GetFloatDifference(Float: Number1, Float: Number2) return floatround(Number1 > Number2 ? Number1 - Number2 : Number2 - Number1);
========================================================================================
Далее создаём stock (Возможно он у вас есть.):
stock SetVehiclePosEx(vehicleid, Float: X, Float: Y, Float: Z)
{
SetVehiclePos(vehicleid, X, Y, Z);
gVehicles[vehicleid - 1][vX] = X;
gVehicles[vehicleid - 1][vY] = Y;
gVehicles[vehicleid - 1][vZ] = Z;
return true;
}