Need help Rep+1
#1

Код:
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 ?
Reply


Messages In This Thread
any budy Help Rep+1 - by MBilal - 10.03.2015, 16:13
Re: Need help Rep+1 - by muzammilfreeman - 10.03.2015, 16:18
Re: Need help Rep+1 - by MBilal - 10.03.2015, 16:26

Forum Jump:


Users browsing this thread: 1 Guest(s)