29.08.2011, 14:51
(
Последний раз редактировалось Kar; 29.08.2011 в 19:14.
)
Quote:
Some questions:
1) Could you please make a MPDistance2D? 2) Is MPDistance faster than PointToPoint3D in the PointToPoint plugin? 3) How is MPFDistance less accurate? :S Can you please give me examples of what MPDistance and MPFDistance will return using the same coordinates? 4) Does MPGetTrailerTowingVehicle loop through all vehicles to find the towing vehicle or do you keep track of trailers using OnPlayerUpdate and OnUnoccupiedVehicleUpdate? Thanks |
3.
pawn Код:
printf("%0.2f", MPClamp360(361.0));
new Float:distance[4];
distance[3] = MPFDistance(0.0, 0.0, 0.0, 100.0, 100.0, 100.0);
distance[0] = MPFDistance(0.0, 0.0, 0.0, 1000.0, 1000.0, 1000.0);
distance[1] = MPFDistance(0.0, 0.0, 0.0, 2000.0, 2000.0, 3000.0);
distance[2] = MPFDistance(0.0, 0.0, 0.0, 3000.0, 3000.0, 3000.0);
printf("MPFDistance: 0.0 - 100.0: %f - 0.0 - 1000.0: %f - 0.0 - 2000.0: %f - 0.0 - 3000.0: %f", distance[3], distance[0], distance[1], distance[2]);
distance[3] = MPDistance(0.0, 0.0, 0.0, 100.0, 100.0, 100.0);
distance[0] = MPDistance(0.0, 0.0, 0.0, 1000.0, 1000.0, 1000.0);
distance[1] = MPDistance(0.0, 0.0, 0.0, 2000.0, 2000.0, 3000.0);
distance[2] = MPDistance(0.0, 0.0, 0.0, 3000.0, 3000.0, 3000.0);
printf("MPDistance: 0.0 - 100.0: %f - 0.0 - 1000.0: %f - 0.0 - 2000.0: %f - 0.0 - 3000.0: %f", distance[3], distance[0], distance[1], distance[2]);
pawn Код:
[10:50:22] 1.00
[15:13:13] MPFDistance: 0.0 - 100.0: 173.204788 - 0.0 - 1000.0: 1732.046386 - 0.0 - 2000.0: 4123.093261 - 0.0 - 3000.0: 5196.132324
[15:13:13] MPDistance: 0.0 - 100.0: 173.205078 - 0.0 - 1000.0: 1732.050781 - 0.0 - 2000.0: 4123.105468 - 0.0 - 3000.0: 5196.152343
4. Look at the source code for it