SA-MP Forums Archive
Need help Rep+1 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need help Rep+1 (/showthread.php?tid=567057)



any budy Help Rep+1 - MBilal - 10.03.2015

Код:
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];
	 }

}
Whats wrong with it ?


Re: Need help Rep+1 - muzammilfreeman - 10.03.2015

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.


Re: Need help Rep+1 - MBilal - 10.03.2015

what i found that i try tp vehicles .. and the vehicle start teleporting to old and new position in 1 sec.. like blinking..
and its not cmd its actually anti tp vehicle