Код:
new Float:VehPos[2][MAX_VEHICLES][3];
new bool:AntiTPVeh[MAX_VEHICLES];
stock Float:GetDistanceBetweenPoints(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2) // By Gabriel "Larcius" Cordes
{
return floatadd(floatadd(floatsqroot(floatpower(floatsub(x1,x2),2)),floatsqroot(floatpower(floatsub(y1,y2),2))),floatsqroot(floatpower(floatsub(z1,z2),2)));
}
public VehicleTphack()
{
for(new i; i < sizeof(VehPos[]); i++)
{
GetVehiclePos(i, VehPos[1][i][0], VehPos[1][i][1], VehPos[1][i][2]);
if(!AntiTPVeh[i])
{
if(GetDistanceBetweenPoints(VehPos[0][i][0], VehPos[0][i][1], VehPos[0][i][2], VehPos[1][i][0], VehPos[1][i][1], VehPos[1][i][2]) > 100.0)
{
SetVehiclePos(i, VehPos[0][i][0], VehPos[0][i][1], VehPos[0][i][2]);
}
}
else
{
AntiTPVeh[i] = false;
}
VehPos[0][i][0] = VehPos[1][i][0];
VehPos[0][i][1] = VehPos[1][i][1];
VehPos[0][i][2] = VehPos[1][i][2];
}
}
Why are you asking from us, that what's wrong with it? You should tell us what you need to be edited in it or is there any error when you use that cmd/system, you've created.
what i found that i try tp vehicles .. and the vehicle start teleporting to old and new position in 1 sec.. like blinking..